SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Scripting Help

Reply
 
Thread Tools Display Modes
Old 03/01/2020, 02:29 PM   #1
C0stin
Little Clucker
 
Join Date: Dec 2019
Posts: 20
Reputation: 0
Default ShowPlayerDialog

Command:

CMD:tog(playerid, params[]) {
new szDialog[1024], szDialog2[1024];
strcat(szDialog2, "Optiune\tStatus\n");
if(PlayerInfo[playerid][pNewbieEnabled] == 0) format(szDialog, 1024, "Newbie chat\t{3BBF0B}activat\n");
else format(szDialog, 1024, "Newbie chat\t{FF0000}dezactivat\n");
strcat(szDialog2, szDialog);
if(gFam[playerid] == 0) format(szDialog, 1024, "Faction Chat\t{3BBF0B}activat\n");
else format(szDialog, 1024, "Faction Chat\t{FF0000}dezactivat\n");
strcat(szDialog2, szDialog);
if(togfind[playerid] == 0) format(szDialog, 1024, "Find\t{3BBF0B}activat\n");
else format(szDialog, 1024, "Find\t{FF0000}dezactivat\n");
strcat(szDialog2, szDialog);
if(WTToggle[playerid] == false) format(szDialog, 1024, "Walkie Talkie\t{3BBF0B}activat\n");
else format(szDialog, 1024, "Walkie Talkie\t{FF0000}dezactivat\n");
strcat(szDialog2, szDialog);
if(gNews[playerid] == 0) format(szDialog, 1024, "News\t{3BBF0B}activat\n");
else format(szDialog, 1024, "News\t{FF0000}dezactivat\n");
strcat(szDialog2, szDialog);
if(HidePM[playerid] == 0) format(szDialog, 1024, "Whisper\t{3BBF0B}activat\n");
else format(szDialog, 1024, "Whisper\t{FF0000}dezactivat\n");
strcat(szDialog2, szDialog);
if(toglc[playerid] == 0) format(szDialog, 1024, "Leader Chat\t{3BBF0B}activat\n");
else format(szDialog, 1024, "Leader Chat\t{FF0000}dezactivat\n");
strcat(szDialog2, szDialog);
}
ShowPlayerDialog(playerid, DIALOG_TOG, DIALOG_STYLE_TABLIST_HEADERS, "Tog", szDialog2, "Selectare", "Anulare");
}

Error: error 021: symbol already defined: "ShowPlayerDialog"
C0stin is offline   Reply With Quote
Old 03/01/2020, 05:51 PM   #2
C0stin
Little Clucker
 
Join Date: Dec 2019
Posts: 20
Reputation: 0
Default Re: ShowPlayerDialog

help ?
C0stin is offline   Reply With Quote
Old 03/01/2020, 06:06 PM   #3
cipi89
Little Clucker
 
Join Date: Sep 2018
Posts: 30
Reputation: 3
Default Re: ShowPlayerDialog

You closed the bracket before you wrote
Code:
ShowPlayerDialog(playerid, DIALOG_TOG, DIALOG_STYLE_TABLIST_HEADERS, "Tog", szDialog2, "Selectare", "Anulare");
change your code to this:
Code:
CMD:tog(playerid, params[]) {
new szDialog[1024], szDialog2[1024];
strcat(szDialog2, "Optiune\tStatus\n");
if(PlayerInfo[playerid][pNewbieEnabled] == 0) format(szDialog, 1024, "Newbie chat\t{3BBF0B}activat\n");
else format(szDialog, 1024, "Newbie chat\t{FF0000}dezactivat\n");
strcat(szDialog2, szDialog);
if(gFam[playerid] == 0) format(szDialog, 1024, "Faction Chat\t{3BBF0B}activat\n");
else format(szDialog, 1024, "Faction Chat\t{FF0000}dezactivat\n");
strcat(szDialog2, szDialog);
if(togfind[playerid] == 0) format(szDialog, 1024, "Find\t{3BBF0B}activat\n");
else format(szDialog, 1024, "Find\t{FF0000}dezactivat\n");
strcat(szDialog2, szDialog);
if(WTToggle[playerid] == false) format(szDialog, 1024, "Walkie Talkie\t{3BBF0B}activat\n");
else format(szDialog, 1024, "Walkie Talkie\t{FF0000}dezactivat\n");
strcat(szDialog2, szDialog);
if(gNews[playerid] == 0) format(szDialog, 1024, "News\t{3BBF0B}activat\n");
else format(szDialog, 1024, "News\t{FF0000}dezactivat\n");
strcat(szDialog2, szDialog);
if(HidePM[playerid] == 0) format(szDialog, 1024, "Whisper\t{3BBF0B}activat\n");
else format(szDialog, 1024, "Whisper\t{FF0000}dezactivat\n");
strcat(szDialog2, szDialog);
if(toglc[playerid] == 0) format(szDialog, 1024, "Leader Chat\t{3BBF0B}activat\n");
else format(szDialog, 1024, "Leader Chat\t{FF0000}dezactivat\n");
strcat(szDialog2, szDialog);
ShowPlayerDialog(playerid, DIALOG_TOG, DIALOG_STYLE_TABLIST_HEADERS, "Tog", szDialog2, "Selectare", "Anulare");
}
cipi89 is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
ShowPlayerDialog Wizardking Scripting Help 3 23/01/2014 08:48 AM
ShowPlayerDialog .. Renks554 Help Archive 9 06/05/2011 03:14 PM
ShowPlayerDialog help me @Sakura Help Archive 1 04/05/2011 01:46 PM


All times are GMT. The time now is 02:24 AM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.