Raised This Month: $ Target: $400
 0% 

Problem: with TE_DLIGHT 27


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Stephen
Senior Member
Join Date: Aug 2004
Old 02-28-2006 , 18:38   Problem: with TE_DLIGHT 27
Reply With Quote #1

Code:
public worldlight(id, level, cid)
{
	if(!cmd_access(id,level,cid,5))
        	return PLUGIN_HANDLED

	new user[33], space[1], r[4], g[4], b[4], bright[1], time[1], rate[1]
	read_argv(0, user, 32)

	read_argv(1, space, 1)//RADIUS
	new radius = str_to_num(space)

	read_argv(2, r, 3)//Colors
	read_argv(3, g, 3)
	read_argv(4, b, 3)
	new red = str_to_num(r)
	new green = str_to_num(g)
	new blue = str_to_num(b)

	read_argv(5, bright, 1)//Brightness
	new brightness = str_to_num(bright)

	read_argv(6, time, 1)//LifeTime
	new life = str_to_num(time)

	read_argv(7, rate, 1)//Decayrate
	new decayrate = str_to_num(rate)

	new origin[3]
	get_user_origin(id,origin)
	message_begin(MSG_BROADCAST,SVC_TEMPENTITY, origin)
	write_byte( TE_DLIGHT )
	write_coord( origin[0] ); //coord coord coord (position)
	write_coord( origin[1] );
	write_coord( origin[2] );
	write_byte( radius ) //Radius
	write_byte( red ) //Red
	write_byte( green ) //Green
	write_byte( blue ) //Blue
	write_byte( brightness ) //Brightness
	write_byte( life ) //Life
	write_byte( decayrate ) //Decay Rate
	message_end();

	return PLUGIN_HANDLED
}
This is the current snippet i use, BUT it throws me back out to the starting menu.
It does this once i reched the part where i input the BLUE in the console
Radius, red,green = no crash when i press button
radius, red,green, BLUE = crash when i press button
Stephen 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 20:23.


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