[ZE] EXTRA ITEM: BUNKER BUSTER LTD

Zombies/Humans Extra-Items
NOVA
Member
Member
Great Britain
Posts: 16
Joined: 2 Months Ago
Has thanked: 1 time
Been thanked: 1 time
Contact:

Re: [ZE] EXTRA ITEM: BUNKER BUSTER LTD

#11

Post by NOVA » 2 Weeks Ago

UPDATED !!
*USED RAHEEM METHOD for Entity Removing :)

User avatar
Raheem
Mod Developer
Mod Developer
Posts: 2126
Joined: 4 Years Ago
Has thanked: 44 times
Been thanked: 132 times
Age: 23
Contact:

#12

Post by Raheem » 1 Week Ago

Some tips:
  1. Avoid using engine module from AMXX as much as possible, use instead ReAPI engine functions.
  2. Use ReGameDLL functions as much as possible, consider always dropping AMXX functions if there are alternatives in ReAPI.
  3. After creating the entity you must ensure it exists, my tests says that AMXX won't give wrong values after directly it's created.
    • Example:
      1. public Create_Plane(id,Float:sOrigin[3],Float:eOrigin[3])
      2. {
      3.     new i_Ent = engfunc(EngFunc_CreateNamedEntity, engfunc(EngFunc_AllocString, "func_breakable"));
      4.    
      5.     entity_set_model(i_Ent,MODELS[M_PLANE]);
      6.    
      7.     set_pev(i_Ent, pev_classname, C_Plane);
      8.     set_pev(i_Ent, pev_solid, SOLID_NOT);
      9.     set_pev(i_Ent, pev_movetype, MOVETYPE_NOCLIP);
      10.    
      11.     sOrigin[2] = GetMaxHeight(i_Ent,sOrigin);
      12.    
      13.     set_pev(i_Ent, pev_origin,sOrigin);
      14.     set_pev(i_Ent, pev_iuser1,id);
      15.    
      16.     set_pev(i_Ent, pev_vuser1,sOrigin);
      17.     set_pev(i_Ent, pev_vuser2,eOrigin);
      18.    
      19.     Aim_To_Target(i_Ent,eOrigin);
      20.    
      21.     fm_set_rendering(i_Ent,kRenderFxNone,0,0,0,kRenderTransAlpha,0);
      22.    
      23.     g_iEntExist[i_Ent] = 1;
      24.    
      25.     // This is Random Value , I Am Not Sure When To Remove , Bcz This Depends On Map Size :-D
      26.    
      27.     set_task(20.0,"Kill_Remove",i_Ent);
      28.     set_task(4.0,"Task_Fly",i_Ent);
      29.    
      30.     set_pev(i_Ent, pev_nextthink,get_gametime() + 4.0);
      31. }
      TO:
      1. public Create_Plane(id,Float:sOrigin[3],Float:eOrigin[3])
      2. {
      3.     #define PDATA_SAFE 2
      4.    
      5.     new i_Ent = engfunc(EngFunc_CreateNamedEntity, engfunc(EngFunc_AllocString, "func_breakable"));
      6.    
      7.     if (pev_valid(i_Ent) != PDATA_SAFE)
      8.         return
      9.    
      10.     entity_set_model(i_Ent,MODELS[M_PLANE]);
      11.    
      12.     set_pev(i_Ent, pev_classname, C_Plane);
      13.     set_pev(i_Ent, pev_solid, SOLID_NOT);
      14.     set_pev(i_Ent, pev_movetype, MOVETYPE_NOCLIP);
      15.    
      16.     sOrigin[2] = GetMaxHeight(i_Ent,sOrigin);
      17.    
      18.     set_pev(i_Ent, pev_origin,sOrigin);
      19.     set_pev(i_Ent, pev_iuser1,id);
      20.    
      21.     set_pev(i_Ent, pev_vuser1,sOrigin);
      22.     set_pev(i_Ent, pev_vuser2,eOrigin);
      23.    
      24.     Aim_To_Target(i_Ent,eOrigin);
      25.    
      26.     fm_set_rendering(i_Ent,kRenderFxNone,0,0,0,kRenderTransAlpha,0);
      27.    
      28.     g_iEntExist[i_Ent] = 1;
      29.    
      30.     // This is Random Value , I Am Not Sure When To Remove , Bcz This Depends On Map Size :-D
      31.    
      32.     set_task(20.0,"Kill_Remove",i_Ent);
      33.     set_task(4.0,"Task_Fly",i_Ent);
      34.    
      35.     set_pev(i_Ent, pev_nextthink,get_gametime() + 4.0);
      36. }
    And so on, after creating any entity you must ensure it exists this way.
Update these, and I'll test after.
He who fails to plan is planning to fail

NOVA
Member
Member
Great Britain
Posts: 16
Joined: 2 Months Ago
Has thanked: 1 time
Been thanked: 1 time
Contact:

#13

Post by NOVA » 1 Week Ago

Okay Boss :-D

Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests