Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- case 2:
- {//Информация о последних подключениях
- new query[73-2+11];
- mysql_format(mysql_connection,query,sizeof(query),"select`date`,`ip`from`connects`where`id`='%i'order by`date`desc limit 15",player[playerid][id]);
- mysql_query(mysql_connection,query);
- if(cache_get_row_count(mysql_connection))
- {
- new temp_date[32],temp_ip[16],temp_string[45-2-2-2+11+32+16];
- new temp_ip_color[24];
- new string[sizeof(temp_string)*15]=""WHITE"№\t"WHITE"Дата\t"WHITE"IP адрес\n";
- for(new i=0; i<cache_get_row_count(mysql_connection); i++)
- {
- cache_get_field_content(i,"date",temp_date,mysql_connection,sizeof(temp_date));
- cache_get_field_content(i,"ip",temp_ip,mysql_connection,sizeof(temp_ip));
- if(!strcmp(temp_ip,player[playerid][reg_ip]))
- {
- format(temp_ip_color,sizeof(temp_ip_color),""GREEN"%s",temp_ip);
- }
- else
- {
- format(temp_ip_color,sizeof(temp_ip_color),""RED"%s",temp_ip);
- }
- format(temp_string,sizeof(temp_string),""WHITE"%i\t%s\t%s\n",i,temp_date,temp_ip_color);
- strcat(string,temp_string);
- }
- ShowPlayerDialog(playerid,NULL,DIALOG_STYLE_TABLIST_HEADERS,""BLUE"Информация о последних подключениях",string,"Закрыть","");
- }
- else
- {
- ShowPlayerDialog(playerid,NULL,DIALOG_STYLE_MSGBOX,""BLUE"Ошибка","\n"WHITE"Извините, произошла ошибка!\n\n","Закрыть","");
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement