Need Help ASAP With Dialogs +REP Awaiting - 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: Need Help ASAP With Dialogs +REP Awaiting (
/showthread.php?tid=519834)
Need Help ASAP With Dialogs +REP Awaiting -
Douner - 16.06.2014
Hello
I have a Big Deal Here its very simple
PHP код:
stock ClassDialog(playerid)
{
new Stringg[600];
format(Stringg, sizeof(Stringg),""cred"Musketter - Rank 0\n"cblue"Smugller - Rank 0\n"cyellow"Pirate- Rank 2\n"ccolor"Sky Walker - Rank 6\n"ccolor"Engineer - "ccolor2"Rank 5\n"ccolor"JetTrooper - "ccolor2"Rank 6\n"ccolor"Support - "ccolor2"Rank 5\n"ccolor"Scout - "ccolor2"Rank 5\n"ccolor"Spy - "ccolor2"Rank 7\n"ccolor"Donor - "ccolor2"For Donators only\n"ccolor"Builders - "ccolor2"Rank 3\n"cblue"God Father");
ShowPlayerDialog(playerid, CLASS_DIALOG, DIALOG_STYLE_LIST, "Class Selection",Stringg,"Select","Back");
return 1;
}
sorry i cant post full code but ill let u know that colors cred , cblue etc etc are define and in onDialogResponse there are 11 cases
PHP код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(strfind(inputtext,"%",true) != -1) return SendClientMessage(playerid, RED," ");
if(dialogid == CLASS_DIALOG)
{
if(!response)
{
}
else if(response)
{
switch(listitem)
{
case 0:
{
Class[playerid] = Musketer;
SendClientMessage(playerid, -1,"You have chosen the Musketter class");
SendClientMessage(playerid, -1,"BONUS: No extra bonus with this class");
SpawnPlayer(playerid);
UpdateLabelText(playerid);
}
case 1:
{
" "
}
..........
case 11:
{
" "
}
}
}
}
Over all the Code is perfect but if I add \n"cblue"GodFather" my 11th option of the dialog then while compiling it will crash
And if i Delete \n"cblue"GodFather" I tried my best to fix it when i failed im here , Again the problem is if i add an 11 th case it wont crash in ondialogresponse but if i add its 11th option in my dialog it will .
i can post the whole code if u want but it wont make any difference .
Sorry for my Bad English
Re: Need Help ASAP With Dialogs +REP Awaiting -
superrobot48 - 16.06.2014
It may be because the string for a dialog has reached its maximum length
Re: Need Help ASAP With Dialogs +REP Awaiting -
Douner - 16.06.2014
ya i know it but I need help on How to Fix it
Re: Need Help ASAP With Dialogs +REP Awaiting -
superrobot48 - 16.06.2014
Just Create a new dialog for the balance and add a item like next or something
Re: Need Help ASAP With Dialogs +REP Awaiting -
RenovanZ - 16.06.2014
Learn strcat
Re: Need Help ASAP With Dialogs +REP Awaiting -
Douner - 16.06.2014
OK What a Waste of Posting I just Reduced the Characters.
Thank you for commenting Superrobot
+Reputed