Need help with a script lag... ASAP!
#1

So, Ive made this lil GM that i might post later...
But i have a problem....

pawn Код:
forward WeaponChange();
public WeaponChange()
{
//KillTimer(WeapTimer);
new randweap = random(sizeof(RandomWeapons));
CurrentWeaponId = RandomWeapons[randweap];
SetTimer("GiveTheCurrentWeapon",15000,false);
return 1;
}

forward GiveTheCurrentWeapon();
public GiveTheCurrentWeapon()
{
for(new i = 0; i < MAX_PLAYERS; i++)
{
//KillTimer(GiveTimer);
GameTextForAll("~r~Weapons Cycled",1500,5);
ResetPlayerWeapons(i);
GivePlayerWeapon(i,CurrentWeaponId,99999);
SetTimer("WeaponChange",30000,false);
}
return 1;
}
Everything works fine But the text "Weapons Cycled" appears 2 or 3 times for sum reason... o_0
and after a few cycles it starts to lag REALLY bad when its on my own PC...
Ive tried KillTimer... but no change....

The way i use this is below...

pawn Код:
new CurrentWeaponId;
pawn Код:
public OnPlayerSpawn(playerid)
{
GivePlayerWeapon(playerid,CurrentWeaponId,99999);
return 1;
}
Help needed ASAP!

Regards....

BTW you better not steal my idea!!!
Reply


Messages In This Thread
Need help with a script lag... ASAP! - by [MNC]Azz - 22.02.2011, 13:30
AW: Need help with a script lag... ASAP! - by Nero_3D - 22.02.2011, 13:46
Re: Need help with a script lag... ASAP! - by [MNC]Azz - 22.02.2011, 16:31
Re: Need help with a script lag... ASAP! - by admantis - 22.02.2011, 16:34

Forum Jump:


Users browsing this thread: 1 Guest(s)