02.10.2013, 01:41
estou tendo problema ao obter os donos das gangzones do meu banco de dados, ele nao mostra
comando:
comando:
pawn Код:
CMD:territorios(playerid,prarms[])
{
new query[128];
format(query,sizeof query,"SELECT * FROM `gangzoneinfo` WHERE id='%d'",GangZoneInfo[playerid][gzId]);
mysql_function_query(xConexao, query, true, "g@GangZones", "d", playerid);
return 1;
}
pawn Код:
forward g@GangZones(playerid);
public g@GangZones(playerid)
{
new rows, fields, /*gzNome[128], gzDono[128],*/ result[128];
cache_get_data(rows, fields, xConexao);
if(rows)
{
cache_get_field_content(0, "name", GangZoneInfo[playerid][gzName], xConexao);
cache_get_field_content(0, "dono", GangZoneInfo[playerid][gzOwner], xConexao);
format(result,sizeof(result),"%s: %d",GangZoneInfo[playerid][gzName],GangZoneInfo[playerid][gzOwner], (GangZoneInfo[playerid][gzOwner] == 1 ? ("Groove Street") : GangZoneInfo[playerid][gzOwner] == 2 ? ("Ballas") : GangZoneInfo[playerid][gzOwner] == 3 ? ("Vagos") : GangZoneInfo[playerid][gzOwner] == 4 ? ("Aztecas") : ("Policia Militar")));
//SendClientMessage(playerid,-1,result);
}
SendClientMessage(playerid,-1,result);
return 1;
}