SA-MP Forums Archive
Big problem help pls - 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: Big problem help pls (/showthread.php?tid=658351)



Big problem help pls - kevi11 - 02.09.2018

Hi guys i just translate vehicle advance system all okay.

when i write the cmd /vhelp (in my language /vaiuto)


All the commands appear normally but as soon as I click ok to exit the dialog, it tells me server closed the connection.


Another problem is when I make that command I get the list of commands for the players, and not for the admin.




Script:

CMD:vaiuto(playerid, params[])
{
new info[512];
strcat(info, "/v /baglialio /cacciav /vcacciatutti\n", sizeof(info));
strcat(info, "/sicura /vallarme /rifornisci /bagagliaio /eliminamodifiche /vendiv /daichiave /tracciaveicolo\n", sizeof(info));
if(IsAdmin(playerid, 1))
{
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, DIALOG_NONE, DIALOG_STYLE_MSGBOX, "Sistema veicoli", info, "OK", "");
return 1;
}


Re: Big problem help pls - iLearner - 02.09.2018

show us the code under "DIALOG_NONE" (should be under callback OnDialogResponse).


Re: Big problem help pls - kevi11 - 02.09.2018

Guys anyone can help me pls?


I just write this on DialogResponse

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


when i click Ok for close the dialog (on my server) the server crash = server closed the connection


Re: Big problem help pls - Sew_Sumi - 02.09.2018

Why use DIALOG_NONE? Why not use that method properly and give it a proper meaningful name rather than using something that could possibly be reserved internally.


Re: Big problem help pls - kevi11 - 02.09.2018

I just downloaded this script, and translated.

I changed the controls and things,
but as soon as I go into the game and make that command crashes. How can I solve I'm a newbie I do not know where to get my hands on this script
(I only know the right one)


Re: Big problem help pls - Shinja - 02.09.2018

Change the dialog id to a new NON EXISTING id
PHP код:
ShowPlayerDialog(playerid123DIALOG_STYLE_MSGBOX"Sistema veicoli"info"OK"""); // EX 123 if its not already used 



Re: Big problem help pls - kevi11 - 02.09.2018

Don't go, the server crash when i click Ok for closing the dialog ;(.


Re: Big problem help pls - Shinja - 02.09.2018

Use crashdetect and show server logs after server crash


Re: Big problem help pls - kevi11 - 02.09.2018

K i will try after.


Re: Big problem help pls - kevi11 - 02.09.2018

Oh, i think the server doesn't crash, is the client...