22.02.2011, 13:46
pawn Код:
forward WeaponChange();
public WeaponChange()
{
new randweap = random(sizeof(RandomWeapons));
CurrentWeaponId = RandomWeapons[randweap];
GiveTheCurrentWeapon(); //removed the timer, why wait ?
}
forward GiveTheCurrentWeapon();
public GiveTheCurrentWeapon()
{
for(new i = 0; i < MAX_PLAYERS; i++)
{
ResetPlayerWeapons(i);
GivePlayerWeapon(i,CurrentWeaponId,99999);
}
//You called the gamtext and the timer x (number of players) times
//if that goes on you would have all 45 seconds double so much timers as before
GameTextForAll("~r~Weapons Cycled",1500,5);
SetTimer("WeaponChange",30000,false);
}