SA-MP Forums Archive
need help for pirateship for == on player update === - 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 for pirateship for == on player update === (/showthread.php?tid=393543)



need help for pirateship for == on player update === - Player23 - 18.11.2012

help for pirateship
onplayerupdate
and if player leave pirateship it stop giving money
can anyone



Re: need help for pirateship for == on player update === - Backwardsman97 - 18.11.2012

Maybe OnPlayerUpdate isn't the best place to that many area checks for all the players. A repeating timer of sorts may be more appropriate but that is entirely up to you. You just need to know if the player is in a certain area? So retrieve their position and compare it to certain coordinates that designate the area of the ship.

pawn Код:
new
    Float:x,
    Float:y,
    Float:z;
   
GetPlayerPos(playerid,x,y,z);
if((x > MinimumX && x < MaximumX) && (y > MinimumY && y < MaximumY))
{
    //They are inside the area
}



Re: need help for pirateship for == on player update === - Player23 - 19.11.2012

tthanx soo much dude
actually friend the problem is when we leave pirateship in lv it remain giving money and stops at a longer distance like near caliguala casino : () tthis thing giving me problem and i cannt do what i want :C
and i am still unable to make it better