13.04.2013, 19:46
So yeah I made a repair command and just want to know if im doing it right (works fine ingame) and how can i add a Timer so you only can do the command evey 1min or so
Код:
CMD:repair(playerid, params[]) { if(playerid) return SendClientMessage(playerid, 0xFFFFFFFF, "/repair to repair your vehicle!"); else if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, 0xFFFFFFFF, "You are not in a vehicle!"); else if(!IsPlayerInRangeOfPoint(playerid, 7.0, 1564.8927, -1612.5355, 13.2718)) return SendClientMessage(playerid, 0xFF0000FF, "Your not at the repair point"); RepairVehicle(GetPlayerVehicleID(playerid)); SendClientMessage(playerid, 0xFFFFFFFF, "Your vehicle has been successfully repaired!"); return 1; }