10.04.2011, 18:58
Hello, I was wondering if I could make a command like /rules and then will pop up a little windows with the rules. Nothing fancy, just plain.
How is that made?
How is that made?
if(strcmp(cmd, "/command", true) == 0) { ShowPlayerDialog(playerid,DIALOG_ID,DIALOG_STYLE,"Rules","1. You must respect the rules\n2.You can't do anything without read the rules...","button1","button2"); return 1; }
Код:
if(strcmp(cmd, "/command", true) == 0) { ShowPlayerDialog(playerid,DIALOG_ID,DIALOG_STYLE,"Rules","1. You must respect the rules\n2.You can't do anything without read the rules...","button1","button2"); return 1; } - Things that may be helpful. • https://sampwiki.blast.hk/wiki/ShowPlayerDialog • https://sampwiki.blast.hk/wiki/OnDialogResponse • https://sampwiki.blast.hk/wiki/Dialog_Styles |
public OnPlayerCommandText(playerid,cmdtext[]) { new cmd[256]; if(strcmp(cmd, "/rules", true) == 0) { ShowPlayerDialog(playerid,DIALOG_ID,DIALOG_STYLE,"Rules","1. You must respect the rules\n2.You can't do anything without read the rules...","button1","button2"); return 1; } return 1; }
Add it under OnPlayerCommandText(playerid,cmdtext[]).
Like this: Код:
public OnPlayerCommandText(playerid,cmdtext[]) { new cmd[256]; if(strcmp(cmd, "/rules", true) == 0) { ShowPlayerDialog(playerid,DIALOG_ID,DIALOG_STYLE,"Rules","1. You must respect the rules\n2.You can't do anything without read the rules...","button1","button2"); return 1; } return 1; } |
public OnPlayerCommandText(playerid,cmdtext[]) { new cmd[256]; if(strcmp(cmd, "/rules", true) == 0) { ShowPlayerDialog(playerid,DIALOG_ID,DIALOG_STYLE,"Rules","1. You must respect the rules\n2.You can't do anything without read the rules...","button1","button2"); return 1; } return 0; }
And you don't need to color your text like that, as its a pain in the ass. Use [ pawn] [/ pawn] tags.
|
C:\Users\Aрalsteinn\Desktop\Mine\filterscripts\rul ez.pwn(94) : error 017: undefined symbol "DIALOG_ID"
? |
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
CMD:rules(playerid, params[]) // zcmd by Zeex
{
return something;
}