Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #define DialogInfoLogin 7188
- CMD:infocasa(playerid)
- {
- if (APlayerData[playerid][LoggedIn] == false) return 0;
- for(new HouseID = 1; HouseID < MAX_HOUSES; HouseID++)
- {
- if (IsPlayerInRangeOfPoint(playerid, 1.0, AHouseData[HouseID][HouseX], AHouseData[HouseID][HouseY], AHouseData[HouseID][HouseZ]))
- {
- new dono[24], string[200], query[128], dia, mes, ano;
- format(dono, sizeof(dono), "%s", AHouseData[HouseID][Owner]);
- if (AHouseData[HouseID][Owned] == false) return SCM(playerid, 0xFF0000FF, "Essa residência não tem dono!");
- mysql_format(IDConexao, query, 128, "SELECT `LoginDias`, `LoginMes`, `LoginAno` FROM `usuários` WHERE `Name` = '%s'", dono);
- new Cache:_cache = mysql_query(IDConexao, query, true), rows = cache_num_rows();
- if(rows > 0)
- {
- for(new i = 0; i < rows; i++)
- {
- cache_get_value_name_int(i, "LoginAno", ano);
- cache_get_value_name_int(i, "LoginMes", mes);
- cache_get_value_name_int(i, "LoginDias", dia);
- format(string, sizeof(string), "{FF8000}Dono: {FFFFFF}%s\n{FF8000}ID da casa: {FFFFFF}%d\n{FF8000}Último login: {FFFFFF}%d/%d/%d", dono, HouseID, ano, mes, dia);
- }
- ShowPlayerDialog(playerid, DialogInfoLogin, DIALOG_STYLE_MSGBOX, "{FF8000}#{FFFFFF}Log da Residência", string, "Ok", #);
- }
- cache_delete(_cache);
- }
- }
- return 1;
- }
- CMD:infoempresa(playerid)
- {
- if (APlayerData[playerid][LoggedIn] == false) return 0;
- for (new BusID; BusID < MAX_BUSINESS; BusID++)
- {
- if (IsPlayerInRangeOfPoint(playerid, 2.5, ABusinessData[BusID][BusinessX], ABusinessData[BusID][BusinessY], ABusinessData[BusID][BusinessZ]))
- {
- if (ABusinessData[BusID][Owned] == false) return SCM(playerid, 0xFF0000FF, "Essa empresa não tem dono!");
- new dono[24], dia, mes, ano, string[150];
- new queryy[500];
- format(dono, sizeof(dono), "%s", ABusinessData[BusID][Owner]);
- mysql_format(IDConexao, queryy, sizeof(queryy), "SELECT `LoginDias`, `LoginMes`, `LoginAno` FROM `usuários` WHERE `Name` = '%s'", dono);
- new Cache:_cache = mysql_query(IDConexao, queryy, true), rows = cache_num_rows();
- if(rows > 0)
- {
- for(new i = 0; i < rows; i++)
- {
- cache_get_value_name_int(i, "LoginAno", ano);
- cache_get_value_name_int(i, "LoginMes", mes);
- cache_get_value_name_int(i, "LoginDias", dia);
- format(string, sizeof(string), "{FFCC00}Dono: {FFFFFF}%s\n{FFCC00}ID da empresa: {FFFFFF}%d\n{FFCC00}Último login: {FFFFFF}%d/%d/%d", dono, BusID, ano, mes, dia);
- }
- ShowPlayerDialog(playerid, DialogInfoLogin, DIALOG_STYLE_MSGBOX, "{FFCC00}#{FFFFFF}Log da Empresa", string, "Ok", #);
- }
- cache_delete(_cache);
- }
- }
- return 1;
- }
- CMD:envios(playerid, params[])
- {
- new player;
- if(APlayerData[playerid][PlayerLevel] >= 3)
- {
- if(!sscanf(params, "u", player))
- {
- SendAdminText(playerid, "/envios", params);
- if(IsPlayerConnected(player))
- {
- new info[8000], name[24], query[256], remip[24], destname[24], destip[24], amount, year, month, day, hour, minute, second;
- GetPlayerName(player, name, 24);
- mysql_format(IDConexao, query, sizeof(query), "SELECT `Sender`, `Reciever`, `SenderIP`, `RecieverIP`, `Amount`, `Day`, `Month`, `Year`, `Hour`, `Minute`, `Second` FROM `pagamentos` WHERE `Sender` = '%s' ORDER BY `Amount` DESC LIMIT 15", name);
- new Cache:cache_ = mysql_query(IDConexao, query, true), rows = cache_num_rows();
- if(rows > 0)
- {
- format(info, sizeof(info), "%s ID | Destinatário | Quantia | IP do Remetente | IP do Destinatário | Data | Hora\n",info);
- for(new i; i < rows; i++)
- {
- cache_get_value_name(i, "Reciever", destname);
- cache_get_value_name(i, "SenderIP", remip);
- cache_get_value_name(i, "RecieverIP", destip);
- cache_get_value_int(i, "Amount", amount);
- cache_get_value_name_int(i, "Day", day);
- cache_get_value_name_int(i, "Month", month);
- cache_get_value_name_int(i, "Year", year);
- cache_get_value_name_int(i, "Hour", hour);
- cache_get_value_name_int(i, "Minute", minute);
- cache_get_value_name_int(i, "Second", second);
- format(info, sizeof(info), "%s %d | %s | R$%d | %s | %s | %02d:%02d:%02d | %d:%d:%d\n", info, (i+1), destname, amount, remip, destip, day, month, year, hour, minute, second);
- }
- ShowPlayerDialog(playerid, DIALOG_ENVIOS, DIALOG_STYLE_MSGBOX, "Transações", info, "Fechar", #);
- }
- cache_delete(cache_);
- }
- else return SCM(playerid, 0xFF0000AA, "Este player não está conectado!");
- }
- else return SCM(playerid, 0xFF0000AA, "Use: /envios [playerid/nome]");
- }
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment