05.05.2011, 10:04
Quote:
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 |
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;
}