Quote:
Originally Posted by M249-M4A1
I completely missed this part before:
Code:
public Action:g_tmrGiveAmmo_TimerTick(Handle:timer) { new intPlayerIndex = 1;
{ &nb sp;// if the client is set to have unlimited ammo, give it to them &nb sp;if( g_enuPlayerAmmo[intPlayerIndex] == enuPlayerAmmoType_Unlimited ) &nb sp;GiveFullAmmo(intPlayerIndex);
} }
it seems that you are defining the player index to give ammo to as index 1, so player index 1 will ALWAYS get full ammo. you might not be player index 1 in the game so you should do a loop through all players, setting their indicies to unlimited ammo, rather than hardcoding just 1. give that a try.
id also recommend doing a PrintToAllChat("timer running") message in each of the functions (with different text), so that you can see if its even being called or not
|
the originalcontained this bit of code
//********************************************* *************************************
//* Name: Initialize Player List
//* Abstract: set all the players to have normal ammo management
//********************************************* *************************************
public InitializePlayerList()
{
new intPlayerIndex = 0;
//go through each player spot and set them to normal ammo type (they get nothing special)
for (intPlayerIndex = 1; intPlayerIndex <= MAXPLAYERS; intPlayerIndex += 1)
{
g_enuPlayerAmmo[intPlayerIndex] = enuPlayerAmmoType_Normal;
}
}
would that do what you are talking about?