11.03.2011, 06:14
i am using lux admin how can i create vehicles for admins only..
i made a try..
i made a try..
Код:
public OnPlayerStateChange(playerid, newstate, oldstate) { new PlayerName[24]; GetPlayerName(playerid, PlayerName, sizeof(PlayerName)); new vehicleid = GetPlayerVehicleID(playerid); if(newstate == PLAYER_STATE_DRIVER) { if(vehicleid == AdminCar1) { if(IsPlayerAdminLevel(playerid,1)) { RemovePlayerFromVehicle(playerid); SendClientMessage(playerid, 0x33AA33AA, "I'm sorry, but this car has been reserved for Admins"); } return 1; } } { if(vehicleid == AdminCar2) { if(IsPlayerAdminLevel(playerid,2)) { RemovePlayerFromVehicle(playerid); SendClientMessage(playerid, 0x33AA33AA, "I'm sorry, but this car has been reserved for Admins"); } return 1; } } { if(vehicleid == AdminCar3) { if(IsPlayerAdminLevel(playerid,3)) { RemovePlayerFromVehicle(playerid); SendClientMessage(playerid, 0x33AA33AA, "I'm sorry, but this car has been reserved for Admins"); } return 1; } } { if(vehicleid == AdminCar4) { if(IsPlayerAdminLevel(playerid,4)) { RemovePlayerFromVehicle(playerid); SendClientMessage(playerid, 0x33AA33AA, "I'm sorry, but this car has been reserved for Admins"); } return 1; } } return 1; } #endif