|
|
#1 |
|
Little Clucker
![]() Join Date: Aug 2012
Posts: 17
Reputation: 0
|
Well guys, I scripted a Rules Dialog.
But OnDialogResponse doesnt work for me. I wanted to make like: If player response = SendClientMessage "Thanks for accepting the rules" If player response == 0 SendClientMessgae "You declined the rules, kicked!" Kick(playerid) (This is just an example!) Can someone make this possible for version 3.0e? Code:
public OnPlayerConnect(playerid)
{
ShowPlayerDialog(playerid, KickBox, DIALOG_STYLE_MSGBOX, "{000080}Server Rules", "{FF0000}Rule 1: No Hacking\n\n{FF0000}Rule 2: No Imature Behavioure\n\n{FF0000}Rule 3: No Racism\n\n{FF0000}Rule 4: Respect all players\n\n{FF0000}Rule 5: Do not be abusive to Admins or KICK/BAN\n\n{FF0000}Rule 6: Have Fun!\n\n{D9FF00}Decline our rules you will be KICKED!", "Accept", "Decline");
return 1;
}
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(dialogid == KickBox)
{
if(response)
{
SendClientMessage(playerid,COLOR_YELLOW, "You Accepted our rules Have fun!");
}
else
{
SendClientMessage(playerid,COLOR_RED, "You Declined and have been kicked Goodbye!");
Kick(playerid);
}
return 1;
}
return 0;
}
|
|
|
|
|
|
#2 |
|
Little Clucker
![]() Join Date: Jul 2012
Posts: 38
Reputation: 3
|
Dialogs work in 0.3e...post your code for your dialog response so we can help you.
|
|
|
|
|
|
#3 |
|
Little Clucker
![]() Join Date: Aug 2012
Posts: 17
Reputation: 0
|
I edited. Take a look.
|
|
|
|
|
|
#4 |
|
Gangsta
![]() ![]() ![]() ![]() Join Date: Mar 2012
Location: Gurgaon,India
Posts: 743
Reputation: 137
|
pawn Code:
|
|
|
|
|
|
#5 |
|
Little Clucker
![]() Join Date: Aug 2012
Posts: 17
Reputation: 0
|
It's not seding the SendClientMessage and not kicking... Don't know why. If someone knows, please post here.
|
|
|
|
|
|
#6 |
|
Big Clucker
![]() ![]() Join Date: Jul 2010
Posts: 112
Reputation: 4
|
Here's my code:
It works 100% for me. pawn Code:
|
|
|
|
|
|
#7 |
|
High-roller
![]() ![]() ![]() ![]() ![]() Join Date: Sep 2010
Location: Canada
Posts: 1,077
Reputation: 63
|
Probably because you didn't return a value. Try this:
pawn Code:
|
|
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Dialog Rules | jonnyboy | Scripting Help | 8 | 14/04/2012 04:35 PM |
| help with /rules dialog | [LHT]Bally | Help Archive | 3 | 15/08/2011 12:13 PM |
| Help with a /rules dialog | thimo | Help Archive | 8 | 28/01/2011 12:57 PM |
| Rules dialog | BlackRock | Help Archive | 2 | 06/07/2010 10:32 AM |