Easy to fix
#1

I know i did something wrong here but i got no idea what..

PHP код:
public OnDialogResponse(playeriddialogidresponselistiteminputtext[])
{
      if(
dialogid == drules)
      {
        if(!
response) return Kick(playerid);
      }
      return 
1;
   }
  return 
1;//that line

error 010: invalid function or declaration

And here..
PHP код:
CMD:rules(playerid,params[])
{
  
ShowPlayerDialog(playerid2345drules,DIALOG_STYLE_MSGBOX"Rules of the server""No racism\nNo car parking/ramming on players\nNo hacking\nInsulting is not allowed\nBe nice\nRespect admins\nNEVER abuse bugs if you found one report on forums\nFor all the rules visit our forums. /site""Agree""I don't agree");
  return 
1;

error 035: argument type mismatch (argument 4)

and yes i did define drules. #define drules 2345
Reply
#2

For the first one, i don't think you need to return 1 twice.
pawn Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
      if(dialogid == drules)
      {
        if(!response) return Kick(playerid);
      }
   }
  return 1;
}
And i guess you meant the second to be this:
pawn Код:
CMD:rules(playerid,params[])
{
  ShowPlayerDialog(playerid, 2345, DIALOG_STYLE_MSGBOX, "Rules of the server", "No racism\nNo car parking/ramming on players\nNo hacking\nInsulting is not allowed\nBe nice\nRespect admins\nNEVER abuse bugs if you found one report on forums\nFor all the rules visit our forums. /site", "Agree", "I don't agree");
  return 1;
}
Reply
#3

FIXED.
Reply
#4

pawn Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
    if(dialogid == drules)
    {
        if(response)
        {
            // Code, if press Yes,
        }
        else
        {
            Kick(playerid);
        }
    }
    return 1;
}
EDIT: Didn't saw you edited your comment and fixed.
Reply


Forum Jump:


Users browsing this thread: 5 Guest(s)