13.11.2011, 10:14
Try:
pawn Код:
#include <a_samp>
#define COLOR_BLUE 0x1229FAFF
new ScoreTimer1[MAX_PLAYERS];
new ScoreTimer2[MAX_PLAYERS];
forward AddScore1(playerid);
forward AddScore2(playerid);
public OnPlayerConnect(playerid)
{
ScoreTimer1[playerid] = SetTimerEx("AddScore1", 1000, true, "i", playerid);
ScoreTimer2[playerid] = SetTimerEx("AddScore2", 5000, true, "i", playerid);
return 1;
}
public AddScore1(playerid)
{
SetPlayerScore(playerid, GetPlayerScore(playerid)+1);
new string[200];
format(string, sizeof(string), "~g~U're now level 1 Congratz");
GameTextForPlayer(playerid, string, 1000, 0);
KillTimer(ScoreTimer1[playerid]);
if(GetPlayerScore(playerid) < 2)
{
KillTimer(ScoreTimer1[playerid]);
}
return 1;
}
public AddScore2(playerid)
{
SetPlayerScore(playerid, GetPlayerScore(playerid)+1);
new string[200];
format(string, sizeof(string), "~g~U're now level 2 Congratz");
GameTextForPlayer(playerid, string, 1000, 0);
KillTimer(ScoreTimer2[playerid]);
if(GetPlayerScore(playerid) < 2) // Change the < 2 of the numbers to the number of scoretimers u got
{
KillTimer(ScoreTimer2[playerid]);
}
return 1;
}