how to create a dialog box with command
#1

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..?
Reply
#2

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
Reply
#3

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
Reply
#4

Edited the above code ,Try again.
Reply
#5

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

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


Forum Jump:


Users browsing this thread: 1 Guest(s)