0 Üye ve 1 Ziyaretçi konuyu incelemekte.
addEvent("sniperTakeDecision", true)addCommandHandler("setlaledevri", function(thePlayer, command) local x, y, z = getElementPosition(thePlayer) local int = getElementInterior(thePlayer) local ped = createSniperPed(x, y, z) setElementInterior(ped, int) end)setTimer( function() for i, peds in ipairs(getElementsByType("ped")) do if getElementData(peds, "type") == "ped.sniper.npc" and getElementHealth(peds) > 0 then setPedStat(peds, 78, 1000) setPedWeaponSlot(peds, 6) giveWeapon(peds, 31, 10000, true) end end end, 50, 0)function createSniperPed(x, y, z) local ped = createPed(285, x, y, z) setTimer( function() if isElement(ped) then setPedStat(peds, 78, 1000) giveWeapon(ped, 31, 10000, true) setPedWeaponSlot(ped, 6) setElementData(ped, "type", "ped.sniper.npc") setElementFrozen(ped, true) end end , 5000, 1) return pedendaddEventHandler("sniperTakeDecision", getRootElement(), function(sniperPedID, aimPlayer) setElementData(sniperPedID, "target", aimPlayer) triggerClientEvent("sniperTakeDecisionClient", getRootElement(), sniperPedID, aimPlayer) end)
function pedOldugunde() setTimer(function(aaaaaaaa) local x, y, z = getElementPosition(aaaaaaaa) local int = getElementInterior(aaaaaaaa) local ped = createSniperPed(x, y, z) setElementInterior(ped, int) end,1000,1,source) endaddEventHandler("onPedWasted", resourceRoot, pedOldugunde)
script içine ekleserverKodfunction pedOldugunde() setTimer(function(aaaaaaaa) local x, y, z = getElementPosition(aaaaaaaa) local int = getElementInterior(aaaaaaaa) local ped = createSniperPed(x, y, z) setElementInterior(ped, int) end,1000,1,source) endaddEventHandler("onPedWasted", resourceRoot, pedOldugunde)
function pedOldugunde() setTimer(function(aaaaaaaa) local x, y, z = getElementPosition(aaaaaaaa) local int = getElementInterior(aaaaaaaa) destroyElement(aaaaaaaa) local ped = createSniperPed(x, y, z) setElementInterior(ped, int) end,1000,1,source) endaddEventHandler("onPedWasted", resourceRoot, pedOldugunde)