27.10.2012, 10:37
oh, sure, a player should know how long to wait:
not tested
Код:
dcmd_rnos(playerid, params[]) { #pragma unused params if(IsRegularPlayer[playerid] != 1337) return SendClientMessage(playerid,COLOR_ORANGE,"[AeroBot]: You Are Not A Regular Player"); if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid,COLOR_RED, "[ERROR]You must be in a car to use this command."); switch(GetVehicleModel( GetPlayerVehicleID(playerid) )) { case 448,461,462,463,468,471,509,510,521,522,523,581,586,449: return SendClientMessage(playerid,COLOR_RED,"[ERROR]You cannot add nitro into this car!"); } new RemainingMS=GetTickCount()-GetPVarInt(playerid,"NosUsedMS"); if(RemainingMS>300000) { SetPVarInt(playerid,"NosUsedMS",GetTickCount()); AddVehicleComponent(GetPlayerVehicleID(playerid), 1010); SendClientMessage(playerid, COLOR_GREY, "You have succesfully added nitrous into your car."); } else { new string[128]; format(string),sizeof(string),"Please wait %d Minutes until using nІo again!",RemainingMS/1000/60);// /1000 = 1 second /60 = minutes = 1:37 shows as 1 minute SendClientMessage(playerid, COLOR_GREY, string); } return 1; }