GetElementSyncer
Jump to navigation
Jump to search
Example
Click to collapse [-]
ServerExample 1
This code will kill the syncer of the first ped created with createPed.
local elementSyncer = getElementSyncer(getElementsByType("ped")[1]) if elementSyncer and getElementType(elementSyncer) == "player" then --Check if its a player killPed(elementSyncer,elementSyncer) end
Example 2
This code will kill the syncer of the ped created with createPed.
function test(player,commandName) local idlewoodPed = createPed(26,1813.27,-1897.04,13.577) local elementSyncer = getElementSyncer(idlewoodPed) if elementSyncer and getElementType(elementSyncer) == "player" then --Check if its a player killPed(elementSyncer,elementSyncer) end end addCommandHandler("test",test,false)