24.01.2010, 19:55
When i enter and i type my password... the game look like this
That.. and i cant spawn and do anything... i dont know the problem :S here is my code
That.. and i cant spawn and do anything... i dont know the problem :S here is my code
Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[]) { new pname[MAX_PLAYER_NAME]; GetPlayerName(playerid, pname, sizeof(pname)); if(dialogid == 1) { if(response == 1) { new query[128]; format(query, sizeof(query), "INSERT INTO jugadores (nombre, pass) VALUES ('%s', '%s')", pname, inputtext); mysql_query(query); SendClientMessage(playerid, COLOR_LIGHTBLUE, "** Registro Finalizado. Has Sido Logueado Automaticamente."); } else { SendClientMessage(playerid, COLOR_LIGHTBLUE, "** Has Cancelado. El Registro es Obligatorio."); Kick(playerid); } return 1; } if(dialogid == 2) { if(response == 1) { new sql[128], row[128], PlayerName[128], PlayerPassword[128]; GetPlayerName(playerid, PlayerName, sizeof(PlayerName)); format(sql, sizeof(sql), "SELECT password FROM jugadores where nombre = '%s'", PlayerName); mysql_query(sql); mysql_store_result(); mysql_fetch_row(row); strmid(PlayerPassword, row, 0, strlen(row), 255); mysql_free_result(); if(strcmp(inputtext, PlayerPassword, true) == 0) { SendClientMessage(playerid, COLOR_LIGHTBLUE, "** Has Sido Logueado Correctamente."); return 1; } else { SendClientMessage(playerid, COLOR_LIGHTBLUE, "** Contraseсa Incorrecta."); Kick(playerid); } } } else { SendClientMessage(playerid, COLOR_LIGHTBLUE, "** Has Cancelado. Tienes que loguear Obligatoriamente."); Kick(playerid); } return 0; }