27.05.2016, 14:56
remove " [ " from DisplayDamages
For Example
For Example
Код:
DisplayDamages(playerid, giveplayerid)
{
new playername[MAX_PLAYER_NAME], title[45];
GetPlayerName(giveplayerid, playername, sizeof(playername));
format(title, sizeof(title), "%s's weapon damages", playername);
if(!CountDamages(giveplayerid)) return ShowPlayerDialog(playerid, 65000, DIALOG_STYLE_LIST, title, "There are no damages to display...", ">>>", "");
new gText[1000], fstr[45];
for(new i = 0; i < MAX_BODY_PARTS; i++)
{
for(new z = 0; z < MAX_WEAPONS; z++)
{
if(!Damage[giveplayerid][i][z]) continue;
switch(i)
{
case 0 .. 15: format(fstr, sizeof(fstr), "%d hits from %s to the %s\n", Damage[giveplayerid][i][z], GetWeaponNameEx(z), GetBodyPartName(i + 3));
case 54: format(fstr, sizeof(fstr), "%d falls to the %s\n", Damage[giveplayerid][i][z], GetBodyPartName(i));
default: format(fstr, sizeof(fstr), "%d bullets from %s to the %s\n", Damage[giveplayerid][i][z], GetWeaponNameEx(z), GetBodyPartName(i + 3));
}
strcat(gText, fstr);
}
}
ShowPlayerDialog(playerid, 65000, DIALOG_STYLE_LIST, title, gText, "Close", "");
return 1;
}

