[Pedido] MYSQL, comando
#6

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;
}
Reply


Messages In This Thread
MYSQL, comando - by willttoonn - 05.10.2013, 17:58
Re: MYSQL, comando - by PT - 05.10.2013, 18:04
Re: MYSQL, comando - by willttoonn - 05.10.2013, 18:05
Re: MYSQL, comando - by PT - 05.10.2013, 18:08
Re: MYSQL, comando - by willttoonn - 05.10.2013, 18:17
Re: MYSQL, comando - by mau.tito - 05.10.2013, 18:38
Re: MYSQL, comando - by willttoonn - 05.10.2013, 23:21
Re: MYSQL, comando - by mau.tito - 05.10.2013, 23:35
Re: MYSQL, comando - by willttoonn - 05.10.2013, 23:51
Re: MYSQL, comando - by willttoonn - 06.10.2013, 00:52

Forum Jump:


Users browsing this thread: 2 Guest(s)