SA-MP Forums Archive
help /givealllweapon - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: help /givealllweapon (/showthread.php?tid=416402)



help /givealllweapon - DerickClark - 17.02.2013

it's spaming.
Код:
format(string, 120, "Administrator %s has given all players weapon",PlayerInfo(playerid));
Код:
cmd(giveallweapon, playerid, params[])
{
	new weapon; new ammo;
	if(GetPVarInt(playerid, "AdminLevel") == 0) return SendClientMessage(playerid, COLOR_ERROR, "Invalid Command.");
	if(sscanf(params, "ii", weapon, ammo)) return SendClientMessage(playerid, COLOR_ERROR, "Usage: /giveallweapon (WeaponID) (Ammo)");
	for(new i = 0; i<MAX_PLAYERS; i ++)
	{
	    {
            new string[120];
	        GivePlayerWeapon(i, weapon, ammo);
	        format(string, 120, "Administrator %s has given all players weapon",PlayerInfo(playerid));
	        SendClientMessage(playerid, COLOR_ADMIN, string);
		}
	}
	return 1;
}



Re: help /givealllweapon - [ABK]Antonio - 17.02.2013

Take the message out of the loop


Re: help /givealllweapon - DerickClark - 17.02.2013

k.it's working Thanks.