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(id, EV_INT_rendermode, kRenderTransAlpha);
entity_set_float(id, EV_FL_renderamt, 12.75);
cs_set_user_money(id, iPari - 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(id, EV_INT_rendermode, kRenderTransAlpha))
or
if(entity_get_float(id, EV_FL_renderamt, 12.75))
I just want to put some other "if" in there for the invisibility check.
Really thanks to all of you!