06.01.2012, 15:46
pawn Код:
forward ExpTimer();
pawn Код:
public OnGameModeInit()
{
SetTimer("ExpTimer", 60000, true); // Repeating timer set when the server starts up
}
pawn Код:
public ExpTimer() // The timer callback
{
for(new i = 0; i != MAX_PLAYERS; i++)
{ // Loop
if(IsPlayerConnected(i) && !IsPlayerNPC(i)) // Checks if player is connected + NPC's don't need experience
{
GivePlayerExp(i, 15, ""); // Every connected player receives 1 EXP
}
}
return 1;
}