VIP Cars help.
#3

Quote:
Originally Posted by Kitten
Посмотреть сообщение
Don't Matter what Admin system you use

Use this
pawn Код:
//bunch of cod


Did you even try compiling it? Because I know it won't. Using MAX_PLAYERS to assign a single vehicleid? What the hell?

pawn Код:
new gVipCars[5];

//GameModeInit
gVipCars[0] = AddStaticVehicle(...);
gVipCars[1] = AddStaticVehicle(...);
gVipCars[2] = AddStaticVehicle(...);
gVipCars[3] = AddStaticVehicle(...);
gVipCars[4] = AddStaticVehicle(...);

//PlayerStateChange
public OnPlayerStateChange(playerid, newstate, oldstate)
{
    if(newstate == PLAYER_STATE_DRIVER)
    {
        if(/* put your variable to check for vip here */ == 0)
        {
            new vehicleid = GetPlayerVehicleID(playerid);
            for(new i; i < sizeof(gVipCars); i++)
            {
                if(vehicleid == gVipCars[i])
                {
                    SendClientMessage(playerid, COLOR_RED, "Not Vip");
                    RemovePlayerFromVehicle(playerid);
                    break;
                }
            }
        }
    }
    return 1;
}
Reply


Messages In This Thread
VIP Cars help. - by fie - 26.07.2011, 11:02
Re: VIP Cars help. - by Kitten - 26.07.2011, 11:15
Re: VIP Cars help. - by Vince - 26.07.2011, 11:25

Forum Jump:


Users browsing this thread: 1 Guest(s)