Help with OnPlayerEnterVehicle - 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)
+--- Thread: Help with OnPlayerEnterVehicle (
/showthread.php?tid=306763)
Help with OnPlayerEnterVehicle -
luigifan9 - 27.12.2011
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;
}
Re: Help with OnPlayerEnterVehicle -
Jakku - 27.12.2011
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;
}
Re: Help with OnPlayerEnterVehicle -
luigifan9 - 27.12.2011
Thanks bro.