SA-MP Forums Archive
Little Help plz - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Little Help plz (/showthread.php?tid=82470)



Little Help plz - cloud9 - 18.06.2009

I tried to code a feature for Hydra wars such that, when we are flying below a certain Z co-ords it should kick us from hydra, but i am wondering how to do it, can anyone of u help me plz.


Re: Little Help plz - Grim_ - 18.06.2009

Something like this
pawn Код:
//in some timer
new Float:Pos[3];
GetPlayerPos(playerid, Pos[0], Pos[1], Pos[2]);
if(GetPlayerVehicleID(playerid) == 525) //or w/e id of hydra is
{
  if(Pos[2] < 50)
  {
   Kick(playerid);
  }
}
Just a rough overveiw, not teh actual code.


Re: Little Help plz - cloud9 - 18.06.2009

so i should repeat this stuff for every second?

and btw u are v helpful thanx


Re: Little Help plz - Grim_ - 18.06.2009

Yeah, use SetTimerEx to set a timer for one second with a playerid param.