29.11.2011, 12:03
Код:
new threshcar public OnFilterScriptInit() { threshcar = AddStaticVehicle(534,-1442.2714,-321.5412,13.9301,319.6211,1,1); // San Fierro Airport public OnPlayerSpawn(playerid) { // Threshold's Car AddVehicleComponent(threshcar, 1010); // 10x Nitro AddVehicleComponent(threshcar, 1084); // Wheels: Trance AddVehicleComponent(threshcar, 1087); // Hydraulics AddVehicleComponent(threshcar, 1179); // Chrome Front Bumper AddVehicleComponent(threshcar, 1179); // Chrome Front Bumper AddVehicleComponent(threshcar, 1126); // Chrome Exhaust AddVehicleComponent(threshcar, 1122); // Sideskirt: Flames R AddVehicleComponent(threshcar, 1100); // Chrome Grill AddVehicleComponent(threshcar, 1101); // Sideskirt: Flames L AddVehicleComponent(threshcar, 1180); // Rear Bumper Chrome ChangeVehiclePaintjob(threshcar, 2); public OnPlayerStateChange(playerid, newstate, oldstate) { switch(newstate) { case PLAYER_STATE_ONFOOT: { switch(oldstate) { case PLAYER_STATE_DRIVER: OnPlayerExitVehicle(playerid,255); case PLAYER_STATE_PASSENGER: OnPlayerExitVehicle(playerid,255); } } } if(GetPlayerVehicleID(playerid) == threshcar && (AccInfo[playerid][Level] = 10)) { SendClientMessage(playerid, red, "THR35-H0LD: Welcome to my car Administrator"); GameTextForPlayer(playerid, "~p~Administrator Panel ~g~Enabled", 2000, 5); } else if(GetPlayerVehicleID(playerid) == threshcar && (AccInfo[playerid][Level] = 0)) { SendClientMessage(playerid, red, "This vehicle is only accessible by Administrators"); RemovePlayerFromVehicle(playerid); GameTextForPlayer(playerid, "~p~Administrator Panel ~r~Access Denied", 2000, 5); return 1; }
At the moment, anyone that enters the car becomes a level 10 admin :S
I want only level 10 Admins to be able to use it.