06.05.2013, 10:38
Hey! My command /time won't work right. After completing work, you need to wait 2 minutes. I tried to create /time like this:
When I type few times /time, time in my string just wents up. I want to create it to display how much minutes and seconds are left so you can do job again but I don't know how to create it from GetTime and one variable where wait time is stored, in this case is pSmuggleWait. Please help me.
Код:
CMD:time(playerid, params[]) { new string[128]; if(!IsPlayerLoggedIn(playerid)) return SendClientMessage(playerid, COLOR_GREY, "You need to login first before using any command."); if((gettime() - PlayerInfo[playerid][pSmugglerWait]) >0) { new Wait; Wait = (gettime() - PlayerInfo[playerid][pSmugglerWait]); format(string, sizeof(string), "You need to wait %d more minutes to smuggle drugs again.", Wait); SendClientMessage(playerid, COLOR_WHITE, string); }