01.02.2014, 13:29
hello every so i been working on a timer and it works let me explain how it work, when player hits score 25 they will get message and armour exetras but the thing is i set timer to not repeat but its repeat here part of my codes
i put that on gameini idint work i put it on on OnPlayerKeyStateChange or i need make 2 timers ? idk
anyone know how fix this.
i put that on gameini idint work i put it on on OnPlayerKeyStateChange or i need make 2 timers ? idk
PHP код:
SetTimer("ACH", 1000, 0);
PHP код:
forward ACH();
PHP код:
public ACH()
{
for(new i = 0; i<MAX_PLAYERS; i++)
if(GetPlayerScore(i) >= 25 && GetPlayerScore(i) <26)
{
GivePlayerMoney(i, 1500);
SetPlayerArmour(i, 100);
GivePlayerWeapon(i, 26, 500);
SetPlayerSkillLevel(i, WEAPONSKILL_SAWNOFF_SHOTGUN, 1);
SendClientMessage(i,COLOR_YELLOW,"Congratulations You Scored 25!");// if the player have the score give them something!
SendClientMessage(i,COLOR_YELLOW,"You got full armour and 1500$$ and unlocked the Sawnoff Shotgun!");
SendClientMessage(i,COLOR_YELLOW,"You can have 2 on your hands when you reach Score 50 ^_^");
return 1;
}
else
{
//nothing
}
for(new i = 0; i<MAX_PLAYERS; i++)
if(GetPlayerScore(i) >= 25 && GetPlayerScore(i) <26)
{
GivePlayerMoney(i, 2000);
SetPlayerArmour(i, 100);
GivePlayerWeapon(i, 31, 500);
SetPlayerSkillLevel(i, WEAPONSKILL_SAWNOFF_SHOTGUN, 0);
SendClientMessage(i,COLOR_YELLOW,"Congratulations You Scored 50!");// if the player have the score give them something!
SendClientMessage(i,COLOR_YELLOW,"You unlocked The M4 Congrats!");
return 1;
}
else
{
//nothing
}
return 1;
}