Raised This Month: $51 Target: $400
 12% 

Light Maker fix light.


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
HBxander
Senior Member
Join Date: Jan 2011
Location: Behind you!
Old 05-03-2011 , 09:19   Light Maker fix light.
Reply With Quote #1

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(idorigin3);
    
IVecFVec(originfloat_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(entorigin);
    
entity_set_model(entg_sprite_light);
    
entity_set_float(entEV_FL_scale0.25);
    
entity_set_string(entEV_SZ_classnameg_light_classname);
    
entity_set_int(entEV_INT_solidSOLID_BBOX); // Isnt it just removing this line??
    
entity_set_int(entEV_INT_movetypeMOVETYPE_NONE);
    
    
entity_set_size(entFloat:{ -3.0, -3.0, -6.0 }, Float:{ 3.03.06.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(entEV_VEC_rendercolorcolor);
    
    
SetProperty(ent1radius);
    
SetProperty(ent2color_red);
    
SetProperty(ent3color_green);
    
SetProperty(ent4color_blue);
    
    
entity_set_float(entEV_FL_nextthinkget_gametime() + 0.01);
    
    return 
ent;

__________________
Selling:

- PointMod for Hide And Seek - $20
- Private BlockMaker with Weapon Block And More - $50
- Achievements ( FFA GamePlay ) - $25

PM Me about Private Work!

Last edited by HBxander; 05-03-2011 at 09:22.
HBxander is offline
jc980
Veteran Member
Join Date: Jan 2010
Location: God is with us...
Old 05-03-2011 , 09:29   Re: Light Maker fix light.
Reply With Quote #2

havent you used TE_DLIGHT?

message_begin(MSG_ONE_UNRELIABLE, SVC_TEMPENTITY, _, id)
write_byte(TE_DLIGHT) // TE id
write_coord(origin[0]) // x
write_coord(origin[1]) // y
write_coord(origin[2]) // z
write_byte(radius) // radius
write_byte(color_red) // r
write_byte(color_green) // g
write_byte(color_blue) // b
write_byte(get_gametime()) // life
write_byte(0) // decay rate
message_end()

PS: you need id.
__________________
jc980 is offline
HBxander
Senior Member
Join Date: Jan 2011
Location: Behind you!
Old 05-03-2011 , 09:31   Re: Light Maker fix light.
Reply With Quote #3

No i dont need to use id dude :-)

- all i need to know is how i do remove make it not solid..
__________________
Selling:

- PointMod for Hide And Seek - $20
- Private BlockMaker with Weapon Block And More - $50
- Achievements ( FFA GamePlay ) - $25

PM Me about Private Work!
HBxander is offline
pRoxxxDD
Junior Member
Join Date: Feb 2011
Location: Ukraine
Old 05-03-2011 , 09:35   Re: Light Maker fix light.
Reply With Quote #4

SOLID_NOT ?
__________________
pRoxxxDD is offline
HBxander
Senior Member
Join Date: Jan 2011
Location: Behind you!
Old 05-03-2011 , 09:37   Re: Light Maker fix light.
Reply With Quote #5

ye, but how ? just like this ;
PHP Code:
entity_set_int entEV_INT_solidSOLID_NOT 
or what?

E: havent used solid stuff before just seen this in another plugin and would test it, dont normally use stuff like this :-)
__________________
Selling:

- PointMod for Hide And Seek - $20
- Private BlockMaker with Weapon Block And More - $50
- Achievements ( FFA GamePlay ) - $25

PM Me about Private Work!
HBxander is offline
pRoxxxDD
Junior Member
Join Date: Feb 2011
Location: Ukraine
Old 05-04-2011 , 05:38   Re: Light Maker fix light.
Reply With Quote #6

Quote:
Originally Posted by HBxander View Post
ye, but how ? just like this ;
PHP Code:
entity_set_int entEV_INT_solidSOLID_NOT 
or what?

E: havent used solid stuff before just seen this in another plugin and would test it, dont normally use stuff like this :-)
Yup, and you don't need this string:
PHP Code:
 entity_set_size(entFloat:{ -3.0, -3.0, -6.0 }, Float:{ 3.03.06.0 }); 
__________________
pRoxxxDD is offline
Reply



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:24.


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