05.10.2013, 18:38
pawn Код:
CMD:vercarro(playerid, params[])
{
new vehicleid;
if(sscanf(params, "d", vehicleid)) return SendClientMessage(playerid, COLOR_GREY, "[Prйfixo]: /vercarro [vehicleid]");
if(playerinfo[playerid][pMuted] == 1) return SendClientMessage(playerid, COLOR_ERROR, MUTED_ERROR);
if(playerinfo[playerid][pLogado] == 0) return SendClientMessage(playerid, COLOR_ERROR, LOGIN_ERROR);
new string[150], name[80];
GetPlayerName(playerid, name, 80);
format(string, 150, "SELECT * FROM `vehicleinfo` WHERE vehicleid = '",vehicleid,"'");
mysql_function_query(Conexao, string, false, #, #);
new row, field, donow[80];
cache_get_data(row,field, Conexao);
if(!row)
{
SendClientMessage(playerid, -1 , "Veiculo nгo encontrado");
}else {
cache_get_field_content(0, "emprego", donow); // so fazer assim com as outras infos
format(string, sizeof(string), "INFO Veiculo %d : Dono (%s)", vehicleid);
SendClientMessage(playerid, COLOR_LIGHTRED, string);
}
return 1;
}