Client CmD
#4

Never use ShowPlayerDialog in a loop as it'll be called way too many times and also no need to loop twice:
PHP Code:
for (new 013c++)
{
    
GetPlayerWeaponData(idcweaponidammo);
    if (
weaponid != && ammo != 0)
    {
        
GetWeaponName(weaponidweapon24);
        
format(stringsizeof(string), "%sWeapons: %s  Ammo: %d\n"stringweaponammo);
        
count++;
    }
}
if(!
countSendClientMessage(playeridCOLOR_GREY"This player has no weapons!");
else 
ShowPlayerDialog(playerid,DIALOG_ADMINS,DIALOG_STYLE_MSGBOX,"Client",string,"Close","");
return 
1
PS: You declared "targetid" and you are trying to get the name. It has not been assigned to any value so it will always return the name of the player with ID 0.
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)