Dialog problem, not showing. Help -
dialog rlsex nad rlage showing, but when enter age, dialog_regfinish not showing. Can anyone help me?
Код:
case DIALOG_RLSEX:
{
if(!response) return Kick(playerid);
if(response)
{
new message[128];
if(listitem == 0)
{
ClearText(playerid);
PlayerInfo[playerid][pRLsex] = 0;
PlayerInfo[playerid][pSkin] = 299; SetPlayerSkin(playerid, PlayerInfo[playerid][pSkin]);
format(message, sizeof(message), ""COL_ORANGE"[SERVER]: "COL_WHITE"U redu, Vi ste "COL_CYAN"Musko"COL_WHITE".");
SendClientMessage(playerid, 0xFFFFFFFF, message);
SendClientMessage(playerid, COLOR_CYAN, " ");
SendClientMessage(playerid, COLOR_CYAN, " ");
SendClientMessage(playerid, COLOR_CYAN, " ");
ShowPlayerDialog(playerid, DIALOG_RLAGE, DIALOG_STYLE_INPUT,""COL_ORANGE"REGISTRACIJA "COL_GREY"["COL_CYAN"3"COL_GREY"/"COL_WHITE"3"COL_GREY"]",""COL_WHITE"Unesite u prazno polje koliko imate godina "COL_GREY"("COL_RED"13-40"COL_GREY")","Dalje","");
}
if(listitem == 1)
{
ClearText(playerid);
PlayerInfo[playerid][pRLsex] = 1;
PlayerInfo[playerid][pSkin] = 192; SetPlayerSkin(playerid, PlayerInfo[playerid][pSkin]);
format(message, sizeof(message), ""COL_ORANGE"[SERVER]: "COL_WHITE"U redu, Vi ste "COL_CYAN"Zensko"COL_WHITE".");
SendClientMessage(playerid, 0xFFFFFFFF, message);
SendClientMessage(playerid, COLOR_CYAN, " ");
SendClientMessage(playerid, COLOR_CYAN, " ");
SendClientMessage(playerid, COLOR_CYAN, " ");
ShowPlayerDialog(playerid, DIALOG_RLAGE, DIALOG_STYLE_INPUT,""COL_ORANGE"REGISTRACIJA "COL_GREY"["COL_CYAN"3"COL_GREY"/"COL_WHITE"3"COL_GREY"]",""COL_WHITE"Unesite u prazno polje koliko imate godina "COL_GREY"("COL_RED"13-40"COL_GREY")","Dalje","");
}
}
}
case DIALOG_RLAGE:
{
if(!response) return Kick(playerid);
if(response)
{
new godina, message[128], string[248];
godina = strval(inputtext);
if(godina < 13 || godina > 40)
{
ShowPlayerDialog(playerid, DIALOG_RLAGE, DIALOG_STYLE_INPUT,""COL_ORANGE"REGISTRACIJA "COL_GREY"["COL_CYAN"3"COL_GREY"/"COL_WHITE"3"COL_GREY"]",""COL_RED"Krivo ste unijeli godine.\n\n"COL_WHITE"Unesite u prazno polje koliko imate godina "COL_GREY"("COL_RED"13-40"COL_GREY")","Dalje","");
return 1;
}
else
{
format(message, sizeof(message), ""COL_ORANGE"[SERVER]: "COL_WHITE"U redu, vi imate "COL_CYAN"%d "COL_WHITE"godina.", godina);
SendClientMessage(playerid, 0xFFFFFFFF, message);
SendClientMessage(playerid, COLOR_CYAN, " ");
SendClientMessage(playerid, COLOR_CYAN, " ");
SendClientMessage(playerid, COLOR_CYAN, " ");
PlayerInfo[playerid][pRLage] = godina;
ShowPlayerDialog(playerid,DIALOG_REGFINISH,DIALOG_STYLE_MSGBOX,""COL_ORANGE"REGISTRACIJA USPJESNA",string,"REGISTRACIJA","ODUSTANI");
}
}
}
case DIALOG_REGFINISH:
{
if(!response) return Kick(playerid);
if(response)
{
if(listitem == 0)
{
new string[248], str[64];
new pName[24], gender[16], rldrzava[16], getip[16];
GetPlayerName(playerid, pName, MAX_PLAYER_NAME);
GetPlayerIp(playerid, getip, sizeof(getip));
if(PlayerInfo[playerid][pRLsex] == 0) format(gender, sizeof(gender), "Musko");
else if(PlayerInfo[playerid][pRLsex] == 1) format(gender, sizeof(gender), "Zensko");
if(PlayerInfo[playerid][pRLLocation] == 0) format(rldrzava, sizeof(rldrzava), "Hrvatska");
else if(PlayerInfo[playerid][pRLLocation] == 1) format(rldrzava, sizeof(rldrzava), "BiH");
else if(PlayerInfo[playerid][pRLLocation] == 2) format(rldrzava, sizeof(rldrzava), "Srbija");
else if(PlayerInfo[playerid][pRLLocation] == 3) format(rldrzava, sizeof(rldrzava), "Crna Gora");
else if(PlayerInfo[playerid][pRLLocation] == 4) format(rldrzava, sizeof(rldrzava), "Makedonija");
else if(PlayerInfo[playerid][pRLLocation] == 4) format(rldrzava, sizeof(rldrzava), "Slovenija");
else if(PlayerInfo[playerid][pRLLocation] == 4) format(rldrzava, sizeof(rldrzava), "Ostalo");
strcat(string,""COL_ORANGE">"COL_WHITE"Uspjesno ste dovrsili registraciju.\n\n");
strcat(string,""COL_WHITE"Vasi podaci:\n");
format(str, 64, ""COL_RED"Ime i Prezime: "COL_ORANGE"%s\n", pName);
strcat(string, str);
format(str, 64, ""COL_RED"Spol: "COL_ORANGE"%s\n", gender);
strcat(string, str);
format(str, 64, ""COL_RED"Godina: "COL_ORANGE"%d\n", PlayerInfo[playerid][pRLage]);
strcat(string, str);
format(str, 64, ""COL_RED"Drzava: "COL_ORANGE"%s\n", rldrzava);
strcat(string, str);
format(str, 64, ""COL_RED"IP: "COL_ORANGE"%s\n", getip);
strcat(string, str);
strcat(string, "\n\n"COL_WHITE"Pritiskom na ˝"COL_RED"REGISTRACIJA˝ "COL_WHITE" vas profil ce se pospremiti te cete moci igrati na serveru.\n", sizeof(string));
strcat(string, ""COL_WHITE"Pritiskom na ˝"COL_RED"ODUSTANI˝ "COL_WHITE" vas profil se nece pospremiti te necete moci igrati na serveru.", sizeof(string));
ShowPlayerDialog(playerid,DIALOG_REGPLAYER,DIALOG_STYLE_MSGBOX,""COL_ORANGE"REGISTRACIJA USPJESNA",string,"REGISTRACIJA","ODUSTANI");
}
if(listitem == 1)
{
}
}
}
case DIALOG_REGPLAYER:
{
if(!response) return Kick(playerid);
if(response)
{
if(response == 0)
{
InterpolateCameraPos(playerid, 1401.052246, -1379.372192, 597.450561, 1413.083007, -901.856750, 171.654861, 7000);
InterpolateCameraLookAt(playerid, 1401.146240, -1375.640991, 594.123474, 1413.177001, -898.125549, 168.327789, 1000);
TextDrawShowForPlayer(playerid,TextdrawRTW0);
TextDrawShowForPlayer(playerid,TextdrawRTW1);
TextDrawShowForPlayer(playerid,TextdrawRTW2);
TextDrawShowForPlayer(playerid,TextdrawRTW3);
TextDrawShowForPlayer(playerid,TextdrawRTW4);
TextDrawShowForPlayer(playerid,TextdrawRTW5);
TextDrawShowForPlayer(playerid,TextdrawRTW6);
SetTimerEx("REGTIME", 8500, false, "i", playerid);
}
if(response == 1)
{
// KICKA IGRACA I BRISE .INI FAJL
}
}
}
Re: Help me with dialog. Not showing -
You have added a string, without formatting it.
Use the following syntax to format a string, let's suppose that the string is called "str":
pawn Код:
case DIALOG_RLAGE:
{
if(!response) return Kick(playerid);
if(response)
{
new godina, message[128], string[248];
godina = strval(inputtext);
if(godina < 13 || godina > 40)
{
ShowPlayerDialog(playerid, DIALOG_RLAGE, DIALOG_STYLE_INPUT,""COL_ORANGE"REGISTRACIJA "COL_GREY"["COL_CYAN"3"COL_GREY"/"COL_WHITE"3"COL_GREY"]",""COL_RED"Krivo ste unijeli godine.\n\n"COL_WHITE"Unesite u prazno polje koliko imate godina "COL_GREY"("COL_RED"13-40"COL_GREY")","Dalje","");
return 1;
}
else
{
format(message, sizeof(message), ""COL_ORANGE"[SERVER]: "COL_WHITE"U redu, vi imate "COL_CYAN"%d "COL_WHITE"godina.", godina);
SendClientMessage(playerid, 0xFFFFFFFF, message);
SendClientMessage(playerid, COLOR_CYAN, " ");
SendClientMessage(playerid, COLOR_CYAN, " ");
SendClientMessage(playerid, COLOR_CYAN, " ");
PlayerInfo[playerid][pRLage] = godina;
format(string,sizeof(string),"Your dialog message here");
ShowPlayerDialog(playerid,DIALOG_REGFINISH,DIALOG_STYLE_MSGBOX,""COL_ORANGE"REGISTRACIJA USPJESNA",string,"REGISTRACIJA","ODUSTANI");
}
}
}