Admin cars
#6

Quote:
Originally Posted by Wesley221
Посмотреть сообщение
Hey guys,

I'm trying to make Admin-Only cars, using the "LuxAdmin" FS. Can anyone give me some help, how to make the cars Admin-Only, like if your Admin level is higher as 1, you can enter them, and if you're lower as 1; you cant enter the car

Hope you guys can help me
~Wesley
Tell me the cars your using..

pawn Код:
forward IsAdminVehicle;

public OnPlayerEnterVehicle()
{
    if(IsAdminVehicle(GetPlayerVehicleID(playerid) && level[playerid] >= 1)
    {
        return 1;
    }
    else if(level[playerid] == 0)
    {
        EjectPlayer(playerid)
        return ;
    }
    return 1;
}

IsAdminVehicle(vehicleid)
{//modify the '-' in 'AV[-]' to the amount of vehicle's placed below
        new AV[7] = { 415,487,490,522,579,580,603 }; // modify this to your vehicleid's
    for(new i = 0; i < sizeof(AV); i++)
    {
        if(GetVehicleModel(vehicleid) == AV[i]) return 1;
    }
    return 0;
}
Reply


Messages In This Thread
Admin cars - by Wesley221 - 05.05.2011, 09:49
Re: Admin cars - by Cameltoe - 05.05.2011, 09:57
Re: Admin cars - by [DDC]Delight - 05.05.2011, 09:59
Re: Admin cars - by Wesley221 - 05.05.2011, 10:00
Re: Admin cars - by [DDC]Delight - 05.05.2011, 10:02
Re: Admin cars - by [SFA]SpiRRiT - 05.05.2011, 10:04
Re: Admin cars - by Wesley221 - 05.05.2011, 10:07
Re: Admin cars - by [DDC]Delight - 05.05.2011, 10:10
Re: Admin cars - by Wesley221 - 05.05.2011, 10:14
Re: Admin cars - by [DDC]Delight - 05.05.2011, 10:15
Re: Admin cars - by Wesley221 - 05.05.2011, 10:23
Re: Admin cars - by MadeMan - 05.05.2011, 11:19
Re: Admin cars - by [SFA]SpiRRiT - 05.05.2011, 11:35
Re: Admin cars - by Wesley221 - 05.05.2011, 13:44
Re: Admin cars - by [DDC]Delight - 05.05.2011, 13:53
Re: Admin cars - by Wesley221 - 05.05.2011, 14:50
Re: Admin cars - by MadeMan - 05.05.2011, 14:52
Re: Admin cars - by Wesley221 - 05.05.2011, 15:03
Re: Admin cars - by Wesley221 - 06.05.2011, 11:14

Forum Jump:


Users browsing this thread: 1 Guest(s)