Problem with a command
#1

hi,
i wanted to make a command where a dialog pops up after entered /info.
No errors or sth but in game just nothing happens.
I hope u can help me.

pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{

{
   if(strcmp(cmdtext,"/info",true)==0)
   {
      ShowPlayerDialog(playerid, Gameinfodialogue, DIALOG_STYLE_MSGBOX, "Information about the gamemode", "My text", "Next", "Close");
      return 1;
   }
}


return 0;


}
regards.
Reply
#2

pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{

{ //Why is this here? - Remove it.
   if(strcmp(cmdtext,"/info",true)==0)
   {
      ShowPlayerDialog(playerid, Gameinfodialogue, DIALOG_STYLE_MSGBOX, "Information about the gamemode", "My text", "Next", "Close");
      return 1;
   }
} //Why is this here? - Remove it.


return 0;


}
It may be worth looking into dcmd or other methods by the way.
Reply
#3

Quote:
Originally Posted by funky1234
Посмотреть сообщение
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{

{ //Why is this here? - Remove it.
   if(strcmp(cmdtext,"/info",true)==0)
   {
      ShowPlayerDialog(playerid, Gameinfodialogue, DIALOG_STYLE_MSGBOX, "Information about the gamemode", "My text", "Next", "Close");
      return 1;
   }
} //Why is this here? - Remove it.


return 0;


}
It may be worth looking into dcmd or other methods by the way.
The extra { and } don't matter tbh
Reply
#4

hi,
yeah, the extra { and } doesnt matter. I made it cause it didnt work so i tried it with the extra }.
Any ideas why its not working?
Reply
#5

What's the define for 'Gameinfodialogue'?
Reply
#6

Quote:
Originally Posted by [FU]Victious
Посмотреть сообщение
What's the define for 'Gameinfodialogue'?
Unsure, but I do not think that will matter, unless it's a string, but since he doesn't get any errors or warnings, he should have a valid text.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)