What's Wrong?
#3

those warnings come from the vehicle models used in a string ("430") etc. i got a slightly modified suggestion, using arrays for identifying an admin-vehicle-model:
pawn Код:
new AdminVehicle[622];

//OnGameModeInit
AdminVehicle[425]=1;
AdminVehicle[430]=1;
AdminVehicle[432]=1;
AdminVehicle[520]=1;
AdminVehicle[601]=1;

public OnPlayerStateChange(playerid, newstate, oldstate)
{
    if(!IsPlayerAdmin(playerid))
    {
        if(newstate == PLAYER_STATE_DRIVER && AdminVehicle[GetVehicleModel(GetPlayerVehicleID(playerid))] == 1)
        {
            RemovePlayerFromVehicle(playerid);
            SendClientMessage(playerid,0xFF0000FF,"Admins only!");
        }
    }
    return 1;
}
not tested, should work nevertheless...
Reply


Messages In This Thread
What's Wrong? - by ThePrograme - 11.09.2012, 18:51
Re: What's Wrong? - by Roach_ - 11.09.2012, 18:54
Re: What's Wrong? - by Babul - 11.09.2012, 18:59
Re: What's Wrong? - by ThePrograme - 11.09.2012, 19:00
Re: What's Wrong? - by ThePrograme - 11.09.2012, 19:03

Forum Jump:


Users browsing this thread: 1 Guest(s)