Not work!
#1

Hi I've creating a command for admins. but when I type /giveallweapon then type the Weapon ID + Ammo They are sending only the message but they did not give the players a weapon why?

PHP код:
CMD:giveallweapon(playeridparams[])
{
    if(
PlayerInfo[playerid][pAdmin] >= && 5)
    {
        new 
string[256],weaponid,ammo;
        new 
weaponName[32];
        if(
sscanf(params"uii"weaponidammo)) return SendClientMessage(playeridCOLOR_YELLOW"USAGE: /giveallweapon [Weapon ID] [Amount of Ammo]");
        {
            if(
PlayerInfo[playerid][pAdmin] <= && 2) return SendClientMessage(playerid, -1"{FF0000}Error: {FFFFFF}This command for admins +level 2.");
            
GetWeaponName(weaponidweaponNamesizeof weaponName);
            
GivePlayerWeapon(playeridweaponidammo);
            
format(string,sizeof(string),"{A82FED}[Weapon Given]: {FFFFFF}An Admin {A82FED}%s(%d) {FFFFFF}has given All players a {A82FED}%s {FFFFFF}with {A82FED}%d {FFFFFF}rounds of Ammo."PlayerName(playerid), playeridweaponNameammo);
            
SendClientMessageToAll(COLOR_ORANGE,string);
            
format(stringsizeof(string), "An Admin %s(%d) has Giving All players a %s with %d rounds of Ammo. (/giveallweapon)!"PlayerName(playerid), playeridweaponName,ammo);
            
SendToAdmins(COLOR_GREY,string);
        }
    }
    else
        
SendClientMessage(playerid, -1"{FF0000}Error: {FFFFFF}Wrong command!! {FF0000}Check availables commands from here `{FFFFFF}/cmds{FF0000}`.");
    return 
1;

Reply


Messages In This Thread
Not work! - by Thanks - 05.08.2018, 20:07
Re: Not work! - by DBZdabIt3Bro7 - 05.08.2018, 20:12
Re: Not work! - by Thanks - 05.08.2018, 20:49
Re: Not work! - by DBZdabIt3Bro7 - 05.08.2018, 20:53
Re: Not work! - by Thanks - 05.08.2018, 21:35
Re: Not work! - by DBZdabIt3Bro7 - 05.08.2018, 21:37

Forum Jump:


Users browsing this thread: 1 Guest(s)