Raised This Month: $ Target: $400
 0% 

[HELP] Check the entity_set_float


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Flick3rR
Veteran Member
Join Date: Feb 2014
Location: Bulgaria, Stara Zagora
Old 03-26-2014 , 15:09   [HELP] Check the entity_set_float
Reply With Quote #1

Hi, guys! I've asked you long time ago for setting invisibility on user, so I did it (someone helped me) with engine, not wit rendering. So, I want to ask how to check if the entity_set_float is 12.75. Here is the menu option:
PHP Code:
case 8:
        {
            new 
iPari cs_get_user_money(id);
            new 
iCena get_pcvar_num(CenaInvisible);
            if (!(
is_user_alive(id)))
                {
                    
ColorMessage(id"^%s%s ^3You've to be ^4alive^3, to buy this item!"get_pcvar_num(cvar_color), Prefiks);
                    return 
PLUGIN_HANDLED;
                }
            if(!(
get_pcvar_num(Invisibleon)))
                {
                    
ColorMessage(id"^%s%s ^3Owner has disabled ^4Invisible ^3from the shop!"get_pcvar_num(cvar_color), Prefiks);
                    return 
PLUGIN_HANDLED;
                }
            if (!(
cs_get_user_money(id) >= iCena))
                {
                    
ColorMessage(id"^%s%s ^3You don't have enough ^4money!"get_pcvar_num(cvar_color), Prefiks);
                    return 
PLUGIN_HANDLED;
                }
            
entity_set_int(idEV_INT_rendermodekRenderTransAlpha);
            
entity_set_float(idEV_FL_renderamt12.75);
            
cs_set_user_money(idiPari iCena);
            
ColorMessage(id"^%s%s ^3You bought ^4Invisible"get_pcvar_num(cvar_color), Prefiks);
        } 
I think that it should be something like:
PHP Code:
if(entity_set_int(idEV_INT_rendermodekRenderTransAlpha))

or

if(
entity_get_float(idEV_FL_renderamt12.75)) 
I just want to put some other "if" in there for the invisibility check.
Really thanks to all of you!
Flick3rR is offline
Send a message via Skype™ to Flick3rR
Black Rose
Veteran Member
Join Date: Feb 2011
Location: Stockholm, Sweden
Old 03-26-2014 , 16:30   Re: [HELP] Check the entity_set_float
Reply With Quote #2

Code:
if(entity_get_int(id, EV_INT_rendermode) == kRenderTransAlpha) if(entity_get_float(id, EV_FL_renderamt) == 12.75)

Don't understand what you're using it for though.
__________________

Last edited by Black Rose; 03-26-2014 at 16:30.
Black Rose is offline
Flick3rR
Veteran Member
Join Date: Feb 2014
Location: Bulgaria, Stara Zagora
Old 03-26-2014 , 16:45   Re: [HELP] Check the entity_set_float
Reply With Quote #3

Quote:
Originally Posted by Black Rose View Post
Code:
if(entity_get_int(id, EV_INT_rendermode) == kRenderTransAlpha) if(entity_get_float(id, EV_FL_renderamt) == 12.75)

Don't understand what you're using it for though.
Well, it's about an invisibility. I just want to check if the invisibility is already set, and if it is, to return the plugin handled. That's all. I'll try it like this! Thanks.
P.S.: I've already said that I'm not using rendering.

----26.03.14; 22:51----
If I put these two in one check, maybe like this:
PHP Code:
if(entity_get_int(idEV_INT_rendermode) == kRenderTransAlpha
&& entity_get_float(idEV_FL_renderamt) == 12.75
will it be fine?

Last edited by Flick3rR; 03-26-2014 at 16:53.
Flick3rR is offline
Send a message via Skype™ to Flick3rR
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 05:58.


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