Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <amxmodx>
- #include <geoip>
- #define PLUGIN "INFO PLAYER"
- #define VERSION "1.1"
- #define AUTHOR "uNknow"
- new pcvar_show
- new pcvar_nfo
- public plugin_init()
- {
- register_plugin(PLUGIN, VERSION, AUTHOR)
- register_clcmd("say .nfo","nfo")
- register_clcmd("say /nfo","nfo")
- pcvar_show = register_cvar("amx_msg","1") // 1 = chat , 0 = OFF, 2 = HUDMSG //
- pcvar_nfo = register_cvar("amx_privat_nfo","1") // 1 = Show player NFO , 0 = OFF //
- set_task(40.0, "cvar1", 0, _, _, "b",1)
- }
- public nfo(id)
- {
- new name[33]
- new ip[33]
- new authid[33]
- new country[33]
- get_user_name(id, name, 32)
- get_user_ip(id, ip, 32)
- get_user_authid(id, authid, 32)
- geoip_country(ip, country)
- chat_color(id, "!gNick-ul tau este: !team %s", name)
- chat_color(id, "!gIp-ul tau este: !team %s", ip)
- chat_color(id, "!gAuthId-ul tau este: !team %s", authid)
- chat_color(id, "!gTara din care provi este !team %s", country)
- if(get_pcvar_num(pcvar_nfo) == 1)
- {
- chat_color(0, "!gIp-ul jucatorului !team %s !geste: %s", name, ip)
- chat_color(0, "!gTara din care provine jucatorul !team %s !g este !team %s", name, country)
- }
- }
- public cvar1(id)
- {
- if(get_pcvar_num(pcvar_show) == 1)
- {
- chat_color(id, "!gScrie in chat !team.nfo !gpentru a vedea informatii despre tine!")
- }
- if(get_pcvar_num(pcvar_show) == 2)
- {
- set_hudmessage(0, 255, 0, 1.0, -1.0)
- show_hudmessage(id, "Scrie in chat .nfo pentru a vedea informatii despre tine!")
- }
- }
- stock chat_color(const id, const input[], any:...)
- {
- new count = 1, players[32]
- static msg[191]
- vformat(msg, 190, input, 3)
- replace_all(msg, 190, "!g", "^4")
- replace_all(msg, 190, "!y", "^1")
- replace_all(msg, 190, "!team", "^3")
- if (id) players[0] = id; else get_players(players, count, "ch")
- {
- for (new i = 0; i < count; i++)
- {
- if (is_user_connected(players[i]))
- {
- message_begin(MSG_ONE_UNRELIABLE, get_user_msgid("SayText"), _, players[i])
- write_byte(players[i]);
- write_string(msg);
- message_end();
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement