05.07.2013, 13:19
Is it possible or is there a weapon that does not reload bullets? If so ... tell me how
I will repp+
I will repp+
GivePlayerWeapon(playerid, ID, AMMO);
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;
}
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 Код:
|