#1

Hi

Can anyone help me with this

Can anyone help me when a player connects for the first time a dialog appears with the rules instead of typing /rules

Thanks
Reply
#2

pawn Код:
OnPlayerConnect( playerid )
{
    ShowPlayerDialog( playerid, 1, DIALOG_STYLE_MSGBOX, #Rules, #My server rules are: ... , #Ok, #Quit );
    return true;
}
https://sampwiki.blast.hk/wiki/OnPlayerConnect
https://sampwiki.blast.hk/wiki/ShowPlayerDialog
Reply
#3

Well, assuming you have a registration system you will need to make a player 'stat' called First logged... Then under onplayerconnect, you will need to have it check wether the stat is true or false, if it is true, then shows the dialog and sets it to false, if it is false it just carries on as normal.

Also, Smit is wrong as that will show every time someone logs in + The code is wrong anyway.
Reply
#4

PHP код:
OnPlayerConnect(playerid)
{
    
ShowPlayerDialog(playerid1DIALOG_STYLE_MSGBOX"Rules""You must abide the following rules: [Type your rules, and use /n to indent a line""Done""Quit");
    return 
1;

What's your registration variable ?, in my case, it'll show every single time you connect.
Reply
#5

Quote:
Originally Posted by ******
Посмотреть сообщение
How do you know when a player has never connected before, rather than just not yet logged in?
PHP код:
OnPlayerConnect(playerid)
{
  if(
IsPlayerConnected(playerid))
    {
    
ShowPlayerDialog(playerid1DIALOG_STYLE_MSGBOX"Rules""You must abide the following rules: [Type your rules, and use /n to indent a line""Done""Quit");
    return 
1;

Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)