Please Help-Protect The Prime Minister - 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)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Please Help-Protect The Prime Minister (
/showthread.php?tid=252749)
Please Help-Protect The Prime Minister -
msvu - 02.05.2011
Can somebody tell me how to make a code that automatically ejects the Prime Minister from planes and Helicopters
Re: Please Help-Protect The Prime Minister -
Vero - 02.05.2011
You need to give more detail. How do we know what the Prime Minister is defined as in your script? stuff like that we need or we cannot help you.
Re: Please Help-Protect The Prime Minister -
dr.pepper - 02.05.2011
You need to edit the 'CARIDHERE' and 'GTEAM HERE' Items items in the 'pawn' code.
pawn Код:
public OnPlayerStateChange(playerid, newstate, oldstate)
{
tAxI_OnPlayerStateChange(playerid,newstate,oldstate);
new carid = GetVehicleModel(GetPlayerVehicleID(playerid));
if(oldstate == PLAYER_STATE_ONFOOT && newstate == PLAYER_STATE_PASSENGER && gTeam[playerid] == GTEAM HERE)
{
RemovePlayerFromVehicle(playerid);
}
if(oldstate == PLAYER_STATE_ONFOOT && newstate == PLAYER_STATE_DRIVER && gTeam[playerid] == GTEAM HERE)
{
if(carid == CARIDHERE)
{
SendClientMessage(playerid,0xAA3333AA,"This class cannot fly planes and has removed you.");
RemovePlayerFromVehicle(playerid);
}
else
{
}
}
return 1;
}
Re: Please Help-Protect The Prime Minister -
msvu - 03.05.2011
Quote:
Originally Posted by dr.pepper
You need to edit the 'CARIDHERE' and 'GTEAM HERE' Items items in the 'pawn' code.
pawn Код:
public OnPlayerStateChange(playerid, newstate, oldstate) { tAxI_OnPlayerStateChange(playerid,newstate,oldstate); new carid = GetVehicleModel(GetPlayerVehicleID(playerid));
if(oldstate == PLAYER_STATE_ONFOOT && newstate == PLAYER_STATE_PASSENGER && gTeam[playerid] == GTEAM HERE) { RemovePlayerFromVehicle(playerid); } if(oldstate == PLAYER_STATE_ONFOOT && newstate == PLAYER_STATE_DRIVER && gTeam[playerid] == GTEAM HERE) { if(carid == CARIDHERE) { SendClientMessage(playerid,0xAA3333AA,"This class cannot fly planes and has removed you."); RemovePlayerFromVehicle(playerid); } else { } }
return 1; }
|
Thank toy very much