17.02.2013, 02:48
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; }