I tried to rebuild foreign plugin to try because I've never dealt with these things and you just try, I began to read articles and tutorials on scripting, but still fall short of the errors do not appear to understand, I would like tell me where is my mistake in this case, and if you can hang himself how to fix it, with a short, clear and precise explanation.
Here's the code:
PHP Code:
#include <amxmodx>
public plugin_init()
{
register_plugin("ShowIP", "1.0", "****")
register_concmd("amx_showip", "cmd_showip", ADMIN_ALL);
}
public cmd_showip(id)
{
new players[32], num, number;
get_players(players, num)
console_print(id,"----------------------Clients on server----------------------")
console_print(id, " # NickName IP STEAM ID Frags Deaths Ping Team")
for(number = 0 ; number < num ; number++)
{
new name[32], ip[32], authid[32], frags[0], deaths[0], ping[1], team[2];
get_user_name(players[number], name, charsmax(name))
get_user_ip(players[number], ip, charsmax(ip), 1)
get_user_authid(players[number], authid , charsmax(authid))
get_user_frags(frags)
get_user_deaths(deaths)
get_user_ping(ping, 1, 0)
get_user_team(team, team[]="", charsmax(team))
console_print(id, "%d %s %s", number+1, name, ip)
}
console_print(id,"----------------------Clients on server----------------------")
console_print(id, "The total number of players in the server is currently: %d", num)
return PLUGIN_HANDLED
}
Author of the plugin I have not hid to copy, replacement and the like so I found it in another site!
I Altered only part of the plugin:
PHP Code:
console_print(id,"----------------------Clients on server----------------------")
console_print(id, " # NickName IP STEAM ID Frags Deaths Ping Team")
for(number = 0 ; number < num ; number++)
{
new name[32], ip[32], authid[32], frags[0], deaths[0], ping[1], team[2];
get_user_name(players[number], name, charsmax(name))
get_user_ip(players[number], ip, charsmax(ip), 1)
get_user_authid(players[number], authid , charsmax(authid))
get_user_frags(frags)
get_user_deaths(deaths)
get_user_ping(ping, 1, 0)
get_user_team(team, team[]="", charsmax(team))
console_print(id, "%d %s %s", number+1, name, ip)
}
console_print(id,"----------------------Clients on server----------------------")
console_print(id, "The total number of players in the server is currently: %d", num)
And then only one works Altered just what it is normally, is alien and it is Nick and IP my idea is something new to be done to diversify, because I read a million threads with the same plug-ins do not know watching right now just in your forum some guy had started a topic that had a new show ip who was the provider of your Internet May was not sure!
My English is very very bad but I do not know much, but it's enough for me right!