timer to dialog to show up?
#1

i want to add a timer to my login dialog that shows up when you join the server, right now i have a problem that the login dialog only shows up for 0,5 seconds and then it switches over to the class selection and the dialog dissapears.

i got an idea to add some sort of timer to the dialog so it doesn't dissapear after 0,5 after joining the server but now it will show up after 2 seconds so the class selection shows up first and then the dialog so the player can actually fill in their password and or register their account without the login dialog dissapearing so quick

my experience with coding on sa-mp is like 2/10 and i'm trying to learn it more by the day but please someone code a timer to the dialog showing up


Код:
public OnPlayerConnect(playerid)
{
   	new PlayerName[MAX_PLAYER_NAME];
	PlayerLogged[playerid] = 0;
 	new file[256];
	format(file, sizeof(file), SERVER_USER_FILE, PlayerName);
    if (!dini_Exists(file)) return ShowPlayerDialog(playerid, 1, DIALOG_STYLE_INPUT, "~~~ You're not registered.", "Welcome To The Server, Register by creating a password.", "Register", "Cancel");
    if(fexist(file)) {
    	new plrIP[64];
 		GetPlayerIp(playerid, plrIP, 64);
        if (PlayerInfo[playerid][IP] == GetPlayerIp(playerid, plrIP, 64)) {
        	PlayerInfo[playerid][RegisterDate] = dini_Int(file, "RegisterDate");
		    PlayerInfo[playerid][AdminLevel] = dini_Int(file, "AdminLevel");

etc..
etc..
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)