I rewrote it since your code is basically unworkable (at least to me). There's no real way to detect 10% of their XP, so I just left that part out:
Code:
#include <amxmodx>
#include <amxmisc>
public plugin_init()
{
register_plugin("Give XP","1.0","Hawk552")
register_clcmd("say","CmdSay")
}
public CmdSay(id)
{
static Args[6][33],Name[33]
new Num = read_argc()
for(new Count = 1;Count <= Num;Count++)
read_argv(Count,Args[Count - 1],32)
if(!equali(Args[0],"/transferxp"))
return
new XP = str_to_num(Args[Num - 1])
if(XP < 1)
{
client_print(id,print_chat,"[WAR3FT] You must give more than 0 XP (entered %d)",XP)
return
}
for(new Count = 1,Len;Count <= Num - 2;Count++)
Len += copy(Name[Len],32 - Len,Args[Count])
new Target = cmd_target(id,Name,0)
if(!Target || !is_user_connected(Target))
{
client_print(id,print_chat,"[WAR3FT] Could not find a user matching your input")
return
}
get_user_name(id,Name,32)
static tName[33]
get_user_name(Target,Name,32)
client_print(0,print_chat,"[WAR3FT] %s is giving %s %d XP",Name,tName,XP)
server_cmd("amx_givexp ^"%s^" %d",tName,XP)
server_cmd("amx_givexp ^"%s^" -%d",Name,XP)
}
1) You can give more XP than you have.
This is more an example than anything - you could integrate it into your WC3 plugin (I'm guessing FT) to give the ability to check the XP of these players.