Problema intalnita (descriere): Dupa ce ma inregistrez ar trebuie sa-mi mai apara dialogul in care iti alegi sexul, dar nu apare si imi muta camera (vezi imaginea).
Ero(area / rile) / warning-(ul / urile): Nu am
Liniile de cod / sursa / script-ul(obligatoriu):
function OnPlayerRegister(playerid)
{
new string[128], hours, minutes, year, month, day, loginstring[128];
PlayerData[playerid][ID] = cache_insert_id();
gettime(hours, minutes);
getdate(year, month, day);
format(string, sizeof(string), "%02d.%02d.%02d %02d:%02d",day,month,year,hours,minutes);
strmid(PlayerData[playerid][RegDate], string, 0, strlen(string), 255);
mysql_format(SQL, string,128,"UPDATE `users` SET `RegisterDate`='%s' WHERE `Name`='%s' LIMIT 1",PlayerData[playerid][RegDate],PlayerData[playerid][Name]);
mysql_tquery(SQL, string, "", "");
//despre acest dialog este vorba
ShowPlayerDialog(playerid, DIALOG_GENDER, DIALOG_STYLE_LIST, "Please choose your gender", "Male\nFemale", "Select", "Cancel");
ServerInfo[users]++;
strmid(ServerInfo[newestacc], PlayerData[playerid][Name], 0, strlen(PlayerData[playerid][Name]), 255);
mysql_format(SQL, loginstring,128,"UPDATE `infos` SET `users`='%d' WHERE ID = 1",ServerInfo[users]);
mysql_tquery(SQL, loginstring, "", "");
mysql_format(SQL, loginstring,128,"UPDATE `infos` SET `newestacc`='%s' WHERE ID = 1",ServerInfo[newestacc]);
mysql_tquery(SQL, loginstring, "", "");
return 1;
}
Iar acesta este codul dialogului:
case DIALOG_GENDER:
{
if(response)
{
if(listitem == 0)
{
PlayerData[playerid][Character] = 250;
PlayerData[playerid][Gender] = 1;
Update(playerid, CharacterUpdate);
Update(playerid, GenderUpdate);
//Apoi ar trebui sa treaca la acesta.
format(string, sizeof(string), "Account registered, you can login now by typing your password below.");
ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_PASSWORD, "Login", string, "Login", "Abort");
return 0;
}
if(listitem == 1)
{
PlayerData[playerid][Character] = 56;
PlayerData[playerid][Gender] = 2;
Update(playerid, CharacterUpdate);
Update(playerid, GenderUpdate);
format(string, sizeof(string), "Account registered, you can login now by typing your password below.");
ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_PASSWORD, "Login", string, "Login", "Abort");
return 0;
}
}
else Kick(playerid);
}
Imagini / Video (optional): http://imgur.com/m4obQUQ
Ati incercat sa rezolvati singur?: Da, am incercat.