Hello everyone!
There is a plugin that I wrote myself, I create an object with this plugin and when I press the e key on the object, I give some properties to the player.
However, only the middle part of the object I created can be pressed with the e key. The entire model is not pressed, how can I solve this problem?
Related line of code;
There is a plugin that I wrote myself, I create an object with this plugin and when I press the e key on the object, I give some properties to the player.
However, only the middle part of the object I created can be pressed with the e key. The entire model is not pressed, how can I solve this problem?
Related line of code;
Код:
new Float:szData[ArrayData];
GetRandomOrigin(szData);
new Entity = rg_create_entity("func_button")
if(!Entity)
return PLUGIN_HANDLED
GlobalEntityID = Entity
new Float:OriginThrow[3]
new Float:OriginalChange[3]
OriginThrow[0] = szData[X]
OriginThrow[1] = szData[Y]
OriginThrow[2] = szData[Z]
OriginalChange[1] = szData[ANGLES]
OriginalChange[0] = 0.0
OriginalChange[2] = szData[ANGLES2]
set_entvar(Entity, var_classname,NESNEMODEL)
set_entvar(Entity, var_origin, OriginThrow);
set_entvar(Entity, var_angles, OriginalChange)
set_entvar(Entity, var_model, NESNEMODEL)
set_entvar(Entity, var_modelindex, NesneModelIndex)
set_entvar(Entity, var_movetype, MOVETYPE_FLY)
set_entvar(Entity, var_solid, SOLID_SLIDEBOX)
EntitySetGlow(Entity, random_num(0, 255),random_num(0, 255), random_num(0, 255))
emit_sound(Entity, CHAN_ITEM, "boxextra/activated.wav", VOL_NORM, ATTN_NORM, 0, PITCH_NORM)
SetUse(Entity, "@UseEntity")
return Entity
@UseEntity(Entity, id)
{
set_user_health(id,100)
}