... problem with area's
#1

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
Reply
#2

You're supposed to use Model, not ID.

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


Forum Jump:


Users browsing this thread: 1 Guest(s)