[HELP]Serverrules dialog
#1

Код:
public OnPlayerRequestClass(playerid, classid)
{
    InterpolateCameraPos(playerid, 1514.16, -1307.44, 344.42, 2251.13, -1772.94, 50.65 ,50000, CAMERA_MOVE);
    InterpolateCameraLookAt(playerid, 1513.8353, -1655.7241, 58.0422, 1513.8353, -1655.7241, 58.0422, 50000, CAMERA_MOVE);
    SetPlayerVirtualWorld(playerid, 0);
    SetPlayerTime(playerid, 0, 0);
    if(fexist(UserPath(playerid)))
    {
        ClearText(playerid);
        INI_ParseFile(UserPath(playerid), "LoadUser_%s", .bExtra = true, .extra = playerid);
        new logstring[512], logname[64]; GetPlayerName(playerid,logname,sizeof(logname));
        format(logstring,sizeof(logstring),""COL_GREY"Dobrodosao "COL_ORANGE"%s"COL_GREY"  na "COL_ORANGE"SERVER\n\n"COL_GREY"Unesite vasu lozinku kako bi ste se ulogirali.\n",logname);
		ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_PASSWORD,""COL_ORANGE"LOGIN",logstring,"Login","Odustani");
		SCM(playerid, COLOR_RED, "UPOZORENJE: "COL_GREY"Server je trenutno u "COL_ORANGE"RADNJI"COL_GREY"!");
    }
    else
    {
    new string[1000];
    strcat(string,""COL_CYAN"SERVER RULES\n");
    ShowPlayerDialog(playerid,DIALOG_SERVERRULES,DIALOG_STYLE_MSGBOX,""COL_CYAN"SERVERRULES",string,"DA","NE ");
    }
    {
    ClearText(playerid);
    new regstring[512], regname[64]; GetPlayerName(playerid,regname,sizeof(regname));
    format(regstring,sizeof(regstring),""COL_GREY"Dobrodosli "COL_ORANGE"%s"COL_GREY" na "COL_ORANGE"SERVER\n\n"COL_GREY"Molimo vas da upisete zeljenu "COL_RED"lozinku "COL_GREY"za vas profil\n\n"COL_GREY"Lozinku "COL_RED"NE DAVAJTE"COL_GREY" nikome!\n\n"COL_GREY"Forum je: "COL_ORANGE"www.uskoro.com\n\n"COL_GREY"Ljepu i ugodnu igru na serveru zeli vam vas "COL_ORANGE"Admin Team"COL_GREY"!",regname);
    ShowPlayerDialog(playerid, DIALOG_REGISTER, DIALOG_STYLE_PASSWORD,""COL_ORANGE"REGISTER",regstring,"Dalje","Odustani");
    SCM(playerid, COLOR_RED, "UPOZORENJE: "COL_GREY"Vasa lozinka mora imati najmanje "COL_RED"6 "COL_GREY"slova/brojeva"COL_RED"!");
    SCM(playerid, COLOR_RED, " ");
    SCM(playerid, COLOR_RED, " ");
    }
    {
    SpawnPlayer(playerid);
    }
	return 1;
}
I dont know why not dialog SERVERRULES dont showing when registering :/ when connect show up for 2-3 sec and shows the register dialog. :/ i want to make when press YES will got REGISTER dialog,when press NO will give kick.
Reply
#2

Your code has a lot of issues. strcat should not be called there and the brackets should not be used like that. Clean up your code first.
Reply
#3

pawn Код:
public OnPlayerRequestClass(playerid, classid)
{
    InterpolateCameraPos(playerid, 1514.16, -1307.44, 344.42, 2251.13, -1772.94, 50.65 ,50000, CAMERA_MOVE);
    InterpolateCameraLookAt(playerid, 1513.8353, -1655.7241, 58.0422, 1513.8353, -1655.7241, 58.0422, 50000, CAMERA_MOVE);
    SetPlayerVirtualWorld(playerid, 0);
    SetPlayerTime(playerid, 0, 0);
    if(fexist(UserPath(playerid)))
    {
        ClearText(playerid);
        INI_ParseFile(UserPath(playerid), "LoadUser_%s", .bExtra = true, .extra = playerid);
        new logstring[512], logname[64]; GetPlayerName(playerid,logname,sizeof(logname));
        format(logstring,sizeof(logstring),""COL_GREY"Dobrodosao "COL_ORANGE"%s"COL_GREY"  na "COL_ORANGE"SERVER\n\n"COL_GREY"Unesite vasu lozinku kako bi ste se ulogirali.\n",logname);
        ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_PASSWORD,""COL_ORANGE"LOGIN",logstring,"Login","Odustani");
        SCM(playerid, COLOR_RED, "UPOZORENJE: "COL_GREY"Server je trenutno u "COL_ORANGE"RADNJI"COL_GREY"!");
        return 0;
    }
    else
    {
        ClearText(playerid);
        new regstring[512], regname[64]; GetPlayerName(playerid,regname,sizeof(regname));
        format(regstring,sizeof(regstring),""COL_GREY"Dobrodosli "COL_ORANGE"%s"COL_GREY" na "COL_ORANGE"SERVER\n\n"COL_GREY"Molimo vas da upisete zeljenu "COL_RED"lozinku "COL_GREY"za vas profil\n\n"COL_GREY"Lozinku "COL_RED"NE DAVAJTE"COL_GREY" nikome!\n\n"COL_GREY"Forum je: "COL_ORANGE"www.uskoro.com\n\n"COL_GREY"Ljepu i ugodnu igru na serveru zeli vam vas "COL_ORANGE"Admin Team"COL_GREY"!",regname);
        ShowPlayerDialog(playerid, DIALOG_REGISTER, DIALOG_STYLE_PASSWORD,""COL_ORANGE"REGISTER",regstring,"Dalje","Odustani");
        SCM(playerid, COLOR_RED, "UPOZORENJE: "COL_GREY"Vasa lozinka mora imati najmanje "COL_RED"6 "COL_GREY"slova/brojeva"COL_RED"!");
        SCM(playerid, COLOR_RED, " ");
        SCM(playerid, COLOR_RED, " ");
        return 0;
    }
    return 1;
}
And put your rules at when players registered

