SA-MP Forums Archive
Recognize Car - 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: Recognize Car (/showthread.php?tid=74806)



Recognize Car - -eXo - 26.04.2009

I spawned like 5 LV cop cars (19 and two ranchers (199). But they arent recognized as cop cars, how do I find out the ID to add them to this code?

Quote:

public IsACopCar(carid)
{
if((carid >= 16) && (carid <= 3)
{
return 1;
}
return 0;
}




Re: Recognize Car - nickbugun - 26.04.2009

Put this instead of OnPlayerEnterVehicle

Код:
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
  new string[48];
 	format(string, sizeof(string), "You entered vehicle: %d",vehicleid);
	SendClientMessage(playerid, 0xAAAA33AA, string);
  return 1;
}
When you enter a car, it gives you it`s id