AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Attach Sprite on model (https://forums.alliedmods.net/showthread.php?t=3744)

sanaell 07-13-2004 05:58

Attach Sprite on model
 
Code:
    VelocityByAim(id, 600 , velocity)       entity_set_int(NewItem, EV_INT_renderfx, kRenderFxGlowShell)     entity_set_float(NewItem, EV_FL_renderamt, 150.0)     entity_set_int(NewItem, EV_INT_rendermode, kRenderTransAlpha)     entity_set_vector(NewItem, EV_VEC_rendercolor,Color)                                                                                                                     entity_set_string(NewItem, EV_SZ_classname, "wc3item2")     entity_set_model(NewItem, "models/bag.mdl")                                                                                                                     entity_set_vector(NewItem, EV_VEC_mins, MinBox)     entity_set_vector(NewItem, EV_VEC_maxs, MaxBox)     entity_get_vector(id, EV_VEC_origin, g_origin)     entity_set_origin(NewItem, g_origin)                                                                                                                     entity_set_int(NewItem, EV_INT_effects, 32)     entity_set_int(NewItem, EV_INT_solid, 1)     entity_set_int(NewItem, EV_INT_movetype, 6)     entity_set_edict(NewItem, EV_ENT_owner, id)     entity_set_int(NewItem, EV_INT_iuser4, playeritem2[id])                                                                                                                     entity_set_vector(NewItem, EV_VEC_velocity, velocity)

Someone can help me for attach a sprite under the TEMP ENTITY (we can drop & get it)
all work, but the sprite....

the sprite was called icon_item

and other thing someone know where i can found
Code:
    entity_set_int(NewItem, EV_INT_effects, 32)     entity_set_int(NewItem, EV_INT_solid, 1)
definition of solid etc..... for have better effect or other stuf

sanaell 07-14-2004 11:21

Help help helppppppp
 
Code:
new itemClassName[MAX_NAME_LENGTH], playerClassname[MAX_NAME_LENGTH],itemicon[32]         new Float:g_origin[3]         #if defined _amxmodx_included             entity_get_string(tid, EV_SZ_classname, itemClassName, MAX_NAME_LENGTH-1);             entity_get_string(id, EV_SZ_classname, playerClassname, MAX_NAME_LENGTH-1)             entity_get_vector(tid, EV_VEC_origin, g_origin);         #else             Entvars_Get_String(tid, EV_SZ_classname, itemClassName, MAX_NAME_LENGTH-1);             Entvars_Get_String(id, EV_SZ_classname, playerClassname, MAX_NAME_LENGTH-1)             Entvars_Get_Vector(tid,EV_VEC_origin, g_origin);         #endif         #if defined _amxmodx_included             itemicon[tid] = entity_get_int(tid, EV_INT_iuser4)         #else             itemicon[tid] = Entvars_Get_Int(tid, EV_INT_iuser4)         #endif         new bool:showitem=false         new item_icon         if(equal(itemClassName,"wc3item1")){         switch(itemicon[tid]){               case ANKH:    {item_icon=ankh;}                 case BOOTS:     {item_icon=boots;}                 case CLAWS:     {item_icon=claws;}                 case CLOAK:     {item_icon=cloak;}                 case MASK:  {item_icon=mask;}                 case IMMUNITY:  {item_icon=immunity;}                 case FROST:     {item_icon=frost;}                 case HEALTH:    {item_icon=healthitem;}             }         showitem = true         }         if(equal(itemClassName,"wc3item2")){             switch(itemicon[tid]){                 case RESPAWN:   {item_icon=respawn;}                 case PROTECTANT:    {item_icon=protectant;}                 case HELM:  {item_icon=helm;}                 case CAT:   {item_icon=cat;}                 case FEATHER:   {item_icon=feather;}                 case INFERNO:   {item_icon=inferno;}                 case REGEN:     {item_icon=regen;}                 case CHAMELEON:     {item_icon=chameleon;}                 case MOLE:  {item_icon=mole;}             }                 showitem = true         }         if(showitem){             message_begin( MSG_ONE, SVC_TEMPENTITY, { 0, 0, 0 }, id )             write_byte(17);             write_coord( floatround(g_origin[0]) + 50 );             write_coord( floatround(g_origin[1]) + 50 );             write_coord( floatround(g_origin[2]) + 50 );             write_short(item_icon);             write_byte(10);             write_byte(128);             message_end();          }

Why that don t work !


All times are GMT -4. The time now is 14:50.

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