02.03.2013, 19:23
I can't seem to find the cause of this problem that I'm trying to fix. Basically, there's suppose to be a point in the script where a "race selection" would come up, asking you what race you want to be. I have 3 races, so I match up the races to a number. Human is 1, Ghoul is 2, and Feral Ghoul is 3. Once you choose a race, it should change the MySQL value for "race". This is where the problem happens, it doesn't change the value.
This is when they choose an option for the race selection.
This is the dialog response to registering an account. (not sure if this helps)
Sorry about indentation, it's all correct on the script, just doesn't come out right on the forums. Anyone know how to fix this?
This is when they choose an option for the race selection.
Код:
{ if(!response)Kick(playerid); else { switch(listitem) { case 0: { Player[playerid][Race] = 1; SendClientMessage(playerid, WHITE, "You have chosen to live as a Human."); AfterLogin(playerid); } case 1: { Player[playerid][Race] = 2; SendClientMessage(playerid, WHITE, "You have chosen to live as a Ghoul."); AfterLogin(playerid); } case 2: { Player[playerid][Race] = 3; SendClientMessage(playerid, WHITE, "You have chosen to live as a Feral Ghoul."); AfterLogin(playerid); } } } }
Код:
{ if(!response)Kick(playerid); else { if(!strlen(inputtext))ShowPlayerDialog(playerid, 0, DIALOG_STYLE_PASSWORD, "Register", "Register by entering a password below:", "Register", "Exit"); new query[256]; format(query, sizeof(query), "INSERT INTO `accounts` (`name`, `password`) VALUES ('%s', '%s')", pName(playerid), inputtext); mysql_query(query); DefaultRegisterVariables(playerid); ShowPlayerDialog(playerid, 10, DIALOG_STYLE_LIST, "Race Selection", "Human\nGhoul\nFeral Ghoul", "Choose", "Exit"); } }