Help command
#2

PHP код:
CMD:giveallweapon(playerid,params[]) {
    if(
pInfo[playerid][pLevel] >= 4) {
    new 
Weapammoweaponname[50] , string[128];
        if(
sscanf(params,"ii",Weapammo)) return SendClientMessage(playerid,red,"Usage: /giveallweapon [weapon name] [ammo]");
        if(
Weap == 38 || Weap == 36) return SendClientMessage(playerid,red,"You are not allowed to give these weapons");
           for(new 
0MAX_PLAYERSi++) {
        if(
IsPlayerConnected(i))
        {
            
GivePlayerWeapon(i,Weap,ammo) && PlayerPlaySound(i1057,0.0,0.0,0.0);
        }
        }
        
GetWeaponName(Weapweaponnamesizeof(weaponname));
        
format(string,sizeof(string),"Administrator %s has given all players weapon %s (%d) with %d round of ammo.",GetName(playerid),weaponname,Weap,ammo);
        
SendClientMessageToAll(blue,string);
    }
    else 
SendClientMessage(playerid,red,"You are not a high enough level to use this command");
    return 
1;

Try this maybe it work
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)