Quote:
Originally Posted by VincentDunn
pawn Код:
new TruckMinutes[MAX_PLAYERS];
forward OneMinute(); public OneMinute() { for(new i=0; i<MAX_PLAYERS; i++) { if(i != INVALID_PLAYER_ID && TruckMinutes[i] > 0) { TruckMinutes[playerid]--; } } return 1; }
public OnGameModeInit() { SetTimer("OneMinute", 60000, true); return 1; }
public OnPlayerConnect(playerid) { TruckMinutes[playerid] = 0; return 1; }
In the command, you would set TruckMinutes to however big the reload time is in minutes.
Every minute, for every player that is connected, their variable will reduce by one.
You would have to save the variable, and load it on connect.
|
Thanks man, I'll use this for my command if I can't get the time function to work instead. Rep for you.