if(!strcmp(cmd, "/dados", true)) { new x_nr[3072]; x_nr = strtok(cmdtext, idx); if(!strlen(x_nr)) { SendClientMessage(playerid, COLOR_WHITE, "USO: /dados [Nome_Apelido]"); return 1; } if(PlayerInfo[playerid][Admin] >= 20 || PlayerInfo[playerid][HAdmin] == 1 || PlayerInfo[playerid][HAdmin] >= 2) { new comandoquery[700]; new result[1090]; format(comandoquery, sizeof(comandoquery), "SELECT * FROM `accounts` WHERE `Name` = '%s'", x_nr); mysql_query(comandoquery); mysql_store_result(); new resultline[20]; if(mysql_fetch_row_format(resultline)) { mysql_get_field("Sex", result); CrimeInfo[playerid][Sex] = strval(result); mysql_get_field("Age", result); CrimeInfo[playerid][Age] = strval(result); mysql_get_field("HouseKey", result); CrimeInfo[playerid][HouseKey] = strval(result); mysql_get_field("CarKey1", result); CrimeInfo[playerid][CarKey1] = strval(result); mysql_get_field("CarKey2", result); CrimeInfo[playerid][CarKey2] = strval(result); mysql_get_field("CarKey3", result); CrimeInfo[playerid][CarKey3] = strval(result); mysql_get_field("CarKey4", result); CrimeInfo[playerid][CarKey4] = strval(result); mysql_get_field("CarKey5", result); CrimeInfo[playerid][CarKey5] = strval(result); mysql_get_field("CarKey6", result); CrimeInfo[playerid][CarKey6] = strval(result); mysql_get_field("LastCrime", result); CrimeInfo[playerid][LastCrime] = strval(result); new sexo[15]; switch(CrimeInfo[playerid][Sex]) { case 0: sexo = "Nenhum"; case 1: sexo = "Masculino"; case 2: sexo = "Feminino"; } new houselocation[MAX_ZONE_NAME]; GetCoords2DZone(Houses[CrimeInfo[playerid][HouseKey]][EnterX],Houses[CrimeInfo[playerid][HouseKey]][EnterY], houselocation, MAX_ZONE_NAME); new key1 = CrimeInfo[playerid][CarKey1]; new key2 = CrimeInfo[playerid][CarKey2]; new key3 = CrimeInfo[playerid][CarKey3]; new key4 = CrimeInfo[playerid][CarKey4]; new key5 = CrimeInfo[playerid][CarKey5]; new key6 = CrimeInfo[playerid][CarKey6]; new carrostext[9999]; format(carrostext, sizeof(carrostext), "%s ((ID: %d)) | %s ((ID: %d)) | %s ((ID: %d)) \n %s ((ID: %d)) | %s ((ID: %d)) | %s ((ID: %d))\n ((Os carros ID:999 nгo existem))", DynamicCars[key1][Matricula], key1, DynamicCars[key2][Matricula], key2, DynamicCars[key3][Matricula], key3,DynamicCars[key4][Matricula], key4, DynamicCars[key5][Matricula], key5, DynamicCars[key6][Matricula], key6); new line1[1024]; new line2[1024]; format(line2, sizeof(line2), "Nome:%s \nSexo: %s\nIdade: %d \nMorada: %d %s \nVeiculos Registados:\n %s", x_nr, sexo, CrimeInfo[playerid][Age], CrimeInfo[playerid][HouseKey], houselocation, carrostext); format(line2, sizeof(line1), "Nome:%s \nSexo: %s\nIdade: %d \nMorada: Desconhecida \nVeiculos Registados:\n %s", x_nr, sexo, CrimeInfo[playerid][Age], carrostext); if(CrimeInfo[playerid][HouseKey] != 999) { ShowPlayerDialog(playerid, 164, DIALOG_STYLE_MSGBOX, "Ministйrio da Defesa", line2, "Close", ""); } else { ShowPlayerDialog(playerid, 164, DIALOG_STYLE_MSGBOX, "Ministйrio da Defesa", line1, "Close", ""); } } else { format(string,sizeof(string), "Nгo existe nenhum cidadгo com o nome %s na nossa base de dados!",x_nr); SendClientMessage(playerid, COLOR_RED, string); } //mysql_free_result(); } return 1; } |
Server: Unknown Command |
[19:38:20] CMySQLHandler::Query(SELECT * FROM `accounts` WHERE `Name` = 'George_Callen') - Successfully executed. [19:38:20] >> mysql_store_result( Connection handle: 1 ) [19:38:20] CMySQLHandler::StoreResult() - Result was stored. [19:38:20] >> mysql_fetch_row_format( Connection handle: 1 ) [19:38:20] CMySQLHandler::FetchRow() - Return: George_Callen|123|1|0|0|0|0|0|4|1|20|2|0|Nenhuma|0 |0|0|0|0|124|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0 |2|0|255|0|999|999|999|999|999|999|999|999|0|0|0|0 |0|0|0|1|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0 |0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0 |0|0|0|0|0|0|0|0|0|0|100|0|0|0|3|999|999|999|999|9 99|999|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0 |0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|Nenhuma|0|N enhuma|0|Nenhuma|0|Nenhuma|0|Nenhuma|0|0|0|0|0|0|0 |0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0 |0|0|0|0|0|0|0|Nenhum|14|0|0|0|0|0|0|0|0|0|0|0|0|0 |0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|78|0|0|Nenhum ||0|0|0|0|0|0 [19:38:20] >> mysql_fetch_field_row( Connection handle: 1 ) [19:38:20] CMySQLHandler::FetchField("Sex") - 1 [19:38:20] >> mysql_fetch_field_row( Connection handle: 1 ) [19:38:20] CMySQLHandler::FetchField("Age") - 20 [19:38:20] >> mysql_fetch_field_row( Connection handle: 1 ) [19:38:20] CMySQLHandler::FetchField("HouseKey") - 999 [19:38:20] >> mysql_fetch_field_row( Connection handle: 1 ) [19:38:20] CMySQLHandler::FetchField("CarKey1") - 999 [19:38:20] >> mysql_fetch_field_row( Connection handle: 1 ) [19:38:20] CMySQLHandler::FetchField("CarKey2") - 999 [19:38:20] >> mysql_fetch_field_row( Connection handle: 1 ) [19:38:20] CMySQLHandler::FetchField("CarKey3") - 999 [19:38:20] >> mysql_fetch_field_row( Connection handle: 1 ) [19:38:20] CMySQLHandler::FetchField("CarKey4") - 999 [19:38:20] >> mysql_fetch_field_row( Connection handle: 1 ) [19:38:20] CMySQLHandler::FetchField("CarKey5") - 999 [19:38:20] >> mysql_fetch_field_row( Connection handle: 1 ) [19:38:20] CMySQLHandler::FetchField("CarKey6") - 999 [19:38:20] >> mysql_fetch_field_row( Connection handle: 1 ) [19:38:20] CMySQLHandler::FetchField("LastCrime") - |