Why does this repeat?
#1

Well hello, Im making a GunBox minigame which is sorta like Sandras CashBox minigame.


So i made a little thing where if your out of ammo it resets the gunbox minigame. I just dont get it, when i test the gunbox minigame and waste my ammo the client messages repeat.
heres my code:
pawn Код:
if(IsGunBoxPickedUp == 1)
    {
        if(GetPlayerWeapon(playerid) == 38 && GetPlayerAmmo(playerid) == 0)
        {
            new str[128];
            SendClientMessageToAll(0xFFD700AA, "A new game of GunBox will start in 20 minutes!");
            SetTimer("StartNewGunBoxGame", GunBoxTimer, 0);
            new pName[MAX_PLAYER_NAME];
            GetPlayerName(GunBoxOwner, pName, 24);
            format(str, 128, "%s (ID: %d) had the gun box and ran out of ammo.", pName, playerid);
            SendClientMessageToAll(0xFFD700AA, str);
            GunBoxMinigameStarted = 0;
            DestroyPickup(GunBoxPickup);
            PlayerWastedAmmo = 1;
        }
    }
    return 1;
Im not sure how to fix it.

Should i add a timer?


Thanks

-Lorenc
Reply


Messages In This Thread
Why does this repeat? - by Lorenc_ - 10.07.2010, 11:37
Re: Why does this repeat? - by DeathOnaStick - 10.07.2010, 11:42
Re: Why does this repeat? - by Lorenc_ - 10.07.2010, 11:43
Re: Why does this repeat? - by DeathOnaStick - 10.07.2010, 11:45
Re: Why does this repeat? - by Lorenc_ - 10.07.2010, 11:51
Re: Why does this repeat? - by DeathOnaStick - 10.07.2010, 11:56
Re: Why does this repeat? - by Lorenc_ - 10.07.2010, 11:59

Forum Jump:


Users browsing this thread: 1 Guest(s)