OnPlayerConnect Dialog?
#1

How would I make it so when a player connects, this lil' dialog popup comes up and says
you agree to follow rules and click "ok" or click "I don't agree" and it kicks/ closes server connection?
I've seen lots before and was wondering where I could get one.
Reply
#2

https://sampwiki.blast.hk/wiki/ShowPlayerDialog

https://sampwiki.blast.hk/wiki/OnDialogResponse

Or Search.
Reply
#3

lol, I don't understand whatever wiki says but I will eventually find out...
Reply
#4

Have a look at some other peoples Dialog scripts and learn from them.
Reply
#5

try this:
Код:
public OnPlayerConnect(playerid)
{
//...start
	ShowPlayerDialog(playerid,1234,DIALOG_STYLE_MSGBOX,"Title","Greetings\nWelcome to blablabla\nAccept or be kicked","YES","NO");
//...end
}
Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
//...start
  if(dialogid == 1234)
  {
    if(response) return SendClientMessage(playerid,0x55ff55ff,"Acces granted.");
    else SendClientMessage(playerid,0xff5555ff,"Access denied.");
    Kick(playerid);
  }
//...end
}
maybe you want to
Код:
#define DialogIdAtStart 1234
at top of your script, and use that DialogIdAtStart for checking, like "if(dialogid == DialogIdAtStart )"...
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)