SA-MP Forums Archive
... problem with area's - 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: ... problem with area's (/showthread.php?tid=69273)



... problem with area's - hazdog - 16.03.2009

hey again;

ive got a problemo with isplayerinarea...

not the actual function itself, rather making people leave there hunter upon entering the area...

Код:
public CheckArea()
{
	CheckArea2();
  for(new i = 0; i < GetMaxPlayers(); i++)
  {
    if(!IsPlayerConnected(i)) continue; 
    if(IsPlayerInArea(i, 1720.497, 1193.343, 1894.873, 1148.337))
		{
			ResetPlayerWeapons(i);
			SetPlayerHealth(i, 10000);
      new vehicle;
      vehicle = GetPlayerVehicleID(i);
      if (vehicle == 425)
      {
	      new Float:X, Float:Y, Float:Z;
	      GetPlayerPos(i, X, Y, Z);
	      SetPlayerPos(i, X, Y, Z+40);
	      ResetPlayerWeapons(i);
	      CreateExplosion(X, Y, Z, 4, 10);
	      SendClientMessage(i,POLICE_COLOR,"Sorry, no hunter's are allowed in here.");
		  }
    }
  }
}
the first bit works fine, but the second does not :\ please help


cheers, hazdog


Re: ... problem with area's - Pyrokid - 17.03.2009

You're supposed to use Model, not ID.

https://sampwiki.blast.hk/wiki/GetVehicleModel