03.11.2014, 23:02
Hi. I've been having troubles with my registration system.
I only have the login dialog somewhat working because sometimes it pops up when you enter the server and sometimes it doesn't.
However I'm not sure how to make the registration dialog pop up if people aren't registered.
Here is my login dialog at the moment.
Please help me. I will of course + Rep.
I only have the login dialog somewhat working because sometimes it pops up when you enter the server and sometimes it doesn't.
However I'm not sure how to make the registration dialog pop up if people aren't registered.
Here is my login dialog at the moment.
pawn Код:
new tmp[50],tmp2[256];
GetPlayerIp(playerid,tmp,128);
tmp2 = dini_Get(file,"ip");
if(!strcmp(tmp,tmp2,true)) {
GameTextForPlayer(playerid,"~r~Before you can play, you must login!",4000,3);
ShowPlayerDialog(playerid, DIALOGID0+2, DIALOG_STYLE_INPUT,"~~~~~~Login Password~~~~~~", " ", "OK", "Quit");
format(string,sizeof(string),"Welcome back, %s. Please login or you will be disconnected in 60 seconds!",PlayerName);
SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
SendClientMessage(playerid, COLOR_BRIGHTRED, "-----------------------------------------------------------------------------------------------------------------------");
PlayerInfo[playerid][LoggedIn] = 0;
SetTimerEx("KickTimer",60000,0,"i",playerid);}}