How To fix This
#1

Can anyBody Tell Me How to fix This Problems



Dialog Response
Код:
 if(dialogid == DIALOG_RULES) (28995)
    {
        if(response) (28997)
        {
            SendClientMessage(playerid, COLOR_GREEN, "Thank you for agreeing to the server rules!");
        }
       else (29001)
        {
			format(string,sizeof(string),"{00FF40}%s {FAF623}has been kicked by Server {FAF623}[reason: Disagree Rules] ",playername); SendClieSendClientMessageToAll(COLOR_RED,string);
            SendClientMessage(Playerid, COLOR_RED, "You've Been Kicked By server Because Of disagreeing Rules ");
            Kick(playerid); (29005)
            
        } (29007)
        return 1; (29008)
    }

    return 0; (29011) 
}
The CMD:
Код:
CMD:rules(playerid, params[])
{
ShowPlayerDialog(playerid, DIALOG_RULES, DIALOG_STYLE_MSGBOX, "Server Rules", "- No Cheating\n- No Spamming\n- Respect Admins\n\nDo you agree to these rules?", "Yes", "No");
}
Reply
#2

Where is your problems (errors/warnings)?
Reply
#3

Quote:
Originally Posted by VVWVV
Посмотреть сообщение
Where is your problems (errors/warnings)?



Sorry, I forgot To Upload i edited The Post
Reply
#4

what is
PHP код:
SendClieSendClientMessageToAll(COLOR_RED,string); 
change it
to
PHP код:
 SendClientMessageToAll(COLOR_RED,string); 
and you may have some brace issue which made it in another branch or outside the dialog call back
and its playerid not Playerid
PHP код:
SendClientMessage(PlayeridCOLOR_RED"You've Been Kicked By server Because Of disagreeing Rules "); 
change it to
PHP код:
SendClientMessage(playeridCOLOR_RED"You've Been Kicked By server Because Of disagreeing Rules "); 
Reply
#5

Quote:
Originally Posted by Sreyas
Посмотреть сообщение
what is
PHP код:
SendClieSendClientMessageToAll(COLOR_RED,string); 
change it
to
PHP код:
 SendClientMessageToAll(COLOR_RED,string); 
and you may have some brace issue which made it in another branch or outside the dialog call back
and its playerid not Playerid
PHP код:
SendClientMessage(PlayeridCOLOR_RED"You've Been Kicked By server Because Of disagreeing Rules "); 
change it to
PHP код:
SendClientMessage(playeridCOLOR_RED"You've Been Kicked By server Because Of disagreeing Rules "); 
Fixed But same Problems Still

Reply
#6

as i told in my previous post you might have some bracket issue most probably you put an unneccessary } above this code and that made it out side of ondialogresponse
to save your time scan your code with this software https://sampforum.blast.hk/showthread.php?tid=322839
and find that unneccessary closing bracket and remove it
Reply
#7

Thank You Sreyas
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)