SA-MP Forums Archive
how to create a dialog box with command - 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: how to create a dialog box with command (/showthread.php?tid=518299)



how to create a dialog box with command - PrinXe - 09.06.2014

hello sir i want to create a dialog box
in which these things were written
DriftGamemode in [Blue colour]
welcome to my server:::
-all accounts now reset
-new teleports are available
-new commands are also available
-we need good admins
-no bugs are found
-join us at forum.sa-mp



i want these to be written on a dialog box with a command also such as /info
when player will type /info then these message will appear
in dialog box .. can u give me the pwn code..?


Re: how to create a dialog box with command - Rittik - 09.06.2014

At the top of your gamemode write .
Код:
#define SERVER 200
Код:
CMD:info(playerid,params[])
{
ShowPlayerDialog(playerid,SERVER,DIALOG_STYLE_MSGBOX,"{3399FF}Drift Gamemode","welcome to my server:::\n-all accounts now reset\n-new teleports are available\n-new commands are also available\n-we need good admins\n-no bugs are found\n-join us at forum.sa-mp","Okay","");
return 1;
}
If you use strcmp:
Код:
if(strcmp(cmdtext,"/info",true)==0)
{
ShowPlayerDialog(playerid,SERVER,DIALOG_STYLE_MSGBOX,"{3399FF}Drift Gamemode","welcome to my server:::\n-all accounts now reset\n-new teleports are available\n-new commands are also available\n-we need good admins\n-no bugs are found\n-join us at forum.sa-mp","Okay","");
return 1;
}
EDIT: Added blue color and strcmp


Re: how to create a dialog box with command - PrinXe - 09.06.2014

C:\Users\vishal\Desktop\test.pwn(1816) : error 001: expected token: ",", but found "-string-"
C:\Users\vishal\Desktop\test.pwn(1816) : warning 215: expression has no effect
C:\Users\vishal\Desktop\test.pwn(1816) : error 001: expected token: ";", but found ")"
C:\Users\vishal\Desktop\test.pwn(1816) : error 029: invalid expression, assumed zero
C:\Users\vishal\Desktop\test.pwn(1816) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


4 Errors.
this showing this error


Re: how to create a dialog box with command - Rittik - 09.06.2014

Edited the above code ,Try again.


Re: how to create a dialog box with command - Runn3R - 09.06.2014

Dialogid doesn't need an definition it can be used without it.


Re: how to create a dialog box with command - Rittik - 09.06.2014

We don't get confused with other dialogids by using a definition.