Need a little help - 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: Need a little help (
/showthread.php?tid=640859)
Need a little help -
SniperZLyfe1 - 08.09.2017
Hi,
How can i do like when i launches my server,it show me Server Rules dialog menu and then player press "next" button,it show me login or register screen.
Also how can i change my background on login screen.
Re: Need a little help -
Kane - 08.09.2017
Just show a dialog with the 'rules' and if there's a response, check if it's a registered account / registered like you would. For example:
PHP код:
#define DIALOG_SERVER_RULES (1)
public OnPlayerConnect(playerid)
{
new
rule_str[128]
;
strcat(rule_str, "Don't cheat obviously...\n");
strcat(rule_str, "Don't break rules...\n");
ShowPlayerDialog(playerid, DIALOG_SERVER_RULES, DIALOG_STYLE_MSGBOX, "Rule confirmation", rule_str, "Confirm", "Cancel");
}
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
switch(dialogid)
{
case DIALOG_SERVER_RULES:
{
if(response)
{
//This is where your code to check if their account exists would go.
return 1;
}
else Kick(playerid);
}
}
return 0;
}
And different "backgrounds" are just textdraw sprites.
https://sampwiki.blast.hk/wiki/TextDraw_Sprites