07.01.2014, 14:09
Код:
new iLastFixCar[MAX_PLAYERS]; CMD:mfix(playerid, params[]) { new iCount = GetTickCount(); if(gClass[playerid] == ENGINEER) { if(iCount - iLastFixCar[playerid]) > 10000) { if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid,red,"You must be in vehicle to fix it"); new VehicleID = GetPlayerVehicleID(playerid); RepairVehicle(VehicleID); GameTextForPlayer(playerid,"~w~~n~~n~~n~~n~~n~~n~Vehicle ~g~Repaired!",3000,3); return SetVehicleHealth(VehicleID, 1000); } else return SendClientMessage(playerid,RED,"You need to wait 10 Seconds to fix car again!"); } else return SendClientMessage(playerid,red,"You Are Not An Engineer to fix your car!"); }