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);
format(string, sizeof(string), "INFO Veiculo %d: Dono: %s | Modelo: %s | Policia: %s");
SendClientMessage(playerid, COLOR_LIGHTRED, string);
return 1;
}
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;
}
pawn Код:
|
Nгo foi amigo, aparece Veiculo nгo encontrado ;S
A linha que tem o id do carro й: 'ID' |
CMD:verbolo(playerid, params[])
{
new vehicleid, values;
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);
format(string, sizeof(string), "Bolo: %s", vehicleinfo[vehicleid][vBolo]);
SendClientMessage(playerid, COLOR_GREY, string);
return 1;
}
CMD:bolo(playerid, params[])
{
new vehicleid, motivo[255];
if(sscanf(params, "ds[255]", vehicleid, motivo)) return SendClientMessage(playerid, COLOR_GREY, "[Prйfixo]: /bolo [vehicleid] [motivo]");
if(playerinfo[playerid][pMuted] == 1) return SendClientMessage(playerid, COLOR_ERROR, MUTED_ERROR);
if(playerinfo[playerid][pLogado] == 0) return SendClientMessage(playerid, COLOR_ERROR, LOGIN_ERROR);
format(query, sizeof(query), "UPDATE `vehicleinfo` SET Bolo = '%s' WHERE `ID` = '%d'", motivo, vehicleid);
mysql_function_query(MYSQLConnection, query, false, "noReturnQuery", "s", playerid);
format(string, sizeof(string), "* Bolo inserido com sucesso no veiculo placa LS-%d.", vehicleid);
SendClientMessage(playerid, COLOR_GREY, string);
return 1;
}