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