first time register show server rules - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: first time register show server rules (
/showthread.php?tid=471699)
first time register show server rules -
kbalor - 24.10.2013
Hi I would like to make a dialog message box of rules, if he first time register to the server. It should appear under onplayerspawn.
Looking forwards!
Re: first time register show server rules -
-Prodigy- - 24.10.2013
There are couple of ways to do this, you can try the following:
pawn Код:
//On top of your script
new bool: gRegistered[MAX_PLAYERS] = {false, ...};
// When they connect
gRegistered[playerid] = false;
// When they register
gRegistered[playerid] = true;
// When they disconnect
gRegistered[playerid] = false;
// OnSpawn
if(gRegistered[playerid])
{
ShowPlayerDialog(playerid, 1337, DIALOG_STYLE_MSGBOX, "Rules", "Rules", "OK", "Close");
}
Re: first time register show server rules -
kbalor - 24.10.2013
Quote:
Originally Posted by -Prodigy-
There are couple of ways to do this, you can try the following:
pawn Код:
//On top of your script new bool: gRegistered[MAX_PLAYERS] = {false, ...};
// When they connect gRegistered[playerid] = false;
// When they register gRegistered[playerid] = true;
// When they disconnect gRegistered[playerid] = false;
// OnSpawn if(gRegistered[playerid]) { ShowPlayerDialog(playerid, 1337, DIALOG_STYLE_MSGBOX, "Rules", "Rules", "OK", "Close"); }
|
+rep working like a charm sweet!