10.07.2010, 11:37
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:
Im not sure how to fix it.
Should i add a timer?
Thanks
-Lorenc
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;
Should i add a timer?
Thanks
-Lorenc