help /givealllweapon
#1

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;
}
Reply
#2

Take the message out of the loop
Reply
#3

k.it's working Thanks.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)