02.08.2011, 21:51
Quote:
The guy abouve is right. Sohuldn't it be like:
pawn Код:
|
EDIT
pawn Код:
public OnPlayerStateChange(playerid, newstate, oldstate)
{
if(oldstate == PLAYER_STATE_ONFOOT && newstate == PLAYER_STATE_DRIVER)
{
if(IsPlayerInAnyVehicle(playerid))
{
if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 520 && PlayerInfo[playerid][Rank] != RANK_AIRFORCE && PlayerInfo[playerid][Rank] != RANK_LEGEND)
{
SendClientMessage(playerid, COLOR_RED, "You need to be the airforce to drive the Hydra!");//
RemovePlayerFromVehicle(playerid);
}
else if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 425 && PlayerInfo[playerid][Rank] != RANK_AIRFORCE && PlayerInfo[playerid][Rank] != RANK_LEGEND)//
{
SendClientMessage(playerid, COLOR_RED, "You need to be the airforce to drive the Hunter!");
RemovePlayerFromVehicle(playerid);
}
else if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 476 && PlayerInfo[playerid][Rank] != RANK_AIRFORCE && PlayerInfo[playerid][Rank] != RANK_LEGEND)//
{
SendClientMessage(playerid, COLOR_RED, "You need to be the airforce to drive the Rustler!");
RemovePlayerFromVehicle(playerid);
}
else if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 432 && PlayerInfo[playerid][Rank] != RANK_AIRFORCE && PlayerInfo[playerid][Rank] != RANK_LEGEND)//
{
SendClientMessage(playerid, COLOR_RED, "You need to be a tanker to drive the Rhino!");
RemovePlayerFromVehicle(playerid);
}
}
}
return 1;
}