28.07.2012, 17:17
Quote:
Код:
#include <a_samp> public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger) { if(LockedCar[vehicleid] == 1 && PlayerCar[playerid] != vehicleid) { if(MsgLocked[playerid] == 1) { TextDrawHideForPlayer(playerid, Locked); MsgLocked[playerid] = 0; KillTimer(LockedTimer[playerid]); } TogglePlayerControllable(playerid, true); Locked = TextDrawCreate(10.0, 250.0, "This Vehicle is Locked"); TextDrawUseBox(Locked, 1); TextDrawBoxColor(Locked, 0x00000055); TextDrawTextSize(Locked, 125, 5); TextDrawShowForPlayer(playerid, Locked); / LockedTimer[playerid] = SetTimer("RemoveLock", 4000, false); MsgLocked[playerid] = 1; } return 1; } public RemoveLock(playerid) { if(MsgLocked[playerid] == 1) { TextDrawHideForPlayer(playerid, Locked); MsgLocked[playerid] = 0; } } public OnVehicleSpawn(vehicleid) { LockedCar[vehicleid] = 0; for(new i = 0; i < MAX_PLAYERS; i++) { if(PlayerCar[i] == vehicleid) PlayerCar[i] = -1; } return 0; } |