Need help with OnPlayerUpdate - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Need help with OnPlayerUpdate (
/showthread.php?tid=360749)
Need help with OnPlayerUpdate -
Kain1297 - 18.07.2012
Hello everyone, im making a Throwing knife system, i have everything done, the problem is, how can i make it damage? i cant use onplayerupdate because it lags too much
Re: Need help with OnPlayerUpdate -
Dan. - 18.07.2012
Use a timer, if OnPlayerUpdate is too fast and lags?
Re: Need help with OnPlayerUpdate -
leonardo1434 - 18.07.2012
onplayerupdate doesn't make lag if you know how to use it, but there's 2 functions that can do the same which is more accessible.
https://sampwiki.blast.hk/wiki/OnPlayerGiveDamage
https://sampwiki.blast.hk/wiki/OnPlayerTakeDamage
AW: Need help with OnPlayerUpdate -
Kain1297 - 18.07.2012
The problem is, that my knife is an object, i want to make it make damage when stop moving
Re: Need help with OnPlayerUpdate -
EV007 - 19.07.2012
What are you saying here is, you want the knife to do damage when it stops moving, right? On your timer, when it stops moving, simply do a loop of players, and check if there is someone near enough the object to be damaged.
Respuesta: Need help with OnPlayerUpdate -
Kain1297 - 20.07.2012
it doesnt works

theres a prob with the playerid, when it throws the knife, i can kill other players but they cant kill me with their knifes