SA-MP Forums Archive
EnterVehicle, and IsACar - 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: EnterVehicle, and IsACar (/showthread.php?tid=65767)



EnterVehicle, and IsACar - Omega90210 - 16.02.2009

Hey guys, I just have 2 questions please.

1. I have this in my script:

Код:
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
	new string[50];
	format(string, sizeof(string), "~w~%d", vehicleid);
	GameTextForPlayer(playerid, string, 3000, 1);
it tells me what the carid of the car is when i enter it, but ive been in servers where when i enter the car it tells me the actual name of it rather than the in game id. Can someone help me accomplish this please?

2. For my public IsACopCar, i have to define cars with the id's that the game gives you when you spawn one ((/veh))/((/oldcar)), and that is just a bitch going into every car just to get the id so i can add it to tell the game what is a cop car and what is not. How can i use MODEL IDS, like 596 = a police squad car, instead? What must i do to tell pawno to read model ids rather than carids/in game ids? Thank you.



Re: EnterVehicle, and IsACar - MenaceX^ - 16.02.2009

I didn't understand your problem.


Re: EnterVehicle, and IsACar - Omega90210 - 17.02.2009

whats not to understand? I need to know how to tell pawno to recognize model ids rather than carids, for godfather its /oldcar, that sorta thing :P


Re: EnterVehicle, and IsACar - Salmon - 18.02.2009

Use the Useful Functions include
and use the function
pawn Код:
GetVehicleName(vehicleid)



Re: EnterVehicle, and IsACar - Ghett0 - 18.02.2009

For cars, just check if the vehicle model is a car.


Re: EnterVehicle, and IsACar - Mikep - 18.02.2009

I have made an include (mikefunc(look in my sig)) which has IsVehicleCar(vehicleid);