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: OnPlayerEnterVehicle (
/showthread.php?tid=451046)
OnPlayerEnterVehicle -
arjanforgames - 15.07.2013
pawn Код:
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
new modelid = GetVehicleModel(playerid);
if(modelid == 574)
{
{
TextDrawShowForPlayer(playerid, Textdraw12);
TextDrawShowForPlayer(playerid, Textdraw13);
TextDrawShowForPlayer(playerid, Textdraw14);
}
}
else
{
SendClientMessage(playerid, -1, "* You are not a street cleaner!");
ClearAnimations(playerid);
}
return 1;
}
When I try to enter a infernus (ID 411 instead of sweeper, ID 574) it says "You are not a street cleaner".
How is that possible?
Re: OnPlayerEnterVehicle -
Misiur - 15.07.2013
Quite simple, if the vehicle you are entering is not a sweeper you'll get that message.
Re : OnPlayerEnterVehicle -
lelemaster - 15.07.2013
Because you wrote if the vehicle model is 574, then show the textdraws. But any other vehicle than 574 show me the message "* You are not a street cleaner!".
I guess you wanted to have this:
pawn Код:
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
new modelid = GetVehicleModel(playerid);
if(modelid == 574)
{
if( /* put your variable of the job */ )
{
TextDrawShowForPlayer(playerid, Textdraw12);
TextDrawShowForPlayer(playerid, Textdraw13);
TextDrawShowForPlayer(playerid, Textdraw14);
}
else
{
SendClientMessage(playerid, -1, "* You are not a street cleaner!");
ClearAnimations(playerid);
}
}
return 1;
}
Re: OnPlayerEnterVehicle -
DBan - 15.07.2013
-delete-