Help with OnPlayerEnterVehicle
#1

I am trying to send a message to a player when they enter the ambulance (416) But when I enter the ambulance I get no message.
Код:
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
	if(vehicleid == 416)
		{
  			SendClientMessage(playerid, 0xFFFF00FF, "You have entered an ambulance. Heal people with /heal");
  			return 1;
		}
		else
  	return 1;

}
Reply
#2

You can't use "vehicleid" to get the model id.

pawn Код:
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
        if(GetVehicleModel(vehicleid) == 416)
        {
            SendClientMessage(playerid, 0xFFFF00FF, "You have entered an ambulance. Heal people with /heal");
        }
   
    return 1;

}
Reply
#3

Thanks bro.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)