Help command
#3

pawn Код:
CMD:giveallweapon(playerid, params[])
{
    new Weapon, Ammo, string[144], name[MAX_PLAYER_NAME], WeaponName[30];
    GetPlayerName(playerid, name, sizeof(name));
    if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, -1, "{FF0000}ERROR: {FFFFFF}You aren't authorized to use this command.");
    if(sscanf(params, "ii", Weapon, Ammo)) return SendClientMessage(playerid, -1, "{FF0000}USAGE: {FFFFFF}/GiveAllWeapon [Weapon ID] [Ammo]");
    if(Weapon > 46) return SendClientMessage(playerid, -1, "{FF0000}ERROR: {FFFFFF}Invalid Weapon. [1-46]");
    for(new i = 0; i < MAX_PLAYERS; i++)
    {
        if(IsPlayerConnected(i))
        {
            GivePlayerWeapon(i, Weapon, Ammo);
        }
    }
    GetWeaponName(Weapon, WeaponName, sizeof(WeaponName));
    format(string, sizeof(string), "{FF0000}[WEAPONS]: {FFFFFF}Administrator {FF0000}%s {FFFFFF}has gave to all players a {FF0000}%s (%i) with %i ammo.", name, WeaponName, Weapon, Ammo);
    SendClientMessageToAll(-1, string);
    return 1;
}
Reply


Messages In This Thread
Help command - by Fica22 - 30.01.2015, 13:44
Re: Help command - by HydraHumza - 30.01.2015, 13:47
Re: Help command - by HY - 30.01.2015, 13:55
Re: Help command - by CalvinC - 30.01.2015, 13:56
Re: Help command - by HydraHumza - 30.01.2015, 14:59
Re: Help command - by Fica22 - 01.02.2015, 14:35

Forum Jump:


Users browsing this thread: 1 Guest(s)