11.04.2013, 17:08
(
Last edited by James_Braga; 11/04/2013 at 06:10 PM.
)
Quote:
Не выходит чет все равно. Либо работает для 1ого игрока с идом 0, либо вообще не работает.
Code:
payday = SetTimer("PayDayTimer",60000,1); // ongamemodeinit public PayDayTimer(playerid) { for(new i = 0; i < MAX_PLAYERS; i++) { if(Player[MAX_PLAYERS-1][pMinutes] >= 60) { Player[MAX_PLAYERS-1][pExp]++; Player[MAX_PLAYERS-1][pMinutes] = 0; } else { Player[MAX_PLAYERS-1][pMinutes]++; return 0; } } return 1; } |
PHP Code:
payday = SetTimer("PayDayTimer",60000,1); // ongamemodeinit
public PayDayTimer()
{
for(new i; i != MAX_PLAYERS; i++)
{
if(!IsPlayerConnected(i)) continue;
if(Player[i][pMinutes] >= 60)
{
Player[i][pExp]++;
Player[i][pMinutes] = 0;
}
else Player[i][pMinutes]++;
}
return 1;
}