About weapons :D (I will repp+)
#5

Quote:
Originally Posted by Lordz™
Посмотреть сообщение
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.
thxx
Reply


Messages In This Thread
About weapons :D (I will repp+) - by radiobizza - 05.07.2013, 13:19
Re: About weapons :D (I will repp+) - by _Khaled_ - 05.07.2013, 13:38
Re: About weapons :D (I will repp+) - by Lordzy - 05.07.2013, 13:46
Re: About weapons :D (I will repp+) - by Sandiel - 05.07.2013, 14:00
Re: About weapons :D (I will repp+) - by radiobizza - 06.07.2013, 11:17

Forum Jump:


Users browsing this thread: 1 Guest(s)