login dialog - 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)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: login dialog (
/showthread.php?tid=148738)
login dialog -
billiout - 18.05.2010
i want to make a dialog to ask to register and login is the start of the server. i dont how to start so pls help.
i have a register system on the gm.
Re: login dialog -
Steven82 - 18.05.2010
*sighs*
Re: login dialog -
billiout - 19.05.2010
no one can help me?
Re: login dialog -
Jonni8 - 19.05.2010
try out with ShowPlayerDialog();
and then make some functions for login
example:
Код:
login(playerid,password)
{
// code...
return 1;
}
Re: login dialog -
billiout - 19.05.2010
i new on scripting. i use a registry system from a gamemode so i dont know how to make it.
i cant understand what do you mean.
sry
Re: login dialog -
park4bmx - 19.05.2010
Ok so you could have a look at
mine or look at this
To make it come up when the server start you do this
under
public OnPlayerConnect(playerid)
you can do something like this
pawn Код:
if(!fexist(file))
{
format(string, sizeof string, "Welcome %s \nPlease Register you account!", name);
ShowPlayerDialog(playerid, Register, DIALOG_STYLE_MSGBOX, "Account", string, "Register", "Cancel.");
}
if(fexist(file))
{
GetPlayerName(playerid, PlayerName, sizeof PlayerName);
format(string, sizeof string, "Please Login to your account!", PlayerName);
ShowPlayerDialog(playerid, Login, DIALOG_STYLE_INPUT, "Account", string, "Login", "Cancel.");
return 0;
}
DONT JUST COPY & PAST it.
IT WOULD NOT WORK im just giving you an example you can start building from it
Re: login dialog -
Jonni8 - 19.05.2010
hm okay... just try to use the wiki... here a link:
https://sampwiki.blast.hk/wiki/ShowPlayerDialog