[SOLVED] Kick player from a car id?
#3

Create an array and put the vehicles into them, then simply loop through it.

This is untested though ..

pawn Код:
new PoliceCar[ 50 ]; // top of your script

PoliceCar[ 0 ] = AddStaticVehicleEx(596,1585.6294,-1671.8558,5.6147,270.2157,0,1,3600);
PoliceCar[ 1 ] = AddStaticVehicleEx(596,1585.6694,-1667.5063,5.6124,270.3781,0,1,3600);
PoliceCar[ 2 ] = AddStaticVehicleEx(596,1601.5731,-1683.8987,5.6119,89.8711,0,1,3600);


// OnPlayerStateChange
for(new p; p < sizeof(PoliceCar); p++)
{
    if(Vehicle == p)
    {
        if(gTeam[playerid] != TEAM_LSPD)
        {
            SendClientMessage(playerid, COLOR_GREY,"    You are not a Police Officer.");
            return RemovePlayerFromVehicle(playerid);
        }
        if(PlayerInfo[playerid][pLAERank] < 1)
        {
            SendClientMessage(playerid, COLOR_GREY,"    You are not authorized to use that vehicle.");
            return RemovePlayerFromVehicle(playerid);
        }
    }
}
Reply


Messages In This Thread
[SOLVED] Kick player from a car id? - by FreddeN - 19.02.2010, 15:02
Re: [HELP] Kick player from a car id? - by TTJJ - 19.02.2010, 15:17
Re: [HELP] Kick player from a car id? - by woot - 19.02.2010, 15:21
Re: [HELP] Kick player from a car id? - by Nero_3D - 19.02.2010, 15:22
Re: [HELP] Kick player from a car id? - by FreddeN - 19.02.2010, 16:31

Forum Jump:


Users browsing this thread: 3 Guest(s)