Raised This Month: $ Target: $400
 0% 

Ban reasons only showing the 1st character


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Mlk27
Veteran Member
Join Date: May 2008
Old 01-05-2009 , 04:25   Ban reasons only showing the 1st character
Reply With Quote #1

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"
Mlk27 is offline
 


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 09:05.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode