Hi there.. I've made this lightmaker plugin, but it wont make the lights like umm.. ill try explain..
now i got the code ( under these lines ), and atm, i can stand on the light like a box and so on.. but i want it to be so i cant stand on it? dunno how to! :s
PHP Code:
CreateLightAiming(const id)
{
if ( !g_admin[id] && !g_gived_access[id] )
{
console_print(id, "You have no access to that command");
return PLUGIN_HANDLED;
}
static origin[3];
static Float:float_origin[3];
get_user_origin(id, origin, 3);
IVecFVec(origin, float_origin);
float_origin[2] += 4.0;
CreateLight(float_origin, "15", "255", "255", "255");
return PLUGIN_HANDLED;
}
CreateLight(Float:origin[3], const radius[], const color_red[], const color_green[], const color_blue[])
{
new ent = create_entity("info_target");
if ( !is_valid_ent(ent) ) return 0;
entity_set_origin(ent, origin);
entity_set_model(ent, g_sprite_light);
entity_set_float(ent, EV_FL_scale, 0.25);
entity_set_string(ent, EV_SZ_classname, g_light_classname);
entity_set_int(ent, EV_INT_solid, SOLID_BBOX); // Isnt it just removing this line??
entity_set_int(ent, EV_INT_movetype, MOVETYPE_NONE);
entity_set_size(ent, Float:{ -3.0, -3.0, -6.0 }, Float:{ 3.0, 3.0, 6.0 });
static Float:color[3];
color[0] = str_to_float(color_red);
color[1] = str_to_float(color_green);
color[2] = str_to_float(color_blue);
entity_set_vector(ent, EV_VEC_rendercolor, color);
SetProperty(ent, 1, radius);
SetProperty(ent, 2, color_red);
SetProperty(ent, 3, color_green);
SetProperty(ent, 4, color_blue);
entity_set_float(ent, EV_FL_nextthink, get_gametime() + 0.01);
return ent;
}
__________________