SA-MP Forums Archive
Server Closed The Connection pls help - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Server Closed The Connection pls help (/showthread.php?tid=658375)



Server Closed The Connection pls help - kevi11 - 02.09.2018

Hi guys, I'm from this afternoon to look for a solution to my problem, in practice just enter in game and I / vhelp for the machine controls, exit the dialog that explains the commands etc., but just click Confirm or exit, I go out written Server Closed The Connection.
The server is always on and has no problems.



CMD:vaiuto(playerid, params[])
{
new info[512];
strcat(info, "/v /rimorchia /cacciav /vcacciatutti\n", sizeof(info));
strcat(info, "/sicura /vallarme /rifornisci /bagagliaio /eliminamodifiche /vendiv /daichiave /tracciaveicolo\n", sizeof(info));
if(IsAdmin(playerid))
{
strcat(info, "/aggiungiv /editav /settabenzina /vinutilizzabile (respawntutto) /respawnav (respawnaquestamacchina)\n", sizeof(info));
strcat(info, "/aggiungiconcessionaria /eliminaconcessionaria /fix /spostaconcessionaria /gotoconcessionaria\n", sizeof(info));
strcat(info, "/aggiungibenzinaio /eliminabenzinaio /spostabenzinaio /gotobenzinaio", sizeof(info));
}
ShowPlayerDialog(playerid, 12345, DIALOG_STYLE_MSGBOX, "Sistema veicoli", info, "OK", "Esci");
return 1;
}

PS:
I have already tried to change where 12345 is written but nothing.
At that point there was DIALOG_NONE before but it did not go the same


On‌DialogResponse =

if(dialogid == DIALOG_NONE)
{
ShowDialog(playerid, DialogReturn[playerid]);
return 1;
}



In practice, the command works but as soon as I close the dialog in game, it tells me server closed the connection.


Re: Server Closed The Connection pls help - iHollyZinhO - 02.09.2018

Remove this code from OnDialogResponse and check again:
Код:
if(dialogid == DIALOG_NONE)
{
ShowDialog(playerid, DialogReturn[playerid]);
return 1;
}



Re: Server Closed The Connection pls help - kevi11 - 02.09.2018

Nope, don't go ;(