Raised This Month: $ Target: $400
 0% 

Solved [ H3LP ] Explode entity ?


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
CrazY.
Veteran Member
Join Date: May 2015
Location: SP, Brazil
Old 04-03-2017 , 18:30   [ H3LP ] Explode entity ?
Reply With Quote #1

Hey AlliedModders, currently I am developing a simple spawn model effect. Crazy? about what you are talkig (what the hell are this) ? Well, when a player spawn, a egg model is added into the player origin. I want explode this egg, but the egg model dont have a explode animation, then I used the following code to do that, but dont work well. Any idea?

Code:
public fw_PlayerSpawn_Post(id) {     if (!is_user_alive(id) || !cs_get_user_team(id))         return;             new entity = create_entity("info_target");         if (!pev_valid(entity))         return;             new Float:origin[3];     entity_get_vector(id, EV_VEC_origin, origin);         set_pev(entity, pev_body, 1);     entity_set_model(entity, EGG_MODEL);         origin[2] -= 25;     entity_set_origin(entity, origin);         set_pev(entity, pev_owner, id);     entity_set_string(entity, EV_SZ_classname, "egg_class");     entity_set_int(entity, EV_INT_solid, 2);         if (get_cvar_num("mp_freezetime") <= 0)         explode_egg(id); } public explode_egg(id) {     if (!is_user_connected(id))         return;             new entity = find_ent_by_owner(0, "egg_class", id);         // I dont know exactly if this is correct.     set_pev(entity, pev_framerate, 1.0);         //remove_entity(entity); }
__________________









Last edited by CrazY.; 04-05-2017 at 18:23.
CrazY. is offline
 



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 17:51.


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