What to do in 2 ambulances to enter only 276 medical skin - 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: What to do in 2 ambulances to enter only 276 medical skin (
/showthread.php?tid=288430)
What to do in 2 ambulances to enter only 276 medical skin -
Join7 - 07.10.2011
What to do in 2 ambulances to enter only 276 medical skin
ambulance1 = AddStaticVehicle(416, X, Y, Z, Angle, 1, 3);
ambulance2 = AddStaticVehicle(416, X, Y, Z, Angle, 1, 3);
Only with 276 skin (Medic)
Re: What to do in 2 ambulances to enter only 276 medical skin -
AndreT - 07.10.2011
You'll need to check the vehicle ID and skin when the player's state changes.
pawn Код:
public OnPlayerStateChange(playerid, newstate, oldstate)
{
if(newstate == PLAYER_STATE_DRIVER)
{
new vID = GetPlayerVehicleID(playerid);
if((vID == ambulance1 || vID == ambulance2) && GetPlayerSkin(playerid) != 276)
{
RemovePlayerFromVehicle(playerid);
}
}
return true;
}
Re: What to do in 2 ambulances to enter only 276 medical skin -
Join7 - 07.10.2011
thanks