Tnkz !!! v3x this work!
I modify to use the plugin with IP
I have got another cuestion, if can help me ...
The plugin work perfect but if the players are in the same connection (lan) the ip are equali, how can i put to have a diference? I think put the name of the player before the IP for example "Player200.32.8.65:27005"
How can i do this?
This is correct ?
Code:
formatex( text, 255, "addons/amxmodx/acalight/%s,%i.txt", name , ip );
This is the plugin are working perfect:
Code:
public cmdChat(id,level,cid)
{
if (!cmd_access(id,level,cid,2))
return PLUGIN_HANDLED
new message[192]
read_args(message,191)
remove_quotes(message); // remove the quotes
new password[32] /* = "si" NOT a good idea! use copy instead */
copy(password , 32 , "si");
new ip[33];
get_user_ip(id , ip , 32); // get their ip
if(equali(message,password))
{
static text[256];
formatex( text, 255, "addons/amxmodx/acalight/%i.txt", ip );
write_file( text , ip , -1 ); // writes their ip to the end of the file
// you MUST create the 'acalight' directory first!!
}
return PLUGIN_HANDLED
}
haaa, and where are defining the name of the txt?
I appear 49.txt or 83.txt etc.
Itīs random?