So sollte das funktionieren, habs ein wenig umgescripted.... :P:
if(strcmp(cmd,"/checkweapons",true)==0)
{
if(IsPlayerInFrakt(playerid,1)||IsPlayerInFrakt(playerid,6)||IsPlayerAnAdmin(playerid,3))
{
tmp = strtok(cmdtext, idx);
if(!tmp[0])return SendClientMessage(playerid,COLOR_WHITE,"INFO: /checkweapons [id]");
new playa = ReturnUser(tmp);
new string[1024];
new weapon[512];
new weapon1[512];
new weapon2[512];
new weapon3[512];
new weapon4[512];
new weapon5[512];
new weapon6[512];
new weapon7[512];
new weapon8[512];
new weapon9[512];
new weapon10[512];
new weapon11[512];
new weapon12[512];
new waffe1, waffe2, waffe3, waffe4, waffe5, waffe6, waffe7, waffe8, waffe9, waffe10, waffe11, waffe12, waffe13;
new ammo1, ammo2, ammo3, ammo4, ammo5, ammo6, ammo7, ammo8, ammo9, ammo10, ammo11, ammo12, ammo13;
GetPlayerWeaponData(playa, 0, waffe1,ammo1);
GetPlayerWeaponData(playa, 1, waffe2,ammo2);
GetPlayerWeaponData(playa, 2, waffe3,ammo3);
GetPlayerWeaponData(playa, 3, waffe4,ammo4);
GetPlayerWeaponData(playa, 4, waffe5,ammo5);
GetPlayerWeaponData(playa, 5, waffe6,ammo6);
GetPlayerWeaponData(playa, 6, waffe7,ammo7);
GetPlayerWeaponData(playa, 7, waffe8,ammo8);
GetPlayerWeaponData(playa, 8, waffe9,ammo9);
GetPlayerWeaponData(playa, 9, waffe10,ammo10);
GetPlayerWeaponData(playa, 10, waffe11,ammo11);
GetPlayerWeaponData(playa, 11, waffe12,ammo12);
GetPlayerWeaponData(playa, 12, waffe13,ammo13);
GetWeaponName(waffe,weapon,sizeof(weapon));
GetWeaponName(waffe1,weapon1,sizeof(weapon1));
GetWeaponName(waffe2,weapon2,sizeof(weapon2));
GetWeaponName(waffe3,weapon3,sizeof(weapon3));
GetWeaponName(waffe4,weapon4,sizeof(weapon4));
GetWeaponName(waffe5,weapon5,sizeof(weapon5));
GetWeaponName(waffe6,weapon6,sizeof(weapon6));
GetWeaponName(waffe7,weapon7,sizeof(weapon7));
GetWeaponName(waffe8,weapon8,sizeof(weapon8));
GetWeaponName(waffe9,weapon9,sizeof(weapon9));
GetWeaponName(waffe10,weapon10,sizeof(weapon10));
GetWeaponName(waffe11,weapon11,sizeof(weapon11));
GetWeaponName(waffe12,weapon12,sizeof(weapon12));
format(string,sizeof(string),"%s hat folgende Waffen:\n%s Munition: %d\n%s Munition: %d\n%s Munition: %d\n%s Munition: %d\n%s Munition: %d\n%s Munition: %d\n%s Munition: %d\n%s Munition: %d\n%s Munition: %d\n%s Munition: %d\n%s Munition: %d\n%s Munition: %d\n%s Munition: %d"
,SpielerName(playa),weapon,ammo1,weapon1,ammo2,weapon2,ammo3,weapon3,ammo4,weapon4,ammo5,weapon5,ammo6,weapon6,ammo7,weapon7,ammo8,weapon8,ammo9,weapon9,ammo10,weapon10,ammo11,weapon11,ammo12,weapon12,ammo13);
ShowPlayerDialog(playerid,DIALOG_INFO,DIALOG_STYLE_MSGBOX,"Checkweapons",string,"OK","Schließen");
return 1;
}
return 1;
}
Viel Spaß damit!
Wenn noch Fragen gibt, melde dich.