hi guys , i m working on shooting mission script , for that i created some Ped ( bots ) , my problem is that i wanted to use isPedDead to check if the Ped is dead or no , if the Ped is dead , the player will take 1k.
I need to create the Ped in Client or server side ? i tried a lot of way but i failed a lot of time , i hope that one of you will help me , thx
function checkkills ()
criminal5 = createPed ( 28, 293.54177856445,-147.95318603516,1004.0625 ,-90 )
setElementFrozen (criminal5 ,true)
if isPedDead(criminal5) then givePlayerMoney ( thePlayer, 1000 )
end
end
addEvent("checkkills",true)
addEventHandler("checkkills",getRootElement(),checkkills)
I trigged the event from client side , Ped will be created , but when i kill him nothing will happen.