Keep on giving ammo to the player on a repeating timer. I'm not sure whether it might create a break while shooting continuously.
pawn Код:
new bool:p_Spawned[MAX_PLAYERS]; //To clarify whether player is spawned or not.
public OnPlayerConnect(playerid)
{
p_Spawned[playerid] = false;
return 1;
}
public OnPlayerSpawn(playerid)
{
p_Spawned[playerid] = true;
return 1;
}
public OnPlayerDeath(playerid, killerid, reason)
{
p_Spawned[playerid] = false;
return 1;
}
public OnFilterScriptInit()
{
SetTimer("NoReload_", 350, true); //Depends on the sync or fire rate, not sure if this timer could work perfectly. In some cases, no reload might not work well.
return 1;
}
forward NoReload_();
public NoReload_()
{
for(new i; i< GetMaxPlayers(); i++)
{
if(!IsPlayerConnected(i)) continue;
if(p_Spawned[i] != 1) continue;
GivePlayerWeapon(i, GetPlayerWeapon(i), 1000);
}
return 1;
}
Not sure about this as I haven't tested, but something like this is so.