EnterVehicle, and IsACar
#1

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

I didn't understand your problem.
Reply
#3

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

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

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

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


Forum Jump:


Users browsing this thread: 2 Guest(s)