Client CmD
#1

PHP Code:
CMD:client(playeridparams[])
{
    if(
pInfo[playerid][pAdminLevel] >= 1)
    {
        new 
AdminDutyMsg[128], targetid;
        
format(AdminDutyMsgsizeof(AdminDutyMsg), ""COL_WHITE"["COL_CADMIN"ADMIN"COL_WHITE"]"COL_CGREY" %s > client > %s" ,PlayerName(playerid), PlayerName(targetid));
        
SendMessageToAllAduty(-1,AdminDutyMsg);
        new 
count 0;
        new 
ammoweaponidweapon[24], string[128], id;
        if(!
sscanf(params"u"id))
        {
                for (new 
013c++)
                {
                    
GetPlayerWeaponData(idcweaponidammo);
                    if (
weaponid != && ammo != 0)
                    {
                        
count++;
                    }
                }
                
SendClientMessage(playeridCOLOR_ORANGE"||=============WEAPONS AND AMMO===========||");
                if(
count 0)
                {
                    for (new 
013c++)
                    {
                        
GetPlayerWeaponData(idcweaponidammo);
                        if (
weaponid != && ammo != 0)
                        {
                            
GetWeaponName(weaponidweapon24);
                            
format(stringsizeof(string), "Weapons: %s  Ammo: %d\n"weaponammo);
                            
ShowPlayerDialog(playerid,DIALOG_ADMINS,DIALOG_STYLE_MSGBOX,"Client",string,"Close","");
                        }
                    }
                }
                else
                {
                    
SendClientMessage(playeridCOLOR_GREY"This player has no weapons!");
                }
                return 
1;
        }
        else return 
SendClientMessage(playeridCOLOR_GREY"USAGE: /cw [ID]");
    }
    else return 
SendClientMessage(playeridCOLOR_GREY"You are not allowed to do this");

Hello

This command was work sucsessfull
But i am try to change it from SendClientMessage To Dialog
I want to get weapons i dialog

But it gave mee just the first Weapon and ammo

Thanks
Reply


Messages In This Thread
Client CmD - by arlindi - 29.04.2015, 20:30
Re: Client CmD [+REP] - by zeax - 29.04.2015, 20:36
Re: Client CmD - by arlindi - 29.04.2015, 20:39
Re: Client CmD - by Konstantinos - 29.04.2015, 20:39
Re: Client CmD - by arlindi - 29.04.2015, 20:46
Re: Client CmD - by arlindi - 29.04.2015, 21:11
Re: Client CmD - by arlindi - 30.04.2015, 11:28
Re: Client CmD - by arlindi - 30.04.2015, 17:36

Forum Jump:


Users browsing this thread: 1 Guest(s)