any idea why in the "public banhaxor" the ban reason only printed as the first character from the reason, eg the reason is "wallhack & aimbot" it will be printed as "w" only
Code:
{
// .....
new reason[64], minutes[8]
new cData[100]
cData[0] = haxor //id
cData[1] = str_to_num(minutes)
copy(cData[2], charsmax(cData)-1, reason)
set_task(0.5, "banhaxor", haxor, cData, 3)
return PLUGIN_HANDLED
}
public banhaxor(cData[])
{
new haxorid = cData[0]
new bantime = cData[1]
new banreason[64]
copy(banreason, charsmax(banreason), cData[2])
// debug
log_amx("userid: #%d bantime: %d banreason: ^"%s^"", get_user_userid(haxorid), bantime, banreason)
// ....
}
Code:
L 01/04/2009 - 18:06:29: [amx_banhaxor.amxx] userid: #1 bantime: 1 banreason: "w"