04.09.2018, 10:01
Hi guys why every time i close the "Dialog", give me a Server Closed The Connection.
This is a code: stock ShowPlayerDamages(playerid, toid)
{
new
str[1000], str1[500], count = 0, name[MAX_PLAYER_NAME];
GetPlayerName(playerid, name, sizeof(name));
for(new id = 0; id < MAX_DAMAGES; id++)
{
if(DamageInfo[playerid][id][dmgDamage] != 0) count++;
}
if(count == 0) return ShowPlayerDialog(toid, DIALOG_DAMAGE, DIALOG_STYLE_LIST, name, "Non hai subito nessun danno...", "Chiudi", "");
else if(count > 0)
{
for(new id = 0; id < MAX_DAMAGES; id++)
{
if(DamageInfo[playerid][id][dmgDamage] != 0)
{
FORMATtr1("%d danno da %s al %s (Kevlarhit: %d) %d s fa\n", DamageInfo[playerid][id][dmgDamage], GetWeaponNameEx(DamageInfo[playerid][id][dmgWeapon]), GetBodypartName(DamageInfo[playerid][id][dmgBodypart]), DamageInfo[playerid][id][dmgKevlarhit], gettime() - DamageInfo[playerid][id][dmgSeconds]);
strcat(str, str1);
}
}
ShowPlayerDialog(toid, DIALOG_DAMAGE, DIALOG_STYLE_LIST, name, str, "Chiudi", "");
}
return 1;
}
This is a code: stock ShowPlayerDamages(playerid, toid)
{
new
str[1000], str1[500], count = 0, name[MAX_PLAYER_NAME];
GetPlayerName(playerid, name, sizeof(name));
for(new id = 0; id < MAX_DAMAGES; id++)
{
if(DamageInfo[playerid][id][dmgDamage] != 0) count++;
}
if(count == 0) return ShowPlayerDialog(toid, DIALOG_DAMAGE, DIALOG_STYLE_LIST, name, "Non hai subito nessun danno...", "Chiudi", "");
else if(count > 0)
{
for(new id = 0; id < MAX_DAMAGES; id++)
{
if(DamageInfo[playerid][id][dmgDamage] != 0)
{
FORMATtr1("%d danno da %s al %s (Kevlarhit: %d) %d s fa\n", DamageInfo[playerid][id][dmgDamage], GetWeaponNameEx(DamageInfo[playerid][id][dmgWeapon]), GetBodypartName(DamageInfo[playerid][id][dmgBodypart]), DamageInfo[playerid][id][dmgKevlarhit], gettime() - DamageInfo[playerid][id][dmgSeconds]);
strcat(str, str1);
}
}
ShowPlayerDialog(toid, DIALOG_DAMAGE, DIALOG_STYLE_LIST, name, str, "Chiudi", "");
}
return 1;
}