cangncan
Участник
- Сообщения
- 69
- Реакции
- 4
Ребят необходимо сделать из двух плагинов один.
Теперь точнее, нужно в плагин allinfo (полная статистика об игроках) прикрутить проверку на игрока, дабы боты исчезли из логов. Таковая проверка присутствует в плагине jim_users_list помогите реализовать задуманное!
если ссылки в друг не работают вот плагины:
allinfo:
jim_users_list:
Теперь точнее, нужно в плагин allinfo (полная статистика об игроках) прикрутить проверку на игрока, дабы боты исчезли из логов. Таковая проверка присутствует в плагине jim_users_list помогите реализовать задуманное!
если ссылки в друг не работают вот плагины:
allinfo:
C-подобный:
// All Info - Remo Williams - Easiest coding ever I know....lol.
// Flag "C" To Get AllInfo
// This Plugin Logs Each Player's STEAMID, NAME, and IP ADDRESS to a log file.
// It logs the information on connect, and again if you use the command.
// Log File is located at Addons/amxmodx/logs/allinfo_players.txt
// I hate .log files.
// lol.
// Usage: amx_allinfo <Name>
//
//
//
//////////////////////////////////
// Change Log //
//////////////////////////////////////////////////////////
// 1.0 - First Release //
// 1.1 - Removed Non-sense Code //
// - Changed Access Detection Code //
//////////////////////////////////////////////////////////
#include <amxmodx>
#include <amxmisc>
public plugin_init() {
register_plugin("All Info","1.1","Remo Williams")
register_concmd("amx_allinfo","allinfo",ADMIN_KICK," - Obtain the specified users Information")
}
public client_putinserver(id) {
new authid[32], usrip[32], name[32]
get_user_authid(id,authid,31)
get_user_name(id,name,31)
if(!is_user_connected(id)) {
return PLUGIN_HANDLED
}
get_user_ip(id,usrip,31,1)
client_print(id,print_console," ***** [ Name: %s | STEAMID: %s | IP: %s ] ***** ^n",name,authid,usrip)
log_to_file("allinfo_players.txt"," %s | STEAMID: %s | IP: %s ^n",name,authid,usrip)
return PLUGIN_HANDLED
}
public allinfo(id,level,cid) {
if (!cmd_access(id,level,cid,2)) {
return PLUGIN_HANDLED
}
new command[32], arg[32], target, authid[32], usrip[32], name[32]
read_argv(0,command,31)
read_argv(1,arg,31)
target = cmd_target(id,arg,1)
get_user_authid(target,authid,31)
get_user_name(target,name,31)
if(!is_user_connected(target)) {
return PLUGIN_HANDLED
}
get_user_ip(target,usrip,31,1)
client_print(id,print_console," ***** [ Name: %s | STEAMID: %s | IP: %s ] ***** ^n",name,authid,usrip)
log_to_file("allinfo_players.txt"," %s | STEAMID: %s | IP: %s ^n",name,authid,usrip)
return PLUGIN_HANDLED
}
jim_users_list:
C-подобный:
/*
*** Users List by stupok69, with the help of jim_yang ***
This plugin logs the number of users that have joined your server, each user's steamid,
latest nickname, and the number of times the user has connected to the server.
The file is called users_list.txt in 'addons\amxmodx' and is written in this format:
1 STEAMID_0:0:00000 Nickname 1
Credits:
Thanks to jim_yang for utilizing parse correctly.
Thanks to Xanimos, I know how to use the write/read file natives!
*/
#include <amxmodx>
#include <amxmisc>
#define FILENAME "users_list.txt"
new szFile[32]
public plugin_init() {
register_plugin("Users List", "1.0", "stupok69")
new amxxdir[20]
get_basedir(amxxdir, 19)
format(szFile, 31, "%s/%s", amxxdir, FILENAME)
}
public client_authorized(id) {
check_name(id)
return PLUGIN_CONTINUE
}
public check_name(id) {
new pAuth[33], pName[33], Len, szText[101]
get_user_authid(id, pAuth, 32)
if(containi(pAuth,"BOT") != -1)
return PLUGIN_CONTINUE
get_user_name(id, pName, 32)
new lines = file_size(szFile, 1)
new Index[5], Auth[33], Name[33], LogTimes[5]
new logtimes
for(new i=0; i<lines; i++) {
read_file(szFile, i, szText, 100, Len)
parse(szText, Index, 4, Auth, 32, Name, 32, LogTimes, 4)
if(equali(pAuth, Auth)) {
logtimes = str_to_num(LogTimes)
format(szText, 100, "%s %s %s %d", Index, Auth, pName, logtimes + 1)
write_file(szFile, szText, i)
return PLUGIN_CONTINUE
}
}
format(szText, 100, "%d %s %s %d", lines, pAuth, pName, 1)
write_file(szFile, szText)
return PLUGIN_CONTINUE
}
/* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
*{\\ rtf1\\ ansi\\ deff0{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ lang1033\\ f0\\ fs16 \n\\ par }
*/