pawn Код:
new string[1000];
    strcat(string,""COL_CYAN"SERVER RULES\n");
 ShowPlayerDialog(playerid,DIALOG_SERVERRULES,DIALOG_STYLE_MSGBOX,""COL_CYAN"SERVERRULES",string,"DA","NE ");
Reply
#4

Quote:
Originally Posted by MasonSFW
Посмотреть сообщение
pawn Код:
public OnPlayerRequestClass(playerid, classid)
{
    InterpolateCameraPos(playerid, 1514.16, -1307.44, 344.42, 2251.13, -1772.94, 50.65 ,50000, CAMERA_MOVE);
    InterpolateCameraLookAt(playerid, 1513.8353, -1655.7241, 58.0422, 1513.8353, -1655.7241, 58.0422, 50000, CAMERA_MOVE);
    SetPlayerVirtualWorld(playerid, 0);
    SetPlayerTime(playerid, 0, 0);
    if(fexist(UserPath(playerid)))
    {
        ClearText(playerid);
        INI_ParseFile(UserPath(playerid), "LoadUser_%s", .bExtra = true, .extra = playerid);
        new logstring[512], logname[64]; GetPlayerName(playerid,logname,sizeof(logname));
        format(logstring,sizeof(logstring),""COL_GREY"Dobrodosao "COL_ORANGE"%s"COL_GREY"  na "COL_ORANGE"SERVER\n\n"COL_GREY"Unesite vasu lozinku kako bi ste se ulogirali.\n",logname);
        ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_PASSWORD,""COL_ORANGE"LOGIN",logstring,"Login","Odustani");
        SCM(playerid, COLOR_RED, "UPOZORENJE: "COL_GREY"Server je trenutno u "COL_ORANGE"RADNJI"COL_GREY"!");
        return 0;
    }
    else
    {
        ClearText(playerid);
        new regstring[512], regname[64]; GetPlayerName(playerid,regname,sizeof(regname));
        format(regstring,sizeof(regstring),""COL_GREY"Dobrodosli "COL_ORANGE"%s"COL_GREY" na "COL_ORANGE"SERVER\n\n"COL_GREY"Molimo vas da upisete zeljenu "COL_RED"lozinku "COL_GREY"za vas profil\n\n"COL_GREY"Lozinku "COL_RED"NE DAVAJTE"COL_GREY" nikome!\n\n"COL_GREY"Forum je: "COL_ORANGE"www.uskoro.com\n\n"COL_GREY"Ljepu i ugodnu igru na serveru zeli vam vas "COL_ORANGE"Admin Team"COL_GREY"!",regname);
        ShowPlayerDialog(playerid, DIALOG_REGISTER, DIALOG_STYLE_PASSWORD,""COL_ORANGE"REGISTER",regstring,"Dalje","Odustani");
        SCM(playerid, COLOR_RED, "UPOZORENJE: "COL_GREY"Vasa lozinka mora imati najmanje "COL_RED"6 "COL_GREY"slova/brojeva"COL_RED"!");
        SCM(playerid, COLOR_RED, " ");
        SCM(playerid, COLOR_RED, " ");
        return 0;
    }
    return 1;
}
And put your rules at when players registered

pawn Код:
new string[1000];
    strcat(string,""COL_CYAN"SERVER RULES\n");
 ShowPlayerDialog(playerid,DIALOG_SERVERRULES,DIALOG_STYLE_MSGBOX,""COL_CYAN"SERVERRULES",string,"DA","NE ");
i have dialog when is player registered :/ can have this dialog first?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)