Posts: 512
Threads: 121
Joined: Sep 2013
I want to make a message dialog for players who is first time in the server. So it would be like. OnplayerSpawn show the message dialog box and if they leave the server and then after they come back the message dialog box should not be showed again.
Posts: 954
Threads: 24
Joined: Jul 2012
Reputation:
0
Do you have any sort of registration system?
Posts: 512
Threads: 121
Joined: Sep 2013
Quote:
Originally Posted by StuartD
Do you have any sort of registration system?
|
Yes I do have, and I tried but the problem is that the registration system shows OnPlayerConnect. And the dialog ALWAYS show OnPlayerSpawn
Код:
new bool: gRegistered[MAX_PLAYERS] = {false, ...};
public OnPlayerConnect(playerid)
{
gRegistered[playerid] = true;
public OnPlayerDisconnect(playerid, reason)
{
gRegistered[playerid] = false;
public OnPlayerSpawn(playerid)
{
if(gRegistered[playerid])
{
//string
//bla bla bla
ShowPlayerDialog(playerid, DIALOG_WELCOME, DIALOG_STYLE_MSGBOX, "Greetings!", str, "Confirm", "");
}
Edit: there is no problem in registration system under onplayerconnect