Would this cause lag issues?
#4

Quote:
Originally Posted by Abagail
Посмотреть сообщение
I don't know why that would cause lag, how-ever it may spam messages if they shoot over, and over with no lag. Maybe add something like this?
pawn Код:
new g_ShotMessage[MAX_PLAYERS];

if(GetPlayerAmmo(playerid) == 0 && g_ShotMessage[playerid] == 0)
{
     
            ProxDetector(30.0, playerid, "* CLINK *", COLOUR_PURPLE, COLOUR_PURPLE, COLOUR_PURPLE, COLOUR_PURPLE, COLOUR_PURPLE);
            SendClientMessage(playerid, COLOUR_GREY, "You are out of ammo for this weapon. You need to load more into it, before you can use it again.");
             g_ShotMessage[playerid] = 1;
}
else if(GetPlayerAmmo(playerid) != 0 && g_ShotMessage[playerid] == 1)
{
       g_ShotMessage[playerid] = 0;
}
return 1;
Hmm? When the gun is out of ammo, the gun is automatically removed so it won't spam any messages.
Reply


Messages In This Thread
Would this cause lag issues? - by Dokins - 27.11.2014, 20:29
Re: Would this cause lag issues? - by Patrick - 27.11.2014, 20:34
Re: Would this cause lag issues? - by Abagail - 27.11.2014, 20:34
Re: Would this cause lag issues? - by Patrick - 27.11.2014, 20:36
Re: Would this cause lag issues? - by Dokins - 27.11.2014, 20:40
Re: Would this cause lag issues? - by Abagail - 27.11.2014, 20:46
Re: Would this cause lag issues? - by Patrick - 27.11.2014, 20:47
Re: Would this cause lag issues? - by Dokins - 27.11.2014, 20:48

Forum Jump:


Users browsing this thread: 2 Guest(s)