Convert from any mod >> Zombie Escape

Helping Topics
Post Reply
User avatar
Jack GamePlay
Mod Developer
Mod Developer
Egypt
Posts: 577
Joined: 2 Years Ago
Location: Egypt
Has thanked: 34 times
Been thanked: 47 times
Age: 19
Contact:

Convert from any mod >> Zombie Escape

#1

Post by Jack GamePlay » 11 Months Ago

In this topic, i will show you how to convert any item to our zombie escape mod. The following steps will help you.

Let's start! :smiley:

We will take this gun's code as example ( i really do not know what it is).


| Main code:

  1. /* Plugin generated by AMXX-Studio */
  2.  
  3. #include <amxmodx>
  4. #include <fakemeta>
  5. #include <fakemeta_util>
  6. #include <engine>
  7. #include <hamsandwich>
  8. #include <xs>
  9.  
  10. #define PLUGIN "M249 Phoenix"
  11. #define VERSION "1.0"
  12. #define AUTHOR "Bim Bim Cay"
  13.  
  14. // Models
  15. #define v_model "models/v_buffm249.mdl"
  16. #define p_model "models/p_buffm249.mdl"
  17. #define w_model "models/w_buffm249.mdl"
  18.  
  19. // Sounds
  20. new const BuffM249_Sounds[4][] =
  21. {
  22.     "weapons/buffm249-1.wav",
  23.     "weapons/buffm249-2.wav",
  24.     "weapons/buffm249_scream.wav",
  25.     "weapons/buffm249_loop.wav"
  26. }
  27.  
  28. // Sprites
  29. #define muzzleflash "sprites/muzzleflash43.spr"
  30. #define lasersprite "sprites/smoke.spr"
  31.  
  32. // Animations
  33. #define ANIM_IDLE   0
  34. #define ANIM_SHOOT1 1
  35. #define ANIM_SHOOT2 2
  36. #define ANIM_RELOAD     3
  37. #define ANIM_DRAW   4
  38.  
  39. #define ANIM_EXTENSION  "m249"
  40.  
  41. // Entity Classname
  42. #define MUZZLEFLASH_CLASSNAME "Muzzle_M249Phoenix"
  43.  
  44. // Configs
  45. #define WEAPON_NAME         "weapon_buffm249"
  46. #define WEAPON_BASE     "weapon_sg552"
  47.  
  48. #define WEAPON_MAX_CLIP     100
  49. #define WEAPON_DEFAULT_AMMO 200
  50.  
  51. #define WEAPON_SHOOT_DAMAGE 150.0
  52. #define WEAPON_SHOOT_DAMAGEZ    400.0
  53.  
  54. #define WEAPON_TIME_NEXT_ATTACK 0.1
  55. #define WEAPON_TIME_NEXT_ATTACKZ 0.75
  56.  
  57. #define WEAPON_SHOOT_ACCURACY 94.0
  58.  
  59. // MACROS
  60. #define Get_BitVar(%1,%2) (%1 & (1 << (%2 & 31)))
  61. #define Set_BitVar(%1,%2) %1 |= (1 << (%2 & 31))
  62. #define UnSet_BitVar(%1,%2) %1 &= ~(1 << (%2 & 31))
  63.  
  64. #define INSTANCE(%0) ((%0 == -1) ? 0 : %0)
  65. #define IsValidPev(%0) (pev_valid(%0) == 2)
  66. #define IsObserver(%0) pev(%0,pev_iuser1)
  67. #define MUZZLE_INTOLERANCE 100
  68. #define OBS_IN_EYE 4
  69.  
  70. // Shell
  71. #define MODEL_SHELL "models/rshell.mdl"
  72.  
  73. new g_iszWeaponKey
  74. new g_iForwardDecalIndex
  75. new iShellModelIndex
  76. new g_SprTrail
  77.  
  78. // Safety
  79. new g_HamBot
  80. new g_IsConnected, g_IsAlive
  81.  
  82. public plugin_init()
  83. {
  84.     register_plugin(PLUGIN, VERSION, AUTHOR)
  85.    
  86.     // Safety
  87.     Register_SafetyFunc()
  88.    
  89.     // Forward
  90.     register_forward(FM_UpdateClientData, "fw_UpdateClientData_Post", 1)
  91.     register_forward(FM_TraceLine, "fw_TraceLine_Post", 1)
  92.     register_forward(FM_PlaybackEvent, "fw_PlaybackEvent")
  93.     register_forward(FM_SetModel, "fw_SetModel")
  94.    
  95.     unregister_forward(FM_DecalIndex, g_iForwardDecalIndex, 1)
  96.    
  97.     // Think
  98.     register_think(MUZZLEFLASH_CLASSNAME, "fw_MuzzleFlash_Think")
  99.    
  100.     // Ham
  101.     RegisterHam(Ham_Spawn, "weaponbox", "fw_Weaponbox_Spawn_Post", 1)
  102.    
  103.     RegisterHam(Ham_Item_Deploy, WEAPON_BASE, "fw_Item_Deploy_Post", 1)
  104.     RegisterHam(Ham_Item_PostFrame, WEAPON_BASE, "fw_Item_PostFrame")
  105.     RegisterHam(Ham_Weapon_Reload, WEAPON_BASE, "fw_Weapon_Reload")
  106.     RegisterHam(Ham_Weapon_WeaponIdle, WEAPON_BASE, "fw_Weapon_WeaponIdle")
  107.     RegisterHam(Ham_Weapon_PrimaryAttack, WEAPON_BASE, "fw_Weapon_PrimaryAttack")
  108.    
  109.     RegisterHam(Ham_TraceAttack, "func_breakable", "fw_TraceAttack_Entity")
  110.     RegisterHam(Ham_TraceAttack, "info_target", "fw_TraceAttack_Entity")
  111.     RegisterHam(Ham_TraceAttack, "player", "fw_TraceAttack_Entity")
  112.    
  113.     register_clcmd("say /get", "Get_MyWeapon")
  114. }
  115.  
  116. public plugin_precache()
  117. {
  118.     precache_model(v_model)
  119.     precache_model(p_model)
  120.     precache_model(w_model)
  121.  
  122.     precache_model(muzzleflash)
  123.    
  124.     for(new i = 0; i < sizeof(BuffM249_Sounds); i++)
  125.         precache_sound(BuffM249_Sounds[i])
  126.    
  127.     iShellModelIndex = precache_model(MODEL_SHELL)
  128.     g_SprTrail = precache_model(lasersprite)
  129.    
  130.     g_iszWeaponKey = engfunc(EngFunc_AllocString, WEAPON_NAME)
  131.     g_iForwardDecalIndex = register_forward(FM_DecalIndex, "fw_DecalIndex_Post", 1)
  132. }
  133.  
  134. public client_putinserver(iPlayer)
  135. {
  136.     Safety_Connected(iPlayer)
  137.    
  138.     if(!g_HamBot && is_user_bot(iPlayer))
  139.     {
  140.         g_HamBot = 1
  141.         set_task(0.1, "Register_HamBot", iPlayer)
  142.     }
  143. }
  144.  
  145. public Register_HamBot(iPlayer)
  146. {
  147.     Register_SafetyFuncBot(iPlayer)
  148.     RegisterHamFromEntity(Ham_TraceAttack, iPlayer, "fw_TraceAttack_Entity")   
  149. }
  150.  
  151. public client_disconnect(iPlayer)
  152. {
  153.     Safety_Disconnected(iPlayer)
  154. }
  155.  
  156. public Get_MyWeapon(iPlayer)
  157. {
  158.     Weapon_Give(iPlayer)
  159. }
  160.  
  161. //**********************************************
  162. //* Forward Hooking                            *
  163. //**********************************************
  164. public fw_UpdateClientData_Post(iPlayer, sendweapons, CD_Handle)
  165. {
  166.     enum
  167.     {
  168.         SPEC_MODE,
  169.         SPEC_TARGET,
  170.         SPEC_END
  171.     }
  172.      
  173.     static aSpecInfo[33][SPEC_END]
  174.    
  175.     static iTarget
  176.     static iSpecMode
  177.     static iActiveItem
  178.    
  179.     iTarget = (iSpecMode = IsObserver(iPlayer)) ? pev(iPlayer, pev_iuser2) : iPlayer
  180.    
  181.     if(!is_alive(iTarget))
  182.         return FMRES_IGNORED
  183.    
  184.     iActiveItem = get_pdata_cbase(iTarget, 373, 5)
  185.    
  186.     if(!IsValidPev(iActiveItem) || !IsCustomItem(iActiveItem))
  187.         return FMRES_IGNORED
  188.    
  189.     if(iSpecMode)
  190.     {
  191.         if(aSpecInfo[iPlayer][SPEC_MODE] != iSpecMode)
  192.         {
  193.             aSpecInfo[iPlayer][SPEC_MODE] = iSpecMode
  194.             aSpecInfo[iPlayer][SPEC_TARGET] = 0
  195.         }
  196.        
  197.         if(iSpecMode == OBS_IN_EYE && aSpecInfo[iPlayer][SPEC_TARGET] != iTarget)
  198.         {
  199.             aSpecInfo[iPlayer][SPEC_TARGET] = iTarget
  200.            
  201.             Weapon_SendAnim(iPlayer, iActiveItem, ANIM_IDLE)
  202.         }
  203.     }
  204.    
  205.     set_cd(CD_Handle, CD_flNextAttack, get_gametime() + 0.001)
  206.    
  207.     return FMRES_HANDLED
  208. }
  209.  
  210. public fw_TraceLine_Post(Float:TraceStart[3], Float:TraceEnd[3], fNoMonsters, iEntToSkip, iTrace) <FireBullets: Enabled>
  211. {
  212.     static Float:vecEndPos[3]
  213.    
  214.     get_tr2(iTrace, TR_vecEndPos, vecEndPos)
  215.     engfunc(EngFunc_TraceLine, vecEndPos, TraceStart, fNoMonsters, iEntToSkip, 0)
  216.    
  217.     UTIL_GunshotDecalTrace(0)
  218.     UTIL_GunshotDecalTrace(iTrace, true)
  219. }
  220.  
  221. public fw_TraceLine_Post() </* Empty statement */>
  222. {
  223.     /* Fallback */
  224. }
  225.  
  226. public fw_TraceLine_Post() <FireBullets: Disabled> 
  227. {
  228.     /* Do notning */
  229. }
  230.  
  231. public fw_PlaybackEvent() <FireBullets: Enabled>
  232. {
  233.     return FMRES_SUPERCEDE
  234. }
  235.  
  236. public fw_PlaybackEvent() </* Empty statement */>      
  237. {
  238.     return FMRES_IGNORED
  239. }
  240.  
  241. public fw_PlaybackEvent() <FireBullets: Disabled>      
  242. {
  243.     return FMRES_IGNORED
  244. }
  245.  
  246. //**********************************************
  247. //* Weaponbox world model.                     *
  248. //**********************************************
  249. public fw_SetModel(iEntity) <WeaponBox: Enabled>
  250. {
  251.     state WeaponBox: Disabled
  252.    
  253.     if(!IsValidPev(iEntity))
  254.         return FMRES_IGNORED
  255.    
  256.     #define MAX_ITEM_TYPES  6
  257.     for(new i, iItem; i < MAX_ITEM_TYPES; i++)
  258.     {
  259.         iItem = get_pdata_cbase(iEntity, 34 + i, 4)
  260.        
  261.         if(IsValidPev(iItem) && IsCustomItem(iItem))
  262.         {
  263.             engfunc(EngFunc_SetModel, iEntity, w_model)
  264.             return FMRES_SUPERCEDE
  265.         }
  266.     }
  267.    
  268.     return FMRES_IGNORED
  269. }
  270.  
  271. public fw_SetModel() </* Empty statement */>   
  272. {
  273.     /*  Fallback  */
  274.     return FMRES_IGNORED
  275. }
  276. public fw_SetModel() <WeaponBox: Disabled> 
  277. {
  278.     /* Do nothing */
  279.     return FMRES_IGNORED
  280. }
  281.  
  282. public fw_Weaponbox_Spawn_Post(iWeaponBox)
  283. {
  284.     if(IsValidPev(iWeaponBox))
  285.     {
  286.         state (IsValidPev(pev(iWeaponBox, pev_owner))) WeaponBox: Enabled
  287.     }
  288.    
  289.     return HAM_IGNORED
  290. }
  291.  
  292. //**********************************************
  293. //* Weapon's codes.                            *
  294. //**********************************************
  295. public fw_Item_Deploy_Post(iItem)
  296. {
  297.     if(!IsCustomItem(iItem))
  298.         return
  299.        
  300.     static iPlayer; iPlayer = get_pdata_cbase(iItem, 41, 4)
  301.    
  302.     set_pev(iPlayer, pev_viewmodel2, v_model)
  303.     set_pev(iPlayer, pev_weaponmodel2, p_model)
  304.    
  305.     Weapon_SendAnim(iPlayer, iItem, ANIM_DRAW)
  306.    
  307.     set_pdata_string(iPlayer, (492) * 4, ANIM_EXTENSION, -1 , 20)
  308. }
  309.  
  310. public fw_Item_PostFrame(iItem)
  311. {
  312.     if(!IsCustomItem(iItem))
  313.         return HAM_IGNORED
  314.    
  315.     static iPlayer; iPlayer = get_pdata_cbase(iItem, 41, 4)
  316.    
  317.     if(get_pdata_int(iItem, 54, 4))
  318.     {
  319.         static iClip; iClip = get_pdata_int(iItem, 51, 4)
  320.         static iPrimaryAmmoIndex; iPrimaryAmmoIndex = PrimaryAmmoIndex(iItem)
  321.         static iAmmoPrimary; iAmmoPrimary = GetAmmoInventory(iPlayer, iPrimaryAmmoIndex)
  322.         static iAmount; iAmount = min(WEAPON_MAX_CLIP - iClip, iAmmoPrimary)
  323.        
  324.         set_pdata_int(iItem, 51, iClip + iAmount, 4)
  325.         SetAmmoInventory(iPlayer, iPrimaryAmmoIndex, iAmmoPrimary - iAmount)
  326.        
  327.         set_pdata_int(iItem, 54, 0, 4)
  328.     }  
  329.    
  330.     static Float:flLastEventCheck; flLastEventCheck = get_pdata_float(iItem, 38, 4)
  331.    
  332.     if(flLastEventCheck < get_gametime())
  333.     {
  334.         flLastEventCheck = get_gametime() + 2.0
  335.         set_pdata_float(iItem, 38, flLastEventCheck, 4)
  336.        
  337.         emit_sound(iPlayer, CHAN_ITEM, BuffM249_Sounds[3], 1.0, 0.4, 0, 94 + random_num(0, 15))
  338.     }
  339.    
  340.     return HAM_IGNORED
  341. }
  342.  
  343. public fw_Weapon_Reload(iItem)
  344. {
  345.     if(!IsCustomItem(iItem))
  346.         return HAM_IGNORED
  347.        
  348.     static iPlayer; iPlayer = get_pdata_cbase(iItem, 41, 4)
  349.    
  350.     static iClip; iClip = get_pdata_int(iItem, 51, 4)
  351.     static iPrimaryAmmoIndex; iPrimaryAmmoIndex = PrimaryAmmoIndex(iItem)
  352.     static iAmmoPrimary; iAmmoPrimary = GetAmmoInventory(iPlayer, iPrimaryAmmoIndex)
  353.    
  354.     if(min(WEAPON_MAX_CLIP - iClip, iAmmoPrimary) <= 0)
  355.         return HAM_SUPERCEDE
  356.    
  357.     set_pdata_int(iItem, 51, 0, 4)
  358.    
  359.     ExecuteHam(Ham_Weapon_Reload, iItem)
  360.    
  361.     set_pdata_int(iItem, 51, iClip, 4)
  362.    
  363.     set_pdata_float(iPlayer, 83, 4.53, 5)
  364.     set_pdata_float(iItem, 48, 4.53, 4)
  365.    
  366.     Weapon_SendAnim(iPlayer, iItem, ANIM_RELOAD)
  367.    
  368.     return HAM_SUPERCEDE   
  369. }
  370.  
  371. public fw_Weapon_WeaponIdle(iItem)
  372. {
  373.     if(!IsCustomItem(iItem))
  374.         return HAM_IGNORED
  375.        
  376.     static iPlayer; iPlayer = get_pdata_cbase(iItem, 41, 4)
  377.    
  378.     ExecuteHamB(Ham_Weapon_ResetEmptySound, iItem)
  379.  
  380.     if(get_pdata_float(iItem, 48, 4) > 0.0)
  381.         return HAM_SUPERCEDE
  382.    
  383.     set_pdata_float(iItem, 48, 10.0, 4)
  384.    
  385.     Weapon_SendAnim(iPlayer, iItem, ANIM_IDLE)
  386.    
  387.     return HAM_SUPERCEDE
  388. }
  389.  
  390. public fw_Weapon_PrimaryAttack(iItem)
  391. {
  392.     if(!IsCustomItem(iItem))
  393.         return HAM_IGNORED
  394.        
  395.     static iPlayer; iPlayer = get_pdata_cbase(iItem, 41, 4)
  396.     static iClip; iClip = get_pdata_int(iItem, 51, 4)
  397.    
  398.     if(iClip <= 0)
  399.     {
  400.         // No ammo, play empty sound and cancel
  401.         if(get_pdata_int(iItem, 45, 4))
  402.         {
  403.             ExecuteHamB(Ham_Weapon_PlayEmptySound, iItem)
  404.             set_pdata_float(iItem, 46, 0.2, 4)
  405.         }
  406.    
  407.         return HAM_SUPERCEDE
  408.     }
  409.    
  410.     CallOriginalFireBullets(iItem, iPlayer)
  411.    
  412.     static iFlags
  413.     static szAnimation[64], Float:Velocity[3]
  414.  
  415.     iFlags = pev(iPlayer, pev_flags)
  416.    
  417.     if(iFlags & FL_DUCKING)
  418.     {
  419.         formatex(szAnimation, charsmax(szAnimation), "crouch_shoot_%s", ANIM_EXTENSION)
  420.     }
  421.     else
  422.     {
  423.         formatex(szAnimation, charsmax(szAnimation), "ref_shoot_%s", ANIM_EXTENSION)
  424.     }
  425.    
  426.     Player_SetAnimation(iPlayer, szAnimation)
  427.    
  428.     set_pdata_float(iItem, 48, 1.0, 4)
  429.     Weapon_SendAnim(iPlayer, iItem, random_num(ANIM_SHOOT1, ANIM_SHOOT2))
  430.    
  431.     pev(iPlayer, pev_velocity, Velocity)
  432.        
  433.     if(xs_vec_len(Velocity) > 0)
  434.     {
  435.         Weapon_KickBack(iItem, iPlayer, 0.5, 0.275, 0.2, 0.03, 3.0, 2.0, 10)
  436.     }
  437.     else if(!(iFlags & FL_ONGROUND))
  438.     {
  439.         Weapon_KickBack(iItem, iPlayer, 0.9, 0.475, 0.35, 0.0425, 5.0, 3.0, 6)
  440.     }
  441.     else if(iFlags & FL_DUCKING)
  442.     {
  443.         Weapon_KickBack(iItem, iPlayer, 0.225, 0.15, 0.1, 0.015, 2.0, 1.0, 10)
  444.     }
  445.     else
  446.     {
  447.         Weapon_KickBack(iItem, iPlayer, 0.25, 0.175, 0.125, 0.02, 2.25, 1.25, 10)
  448.     }
  449.        
  450.     static Float:Accuracy
  451.     Accuracy = ((100.0 - WEAPON_SHOOT_ACCURACY) * 1.5) / 100.0
  452.     set_pdata_float(iItem, 62, Accuracy, 4)
  453.    
  454.     Make_MuzzleFlash(iPlayer)
  455.    
  456.     EjectBrass(iPlayer, iShellModelIndex, 1, .flForwardScale = 8.0)
  457.    
  458.     if(pev(iPlayer, pev_fov) == 90)
  459.     {
  460.         set_pdata_float(iItem, 46, WEAPON_TIME_NEXT_ATTACK, 4)
  461.         set_pdata_float(iItem, 47, WEAPON_TIME_NEXT_ATTACK, 4)
  462.        
  463.         emit_sound(iPlayer, CHAN_WEAPON, BuffM249_Sounds[0], 1.0, 0.4, 0, 94 + random_num(0, 15))
  464.     }
  465.     else
  466.     {
  467.         set_pdata_float(iItem, 46, WEAPON_TIME_NEXT_ATTACKZ, 4)
  468.         set_pdata_float(iItem, 47, WEAPON_TIME_NEXT_ATTACKZ, 4)
  469.        
  470.         emit_sound(iPlayer, CHAN_WEAPON, BuffM249_Sounds[1], 1.0, 0.4, 0, 94 + random_num(0, 15))
  471.        
  472.         Create_LaserEffect(iPlayer)
  473.     }
  474.    
  475.     if(--iClip <= 0) emit_sound(iPlayer, CHAN_VOICE, BuffM249_Sounds[2], 1.0, 0.4, 0, 94 + random_num(0, 15))
  476.    
  477.     return HAM_SUPERCEDE
  478. }
  479.  
  480. public fw_TraceAttack_Entity(iEntity, iAttacker, Float: flDamage) <FireBullets: Enabled>
  481. {
  482.     if(pev(iAttacker, pev_fov) == 90)
  483.     {
  484.         SetHamParamFloat(3, WEAPON_SHOOT_DAMAGE)
  485.     }
  486.     else
  487.     {
  488.         SetHamParamFloat(3, WEAPON_SHOOT_DAMAGEZ)
  489.     }
  490. }
  491.  
  492. public fw_TraceAttack_Entity() </* Empty statement */>     
  493. {
  494.     /* Fallback */
  495. }
  496.  
  497. public fw_TraceAttack_Entity() <FireBullets: Disabled>     
  498. {
  499.     /* Do notning */
  500. }
  501.  
  502. //**********************************************
  503. //* Effects                                    *
  504. //**********************************************
  505. Make_MuzzleFlash(iPlayer)
  506. {
  507.     if(global_get(glb_maxEntities) - engfunc(EngFunc_NumberOfEntities) < MUZZLE_INTOLERANCE)
  508.         return
  509.    
  510.     static Ent; Ent = engfunc(EngFunc_CreateNamedEntity, engfunc(EngFunc_AllocString, "info_target"))
  511.  
  512.     set_pev(Ent, pev_classname, MUZZLEFLASH_CLASSNAME)
  513.    
  514.     set_pev(Ent, pev_owner, iPlayer)
  515.     set_pev(Ent, pev_body, 1)
  516.     set_pev(Ent, pev_skin, iPlayer)
  517.     set_pev(Ent, pev_movetype, MOVETYPE_FLY)
  518.    
  519.     engfunc(EngFunc_SetModel, Ent,  muzzleflash)
  520.    
  521.     set_pev(Ent, pev_scale, 0.05)
  522.     set_pev(Ent, pev_frame, 0.0)
  523.     set_pev(Ent, pev_rendermode, kRenderTransAdd)
  524.     set_pev(Ent, pev_renderamt, 255.0)
  525.    
  526.     static Float:Angles[3]
  527.     Angles[2] = random_float(-180.0, 180.0)
  528.     set_pev(Ent, pev_angles, Angles)
  529.    
  530.     new Float:Origin[3]
  531.     pev(iPlayer, pev_origin, Origin)
  532.     set_pev(Ent, pev_origin, Origin)
  533.    
  534.     set_pev(Ent, pev_nextthink, get_gametime() + 0.03)
  535. }
  536.  
  537. public fw_MuzzleFlash_Think(Ent)
  538. {
  539.     if(!pev_valid(Ent))
  540.         return
  541.    
  542.     set_pev(Ent, pev_flags, FL_KILLME)
  543. }
  544.  
  545. Create_LaserEffect(iPlayer)
  546. {
  547.     static Float:StartOrigin[3], Float:EndOrigin[3]
  548.    
  549.     Get_Position(iPlayer, 40.0, !get_cvar_num("cl_righthand") ? -6.0 : 6.0, -7.0, StartOrigin)
  550.     fm_get_aim_origin(iPlayer, EndOrigin)
  551.    
  552.     for(new i = 0; i < 6; i++)
  553.     {
  554.         Create_BeamPoints(StartOrigin, EndOrigin, g_SprTrail, 0, 0, 6 - i, 20, 0, 241, 175, 0, 100 - i * 15, 0)
  555.     }
  556. }
  557.  
  558. //**********************************************
  559. //* Safety Functions                       *
  560. //**********************************************
  561. public Register_SafetyFunc()
  562. {
  563.     RegisterHam(Ham_Spawn, "player", "fw_Safety_Spawn_Post", 1)
  564.     RegisterHam(Ham_Killed, "player", "fw_Safety_Killed_Post", 1)
  565. }
  566.  
  567. public Register_SafetyFuncBot(iPlayer)
  568. {
  569.     RegisterHamFromEntity(Ham_Spawn, iPlayer, "fw_Safety_Spawn_Post", 1)
  570.     RegisterHamFromEntity(Ham_Killed, iPlayer, "fw_Safety_Killed_Post", 1)
  571. }
  572.  
  573. public Safety_Connected(iPlayer)
  574. {
  575.     Set_BitVar(g_IsConnected, iPlayer)
  576.     UnSet_BitVar(g_IsAlive, iPlayer)
  577. }
  578.  
  579. public Safety_Disconnected(iPlayer)
  580. {
  581.     UnSet_BitVar(g_IsConnected, iPlayer)
  582.     UnSet_BitVar(g_IsAlive, iPlayer)
  583. }
  584.  
  585. public fw_Safety_Spawn_Post(iPlayer)
  586. {
  587.     if(!is_user_alive(iPlayer))
  588.         return
  589.        
  590.     Set_BitVar(g_IsAlive, iPlayer)
  591. }
  592.  
  593. public fw_Safety_Killed_Post(iPlayer)
  594. {
  595.     UnSet_BitVar(g_IsAlive, iPlayer)
  596. }
  597.  
  598. public is_connected(iPlayer)
  599. {
  600.     if(!(1 <= iPlayer <= 32))
  601.         return 0
  602.     if(!Get_BitVar(g_IsConnected, iPlayer))
  603.         return 0
  604.  
  605.     return 1
  606. }
  607.  
  608. public is_alive(iPlayer)
  609. {
  610.     if(!is_connected(iPlayer))
  611.         return 0
  612.     if(!Get_BitVar(g_IsAlive, iPlayer))
  613.         return 0
  614.        
  615.     return 1
  616. }
  617.  
  618. //**********************************************
  619. //* Create and check our custom weapon.        *
  620. //**********************************************
  621. IsCustomItem(iItem)
  622. {
  623.     return (pev(iItem, pev_impulse) == g_iszWeaponKey)
  624. }
  625.  
  626. Weapon_Create(Float: Origin[3] = {0.0, 0.0, 0.0}, Float: Angles[3] = {0.0, 0.0, 0.0})
  627. {
  628.     new iWeapon
  629.  
  630.     static iszAllocStringCached
  631.     if (iszAllocStringCached || (iszAllocStringCached = engfunc(EngFunc_AllocString, WEAPON_BASE)))
  632.     {
  633.         iWeapon = engfunc(EngFunc_CreateNamedEntity, iszAllocStringCached)
  634.     }
  635.    
  636.     if(!IsValidPev(iWeapon))
  637.         return FM_NULLENT
  638.    
  639.     dllfunc(DLLFunc_Spawn, iWeapon)
  640.     set_pev(iWeapon, pev_origin, Origin)
  641.  
  642.     set_pdata_int(iWeapon, 51, WEAPON_MAX_CLIP, 4)
  643.    
  644.     set_pev(iWeapon, pev_impulse, g_iszWeaponKey)
  645.     set_pev(iWeapon, pev_angles, Angles)
  646.    
  647.     engfunc(EngFunc_SetModel, iWeapon, w_model)
  648.  
  649.     return iWeapon
  650. }
  651.  
  652. Weapon_Give(iPlayer)
  653. {
  654.     if(!IsValidPev(iPlayer))
  655.     {
  656.         return FM_NULLENT
  657.     }
  658.    
  659.     new iWeapon, Float: vecOrigin[3]
  660.     pev(iPlayer, pev_origin, vecOrigin)
  661.    
  662.     if((iWeapon = Weapon_Create(vecOrigin)) != FM_NULLENT)
  663.     {
  664.         Player_DropWeapons(iPlayer, ExecuteHamB(Ham_Item_ItemSlot, iWeapon))
  665.        
  666.         set_pev(iWeapon, pev_spawnflags, pev(iWeapon, pev_spawnflags) | SF_NORESPAWN)
  667.         dllfunc(DLLFunc_Touch, iWeapon, iPlayer)
  668.        
  669.         SetAmmoInventory(iPlayer, PrimaryAmmoIndex(iWeapon), WEAPON_DEFAULT_AMMO)
  670.        
  671.         return iWeapon
  672.     }
  673.    
  674.     return FM_NULLENT
  675. }
  676.  
  677. Player_DropWeapons(iPlayer, iSlot)
  678. {
  679.     new szWeaponName[32], iItem = get_pdata_cbase(iPlayer, 367 + iSlot, 5)
  680.  
  681.     while(IsValidPev(iItem))
  682.     {
  683.         pev(iItem, pev_classname, szWeaponName, charsmax(szWeaponName))
  684.         engclient_cmd(iPlayer, "drop", szWeaponName)
  685.  
  686.         iItem = get_pdata_cbase(iItem, 42, 4)
  687.     }
  688. }
  689.  
  690. //**********************************************
  691. //* Ammo Inventory.                            *
  692. //**********************************************
  693. PrimaryAmmoIndex(iItem)
  694. {
  695.     return get_pdata_int(iItem, 49, 4)
  696. }
  697.  
  698. GetAmmoInventory(iPlayer, iAmmoIndex)
  699. {
  700.     if(iAmmoIndex == -1)
  701.         return -1
  702.    
  703.     return get_pdata_int(iPlayer, 376 + iAmmoIndex, 5)
  704. }
  705.  
  706. SetAmmoInventory(iPlayer, iAmmoIndex, iAmount)
  707. {
  708.     if(iAmmoIndex == -1)
  709.         return 0
  710.    
  711.     set_pdata_int(iPlayer, 376 + iAmmoIndex, iAmount, 5)
  712.    
  713.     return 1
  714. }
  715.  
  716. //**********************************************
  717. //* Fire Bullets.                              *
  718. //**********************************************
  719. CallOriginalFireBullets(iItem, iPlayer)
  720. {
  721.     state FireBullets: Enabled
  722.     static Float:g_Recoil[3]
  723.  
  724.     pev(iPlayer, pev_punchangle, g_Recoil)
  725.     ExecuteHam(Ham_Weapon_PrimaryAttack, iItem)
  726.     set_pev(iPlayer, pev_punchangle, g_Recoil)
  727.    
  728.     state FireBullets: Disabled
  729. }
  730.  
  731. //**********************************************
  732. //* Decals.                                    *
  733. //**********************************************
  734. new Array: g_hDecals
  735.  
  736. public fw_DecalIndex_Post()
  737. {
  738.     if(!g_hDecals)
  739.     {
  740.         g_hDecals = ArrayCreate(1, 1)
  741.     }
  742.    
  743.     ArrayPushCell(g_hDecals, get_orig_retval())
  744. }
  745.  
  746. UTIL_GunshotDecalTrace(iTrace, bool: bIsGunshot = false)
  747. {
  748.     static iHit
  749.     static iMessage
  750.     static iDecalIndex
  751.    
  752.     static Float:flFraction
  753.     static Float:vecEndPos[3]
  754.    
  755.     iHit = INSTANCE(get_tr2(iTrace, TR_pHit))
  756.    
  757.     if(iHit && !IsValidPev(iHit) || (pev(iHit, pev_flags) & FL_KILLME))
  758.         return
  759.    
  760.     if(pev(iHit, pev_solid) != SOLID_BSP && pev(iHit, pev_movetype) != MOVETYPE_PUSHSTEP)
  761.         return
  762.    
  763.     iDecalIndex = ExecuteHamB(Ham_DamageDecal, iHit, 0)
  764.    
  765.     if(iDecalIndex < 0 || iDecalIndex >=  ArraySize(g_hDecals))
  766.         return
  767.    
  768.     iDecalIndex = ArrayGetCell(g_hDecals, iDecalIndex)
  769.    
  770.     get_tr2(iTrace, TR_flFraction, flFraction)
  771.     get_tr2(iTrace, TR_vecEndPos, vecEndPos)
  772.    
  773.     if(iDecalIndex < 0 || flFraction >= 1.0)
  774.         return
  775.    
  776.     if(bIsGunshot)
  777.     {
  778.         iMessage = TE_GUNSHOTDECAL
  779.     }
  780.     else
  781.     {
  782.         iMessage = TE_DECAL
  783.        
  784.         if(iHit != 0)
  785.         {
  786.             if(iDecalIndex > 255)
  787.             {
  788.                 iMessage = TE_DECALHIGH
  789.                 iDecalIndex -= 256
  790.             }
  791.         }
  792.         else
  793.         {
  794.             iMessage = TE_WORLDDECAL
  795.            
  796.             if(iDecalIndex > 255)
  797.             {
  798.                 iMessage = TE_WORLDDECALHIGH
  799.                 iDecalIndex -= 256
  800.             }
  801.         }
  802.     }
  803.    
  804.     engfunc(EngFunc_MessageBegin, MSG_PAS, SVC_TEMPENTITY, vecEndPos, 0)
  805.     write_byte(iMessage)
  806.     engfunc(EngFunc_WriteCoord, vecEndPos[0])
  807.     engfunc(EngFunc_WriteCoord, vecEndPos[1])
  808.     engfunc(EngFunc_WriteCoord, vecEndPos[2])
  809.  
  810.     if(bIsGunshot)
  811.     {
  812.         write_short(iHit)
  813.         write_byte(iDecalIndex)
  814.     }
  815.     else
  816.     {
  817.         write_byte(iDecalIndex)
  818.        
  819.         if(iHit)
  820.         {
  821.             write_short(iHit)
  822.         }
  823.     }
  824.    
  825.     message_end()
  826. }
  827.  
  828. //**********************************************
  829. //* Set Animations.                            *
  830. //**********************************************
  831. stock Weapon_SendAnim(iPlayer, iItem, iAnim)
  832. {
  833.     static i, iCount, iSpectator, aSpectators[32]
  834.    
  835.     set_pev(iPlayer, pev_weaponanim, iAnim)
  836.  
  837.     message_begin(MSG_ONE, SVC_WEAPONANIM, .player = iPlayer)
  838.     write_byte(iAnim)
  839.     write_byte(pev(iItem, pev_body))
  840.     message_end()
  841.    
  842.     if(IsObserver(iPlayer))
  843.         return
  844.    
  845.     get_players(aSpectators, iCount, "bch")
  846.  
  847.     for(i = 0; i < iCount; i++)
  848.     {
  849.         iSpectator = aSpectators[i]
  850.        
  851.         if(IsObserver(iSpectator) != OBS_IN_EYE || pev(iSpectator, pev_iuser2) != iPlayer)
  852.             continue
  853.        
  854.         set_pev(iSpectator, pev_weaponanim, iAnim)
  855.  
  856.         message_begin(MSG_ONE, SVC_WEAPONANIM, .player = iSpectator)
  857.         write_byte(iAnim)
  858.         write_byte(pev(iItem, pev_body))
  859.         message_end()
  860.     }
  861. }
  862.  
  863. stock Player_SetAnimation(iPlayer, szAnim[])
  864. {
  865.     #define ACT_RANGE_ATTACK1   28
  866.    
  867.     // Linux extra offsets
  868.     #define extra_offset_animating   4
  869.     #define extra_offset_player 5
  870.    
  871.     // CBaseAnimating
  872.     #define m_flFrameRate      36
  873.     #define m_flGroundSpeed      37
  874.     #define m_flLastEventCheck   38
  875.     #define m_fSequenceFinished   39
  876.     #define m_fSequenceLoops   40
  877.    
  878.     // CBaseMonster
  879.     #define m_Activity      73
  880.     #define m_IdealActivity      74
  881.    
  882.     // CBasePlayer
  883.     #define m_flLastAttackTime   220
  884.    
  885.     new iAnimDesired, Float:flFrameRate, Float:flGroundSpeed, bool:bLoops
  886.      
  887.     if((iAnimDesired = lookup_sequence(iPlayer, szAnim, flFrameRate, bLoops, flGroundSpeed)) == -1)
  888.     {
  889.         iAnimDesired = 0
  890.     }
  891.    
  892.     static Float:flGametime; flGametime = get_gametime()
  893.  
  894.     set_pev(iPlayer, pev_frame, 0.0)
  895.     set_pev(iPlayer, pev_framerate, 1.0)
  896.     set_pev(iPlayer, pev_animtime, flGametime)
  897.     set_pev(iPlayer, pev_sequence, iAnimDesired)
  898.    
  899.     set_pdata_int(iPlayer, m_fSequenceLoops, bLoops, extra_offset_animating)
  900.     set_pdata_int(iPlayer, m_fSequenceFinished, 0, extra_offset_animating)
  901.    
  902.     set_pdata_float(iPlayer, m_flFrameRate, flFrameRate, extra_offset_animating)
  903.     set_pdata_float(iPlayer, m_flGroundSpeed, flGroundSpeed, extra_offset_animating)
  904.     set_pdata_float(iPlayer, m_flLastEventCheck, flGametime , extra_offset_animating)
  905.    
  906.     set_pdata_int(iPlayer, m_Activity, ACT_RANGE_ATTACK1, extra_offset_player)
  907.     set_pdata_int(iPlayer, m_IdealActivity, ACT_RANGE_ATTACK1, extra_offset_player)  
  908.     set_pdata_float(iPlayer, m_flLastAttackTime, flGametime , extra_offset_player)
  909. }
  910.  
  911. //**********************************************
  912. //* Kick back.                                 *
  913. //**********************************************
  914. Weapon_KickBack(iItem, iPlayer, Float:upBase, Float:lateralBase, Float:upMod, Float:lateralMod, Float:upMax, Float:lateralMax, directionChange)
  915. {
  916.     static iDirection
  917.     static iShotsFired
  918.    
  919.     static Float: Punchangle[3]
  920.     pev(iPlayer, pev_punchangle, Punchangle)
  921.    
  922.     if((iShotsFired = get_pdata_int(iItem, 64, 4)) != 1)
  923.     {
  924.         upBase += iShotsFired * upMod
  925.         lateralBase += iShotsFired * lateralMod
  926.     }
  927.    
  928.     upMax *= -1.0
  929.     Punchangle[0] -= upBase
  930.  
  931.     if(upMax >= Punchangle[0])
  932.     {
  933.         Punchangle[0] = upMax
  934.     }
  935.    
  936.     if((iDirection = get_pdata_int(iItem, 60, 4)))
  937.     {
  938.         Punchangle[1] += lateralBase
  939.        
  940.         if(lateralMax < Punchangle[1])
  941.         {
  942.             Punchangle[1] = lateralMax
  943.         }
  944.     }
  945.     else
  946.     {
  947.         lateralMax *= -1.0;
  948.         Punchangle[1] -= lateralBase
  949.        
  950.         if(lateralMax > Punchangle[1])
  951.         {
  952.             Punchangle[1] = lateralMax
  953.         }
  954.     }
  955.    
  956.     if(!random_num(0, directionChange))
  957.     {
  958.         set_pdata_int(iItem, 60, !iDirection, 4)
  959.     }
  960.    
  961.     set_pev(iPlayer, pev_punchangle, Punchangle)
  962. }
  963.  
  964. //**********************************************
  965. //* Brass ejection.                            *
  966. //**********************************************
  967. EjectBrass(iPlayer, iModelIndex, iBounce, Float:flUpScale = -9.0, Float:flForwardScale = 16.0, Float:flRightScale = 0.0)
  968. {
  969.     static i, msgBrass
  970.    
  971.     static Float: vecUp[3]
  972.     static Float: vecRight[3]
  973.     static Float: vecForward[3]
  974.    
  975.     static Float: vecAngle[3]
  976.     static Float: vecOrigin[3]
  977.     static Float: vecViewOfs[3]
  978.     static Float: vecVelocity[3]
  979.    
  980.     pev(iPlayer, pev_v_angle, vecAngle)
  981.     pev(iPlayer, pev_punchangle, vecOrigin)
  982.    
  983.     xs_vec_add(vecAngle, vecOrigin, vecOrigin)
  984.     engfunc(EngFunc_MakeVectors, vecOrigin)
  985.    
  986.     pev(iPlayer, pev_origin, vecOrigin)
  987.     pev(iPlayer, pev_view_ofs, vecViewOfs)
  988.     pev(iPlayer, pev_velocity, vecVelocity)
  989.    
  990.     global_get(glb_v_up, vecUp)
  991.     global_get(glb_v_right, vecRight)
  992.     global_get(glb_v_forward, vecForward)
  993.    
  994.     for(i = 0; i < 3; i++)
  995.     {
  996.         vecOrigin[i] = vecOrigin[i] + vecViewOfs[i] + vecForward[i] * flForwardScale + vecUp[i] * flUpScale + vecRight[i] * flRightScale
  997.         vecVelocity[i] = vecVelocity[i] + vecForward[i] * 25.0 + vecUp[i] * random_float(100.0, 150.0) + vecRight[i] * random_float(50.0, 70.0)
  998.     }
  999.    
  1000.     if(msgBrass || (msgBrass = get_user_msgid("Brass")))
  1001.     {
  1002.         engfunc(EngFunc_MessageBegin, MSG_PVS, msgBrass, vecOrigin, 0)
  1003.         write_byte(0 /* dummy */)
  1004.         engfunc(EngFunc_WriteCoord, vecOrigin[0])
  1005.         engfunc(EngFunc_WriteCoord, vecOrigin[1])
  1006.         engfunc(EngFunc_WriteCoord, vecOrigin[2])
  1007.         engfunc(EngFunc_WriteCoord, 0.0 /* dummy */)
  1008.         engfunc(EngFunc_WriteCoord, 0.0 /* dummy */)
  1009.         engfunc(EngFunc_WriteCoord, 0.0 /* dummy */)
  1010.         engfunc(EngFunc_WriteCoord, vecVelocity[0])
  1011.         engfunc(EngFunc_WriteCoord, vecVelocity[1])
  1012.         engfunc(EngFunc_WriteCoord, vecVelocity[2])
  1013.         engfunc(EngFunc_WriteAngle, vecAngle[1])
  1014.         write_short(iModelIndex)
  1015.         write_byte(iBounce)
  1016.         write_byte(0 /* dummy */)
  1017.         write_byte(iPlayer)
  1018.         message_end()
  1019.     }
  1020. }
  1021.  
  1022. stock Get_Position(iPlayer, Float:forw, Float:right, Float:up, Float:vStart[])
  1023. {
  1024.     new Float:Origin[3], Float:Angles[3], Float:vForward[3], Float:vRight[3], Float:vUp[3]
  1025.    
  1026.     pev(iPlayer, pev_origin, Origin)
  1027.     pev(iPlayer, pev_view_ofs,vUp) //for player
  1028.     xs_vec_add(Origin, vUp, Origin)
  1029.     pev(iPlayer, pev_v_angle, Angles) // if normal entity ,use pev_angles
  1030.    
  1031.     angle_vector(Angles, ANGLEVECTOR_FORWARD, vForward) //or use EngFunc_AngleVectors
  1032.     angle_vector(Angles, ANGLEVECTOR_RIGHT, vRight)
  1033.     angle_vector(Angles, ANGLEVECTOR_UP, vUp)
  1034.    
  1035.     vStart[0] = Origin[0] + vForward[0] * forw + vRight[0] * right + vUp[0] * up
  1036.     vStart[1] = Origin[1] + vForward[1] * forw + vRight[1] * right + vUp[1] * up
  1037.     vStart[2] = Origin[2] + vForward[2] * forw + vRight[2] * right + vUp[2] * up
  1038. }
  1039.  
  1040. stock get_speed_vector(Float:Origin1[3], Float:Origin2[3], Float:Speed, Float:NewVelocity[3])
  1041. {
  1042.     NewVelocity[0] = Origin2[0] - Origin1[0]
  1043.     NewVelocity[1] = Origin2[1] - Origin1[1]
  1044.     NewVelocity[2] = Origin2[2] - Origin1[2]
  1045.     new Float:num = floatsqroot(Speed*Speed / (NewVelocity[0]*NewVelocity[0] + NewVelocity[1]*NewVelocity[1] + NewVelocity[2]*NewVelocity[2]))
  1046.     NewVelocity[0] *= num
  1047.     NewVelocity[1] *= num
  1048.     NewVelocity[2] *= num
  1049.    
  1050.     return 1
  1051. }
  1052.  
  1053. stock Create_BeamPoints(Float:StartPosition[3], Float:TargetPosition[3], SpritesID, StartFrame, Framerate, Life, LineWidth, Amplitude, Red, Green, Blue, Brightness, Speed)
  1054. {
  1055.     message_begin(MSG_BROADCAST, SVC_TEMPENTITY)
  1056.     write_byte(TE_BEAMPOINTS)
  1057.     engfunc(EngFunc_WriteCoord, StartPosition[0])
  1058.     engfunc(EngFunc_WriteCoord, StartPosition[1])
  1059.     engfunc(EngFunc_WriteCoord, StartPosition[2])
  1060.     engfunc(EngFunc_WriteCoord, TargetPosition[0])
  1061.     engfunc(EngFunc_WriteCoord, TargetPosition[1])
  1062.     engfunc(EngFunc_WriteCoord, TargetPosition[2])
  1063.     write_short(SpritesID)
  1064.     write_byte(StartFrame)
  1065.     write_byte(Framerate)
  1066.     write_byte(Life)
  1067.     write_byte(LineWidth)
  1068.     write_byte(Amplitude)
  1069.     write_byte(Red)
  1070.     write_byte(Green)
  1071.     write_byte(Blue)
  1072.     write_byte(Brightness)
  1073.     write_byte(Speed)
  1074.     message_end()
  1075. }


First thing we will talk about is includes.
  1. In this code, those are the includes:

    Code: Select all

    #include <amxmodx>
    #include <fakemeta>
    #include <fakemeta_util>
    #include <engine>
    #include <hamsandwich>
    #include <xs>
  2. If you opened zombie_escape.inc you will find a list of includes.
  3. Keep in your mind that you can not include an include that is already included in an included file (Read it several times so you get it :sweat_smile:) .
  4. So we will replace the included files in zombie_escape.inc & we will put:

    Code: Select all

    #include <zombie_escape>
Congrats! We have finished the includes section. Now to item registration section!
  1. As you can see in the code, there is something called public plugin_init()

    Code: Select all

    public plugin_init() 
    {
    	register_plugin(PLUGIN, VERSION, AUTHOR)
    	
    	// Safety
    	Register_SafetyFunc()
    	
    	// Forward
    	register_forward(FM_UpdateClientData, "fw_UpdateClientData_Post", 1)
    	register_forward(FM_TraceLine, "fw_TraceLine_Post", 1)
    	register_forward(FM_PlaybackEvent, "fw_PlaybackEvent")
    	register_forward(FM_SetModel, "fw_SetModel")
    	
    	unregister_forward(FM_DecalIndex, g_iForwardDecalIndex, 1)
    	
    	// Think
    	register_think(MUZZLEFLASH_CLASSNAME, "fw_MuzzleFlash_Think") 
    	
    	// Ham
    	RegisterHam(Ham_Spawn, "weaponbox", "fw_Weaponbox_Spawn_Post", 1)
    	
    	RegisterHam(Ham_Item_Deploy, WEAPON_BASE, "fw_Item_Deploy_Post", 1)
    	RegisterHam(Ham_Item_PostFrame, WEAPON_BASE, "fw_Item_PostFrame")
    	RegisterHam(Ham_Weapon_Reload, WEAPON_BASE, "fw_Weapon_Reload")
    	RegisterHam(Ham_Weapon_WeaponIdle, WEAPON_BASE, "fw_Weapon_WeaponIdle")
    	RegisterHam(Ham_Weapon_PrimaryAttack, WEAPON_BASE, "fw_Weapon_PrimaryAttack")
    	
    	RegisterHam(Ham_TraceAttack, "func_breakable", "fw_TraceAttack_Entity")
    	RegisterHam(Ham_TraceAttack, "info_target", "fw_TraceAttack_Entity")
    	RegisterHam(Ham_TraceAttack, "player", "fw_TraceAttack_Entity")
    	
    	register_clcmd("say /get", "Get_MyWeapon")
    }
  2. Just go to the end of this function & let's add our item registering native.

    Code: Select all

    g_iItemid = ze_register_item("M249 Phoenix", 5, 0)
    	// "M249 Phoenix" is the item name, you can just change it to whatever you want it be.
    	// 5 is the item cost.
    	// 0 is the item limit
  3. You will be wondering what is g_iItemId. Well, it's the handler of the registered item, you can put whatever you want, just you need to go before public plugin_init() & add this:

    Code: Select all

    new g_iItemId
  4. For more information about natives' sytnax, go to Our API
Nicely done! We have finished the item registration section. Now to the last section which is adding forwards to control how the gun will be in the game!
  1. In the public items, you will need to add a forwards to control the way the gun is gonna be in the game. We will be using the 2 main forwards which are:

    Code: Select all

    forward ze_select_item_pre(id, itemid)
    forward ze_select_item_post(id, itemid)
  2. We will start the pre forward. In this forward, there is two main & basic things you need to do before anything else which are make the gun available on not buying it & control for who it will appear. Let's explain with the code.

    Code: Select all

    public ze_select_item_pre(id, itemid)
    {
    	// If it is not the gun the player is willing to buy then just make it available.
    	// g_iItemID is the handler you made it before.
    	// You can name itemid whatever you like but just not the same handler name.
    	
    	if (itemid != g_iItemID)
    		return ZE_ITEM_AVAILABLE
    		
    	// In this item we are working on, it will be for humans only so we need to hide it for zombies so they do not get it.
    	//If you want it to be for zombies, you need to add the not operator "!" before the native so it's gonna be like this:
    	// if (!ze_is_user_zombie(id))
    	// If you want an item to be for zombies & humans then just don't add the next code.
    	
    	if (ze_is_user_zombie(id))
    		return ZE_ITEM_DONT_SHOW
    		
    	// Here we need to return a value so you don't get a warning on compiling.
    	return ZE_ITEM_AVAILABLE
    }
  3. We have finished our pre forward. Now, to the post forward.

    Code: Select all

    public ze_select_item_post(id, itemid)
    {
    	// Here we just block buying the gun if it is not the gun the player is willing to buy so we just add return without values.
    	if (itemid != g_iItemId)
    		return
    		
    	// Here you can give the item & you can even add a message to notice the player what he bought for example like this:
    	ze_colored_print(id, "Congrats! You have bought M249 Phoenix! :D")
    	
    	// Do you remember in public plugin_init(), we found something like this in it:
    	// register_clcmd("say /get", "Get_MyWeapon")
    	// That line is to allow you to get the gun for free when you type that command.
    	// Well, we don't care about it, we care about:
    	// Get_MyWeapon
    	// This is the function we will use to give the weapon to the player
    	// It's like this:
    	Get_MyWeapon(id)
    }
    
  4. Now, you have finished the main things you need to add & edit. :D
| Notes:
  1. These steps may differ from a gun to another.
  2. Our zombie escape mod only does have 2 main classes which are human & zombie.
  3. Some items do not have the function Get_MyWeapon Which means that the gun is not for Counter-Strike & for Half-Life or the code is bugged.
Now, your item is ready to be compiled & the final code is here:


  1. /* Plugin generated by AMXX-Studio */
  2.  
  3. #include <zombie_escape>
  4. #include <fakemeta_util>
  5. #include <engine>
  6. #include <xs>
  7.  
  8. #define PLUGIN "M249 Phoenix"
  9. #define VERSION "1.0"
  10. #define AUTHOR "Bim Bim Cay"
  11.  
  12. // Models
  13. #define v_model "models/v_buffm249.mdl"
  14. #define p_model "models/p_buffm249.mdl"
  15. #define w_model "models/w_buffm249.mdl"
  16.  
  17. // Sounds
  18. new const BuffM249_Sounds[4][] =
  19. {
  20.     "weapons/buffm249-1.wav",
  21.     "weapons/buffm249-2.wav",
  22.     "weapons/buffm249_scream.wav",
  23.     "weapons/buffm249_loop.wav"
  24. }
  25.  
  26. // Sprites
  27. #define muzzleflash "sprites/muzzleflash43.spr"
  28. #define lasersprite "sprites/smoke.spr"
  29.  
  30. // Animations
  31. #define ANIM_IDLE   0
  32. #define ANIM_SHOOT1 1
  33. #define ANIM_SHOOT2 2
  34. #define ANIM_RELOAD     3
  35. #define ANIM_DRAW   4
  36.  
  37. #define ANIM_EXTENSION  "m249"
  38.  
  39. // Entity Classname
  40. #define MUZZLEFLASH_CLASSNAME "Muzzle_M249Phoenix"
  41.  
  42. // Configs
  43. #define WEAPON_NAME         "weapon_buffm249"
  44. #define WEAPON_BASE     "weapon_sg552"
  45.  
  46. #define WEAPON_MAX_CLIP     100
  47. #define WEAPON_DEFAULT_AMMO 200
  48.  
  49. #define WEAPON_SHOOT_DAMAGE 150.0
  50. #define WEAPON_SHOOT_DAMAGEZ    400.0
  51.  
  52. #define WEAPON_TIME_NEXT_ATTACK 0.1
  53. #define WEAPON_TIME_NEXT_ATTACKZ 0.75
  54.  
  55. #define WEAPON_SHOOT_ACCURACY 94.0
  56.  
  57. // MACROS
  58. #define Get_BitVar(%1,%2) (%1 & (1 << (%2 & 31)))
  59. #define Set_BitVar(%1,%2) %1 |= (1 << (%2 & 31))
  60. #define UnSet_BitVar(%1,%2) %1 &= ~(1 << (%2 & 31))
  61.  
  62. #define INSTANCE(%0) ((%0 == -1) ? 0 : %0)
  63. #define IsValidPev(%0) (pev_valid(%0) == 2)
  64. #define IsObserver(%0) pev(%0,pev_iuser1)
  65. #define MUZZLE_INTOLERANCE 100
  66. #define OBS_IN_EYE 4
  67.  
  68. // Shell
  69. #define MODEL_SHELL "models/rshell.mdl"
  70.  
  71. new g_iszWeaponKey
  72. new g_iForwardDecalIndex
  73. new iShellModelIndex
  74. new g_SprTrail
  75.  
  76. // Safety
  77. new g_HamBot
  78. new g_IsConnected, g_IsAlive
  79. new g_iItemId
  80.  
  81. public plugin_init()
  82. {
  83.     register_plugin(PLUGIN, VERSION, AUTHOR)
  84.    
  85.     // Safety
  86.     Register_SafetyFunc()
  87.    
  88.     // Forward
  89.     register_forward(FM_UpdateClientData, "fw_UpdateClientData_Post", 1)
  90.     register_forward(FM_TraceLine, "fw_TraceLine_Post", 1)
  91.     register_forward(FM_PlaybackEvent, "fw_PlaybackEvent")
  92.     register_forward(FM_SetModel, "fw_SetModel")
  93.    
  94.     unregister_forward(FM_DecalIndex, g_iForwardDecalIndex, 1)
  95.    
  96.     // Think
  97.     register_think(MUZZLEFLASH_CLASSNAME, "fw_MuzzleFlash_Think")
  98.    
  99.     // Ham
  100.     RegisterHam(Ham_Spawn, "weaponbox", "fw_Weaponbox_Spawn_Post", 1)
  101.    
  102.     RegisterHam(Ham_Item_Deploy, WEAPON_BASE, "fw_Item_Deploy_Post", 1)
  103.     RegisterHam(Ham_Item_PostFrame, WEAPON_BASE, "fw_Item_PostFrame")
  104.     RegisterHam(Ham_Weapon_Reload, WEAPON_BASE, "fw_Weapon_Reload")
  105.     RegisterHam(Ham_Weapon_WeaponIdle, WEAPON_BASE, "fw_Weapon_WeaponIdle")
  106.     RegisterHam(Ham_Weapon_PrimaryAttack, WEAPON_BASE, "fw_Weapon_PrimaryAttack")
  107.    
  108.     RegisterHam(Ham_TraceAttack, "func_breakable", "fw_TraceAttack_Entity")
  109.     RegisterHam(Ham_TraceAttack, "info_target", "fw_TraceAttack_Entity")
  110.     RegisterHam(Ham_TraceAttack, "player", "fw_TraceAttack_Entity")
  111.    
  112.     register_clcmd("say /get", "Get_MyWeapon")
  113.     g_iItemId = ze_register_item("M249 Phoenix", 0, 0)
  114. }
  115.  
  116. public ze_select_item_pre(id, itemid)
  117. {
  118.     if (itemid != g_iItemId)
  119.         return ZE_ITEM_AVAILABLE
  120.  
  121.     if (ze_is_user_zombie(id))
  122.         return ZE_ITEM_DONT_SHOW
  123.  
  124.     return ZE_ITEM_AVAILABLE
  125. }
  126.  
  127. public ze_select_item_post(id, itemid)
  128. {
  129.     if (itemid != g_iItemId)
  130.         return
  131.  
  132.     Get_MyWeapon(id)
  133. }
  134.  
  135. public plugin_precache()
  136. {
  137.     precache_model(v_model)
  138.     precache_model(p_model)
  139.     precache_model(w_model)
  140.  
  141.     precache_model(muzzleflash)
  142.    
  143.     for(new i = 0; i < sizeof(BuffM249_Sounds); i++)
  144.         precache_sound(BuffM249_Sounds[i])
  145.    
  146.     iShellModelIndex = precache_model(MODEL_SHELL)
  147.     g_SprTrail = precache_model(lasersprite)
  148.    
  149.     g_iszWeaponKey = engfunc(EngFunc_AllocString, WEAPON_NAME)
  150.     g_iForwardDecalIndex = register_forward(FM_DecalIndex, "fw_DecalIndex_Post", 1)
  151. }
  152.  
  153. public client_putinserver(iPlayer)
  154. {
  155.     Safety_Connected(iPlayer)
  156.    
  157.     if(!g_HamBot && is_user_bot(iPlayer))
  158.     {
  159.         g_HamBot = 1
  160.         set_task(0.1, "Register_HamBot", iPlayer)
  161.     }
  162. }
  163.  
  164. public Register_HamBot(iPlayer)
  165. {
  166.     Register_SafetyFuncBot(iPlayer)
  167.     RegisterHamFromEntity(Ham_TraceAttack, iPlayer, "fw_TraceAttack_Entity")   
  168. }
  169.  
  170. public client_disconnect(iPlayer)
  171. {
  172.     Safety_Disconnected(iPlayer)
  173. }
  174.  
  175. public Get_MyWeapon(iPlayer)
  176. {
  177.     Weapon_Give(iPlayer)
  178. }
  179.  
  180. //**********************************************
  181. //* Forward Hooking                            *
  182. //**********************************************
  183. public fw_UpdateClientData_Post(iPlayer, sendweapons, CD_Handle)
  184. {
  185.     enum
  186.     {
  187.         SPEC_MODE,
  188.         SPEC_TARGET,
  189.         SPEC_END
  190.     }
  191.      
  192.     static aSpecInfo[33][SPEC_END]
  193.    
  194.     static iTarget
  195.     static iSpecMode
  196.     static iActiveItem
  197.    
  198.     iTarget = (iSpecMode = IsObserver(iPlayer)) ? pev(iPlayer, pev_iuser2) : iPlayer
  199.    
  200.     if(!is_alive(iTarget))
  201.         return FMRES_IGNORED
  202.    
  203.     iActiveItem = get_pdata_cbase(iTarget, 373, 5)
  204.    
  205.     if(!IsValidPev(iActiveItem) || !IsCustomItem(iActiveItem))
  206.         return FMRES_IGNORED
  207.    
  208.     if(iSpecMode)
  209.     {
  210.         if(aSpecInfo[iPlayer][SPEC_MODE] != iSpecMode)
  211.         {
  212.             aSpecInfo[iPlayer][SPEC_MODE] = iSpecMode
  213.             aSpecInfo[iPlayer][SPEC_TARGET] = 0
  214.         }
  215.        
  216.         if(iSpecMode == OBS_IN_EYE && aSpecInfo[iPlayer][SPEC_TARGET] != iTarget)
  217.         {
  218.             aSpecInfo[iPlayer][SPEC_TARGET] = iTarget
  219.            
  220.             Weapon_SendAnim(iPlayer, iActiveItem, ANIM_IDLE)
  221.         }
  222.     }
  223.    
  224.     set_cd(CD_Handle, CD_flNextAttack, get_gametime() + 0.001)
  225.    
  226.     return FMRES_HANDLED
  227. }
  228.  
  229. public fw_TraceLine_Post(Float:TraceStart[3], Float:TraceEnd[3], fNoMonsters, iEntToSkip, iTrace) <FireBullets: Enabled>
  230. {
  231.     static Float:vecEndPos[3]
  232.    
  233.     get_tr2(iTrace, TR_vecEndPos, vecEndPos)
  234.     engfunc(EngFunc_TraceLine, vecEndPos, TraceStart, fNoMonsters, iEntToSkip, 0)
  235.    
  236.     UTIL_GunshotDecalTrace(0)
  237.     UTIL_GunshotDecalTrace(iTrace, true)
  238. }
  239.  
  240. public fw_TraceLine_Post() </* Empty statement */>
  241. {
  242.     /* Fallback */
  243. }
  244.  
  245. public fw_TraceLine_Post() <FireBullets: Disabled> 
  246. {
  247.     /* Do notning */
  248. }
  249.  
  250. public fw_PlaybackEvent() <FireBullets: Enabled>
  251. {
  252.     return FMRES_SUPERCEDE
  253. }
  254.  
  255. public fw_PlaybackEvent() </* Empty statement */>      
  256. {
  257.     return FMRES_IGNORED
  258. }
  259.  
  260. public fw_PlaybackEvent() <FireBullets: Disabled>      
  261. {
  262.     return FMRES_IGNORED
  263. }
  264.  
  265. //**********************************************
  266. //* Weaponbox world model.                     *
  267. //**********************************************
  268. public fw_SetModel(iEntity) <WeaponBox: Enabled>
  269. {
  270.     state WeaponBox: Disabled
  271.    
  272.     if(!IsValidPev(iEntity))
  273.         return FMRES_IGNORED
  274.    
  275.     #define MAX_ITEM_TYPES  6
  276.     for(new i, iItem; i < MAX_ITEM_TYPES; i++)
  277.     {
  278.         iItem = get_pdata_cbase(iEntity, 34 + i, 4)
  279.        
  280.         if(IsValidPev(iItem) && IsCustomItem(iItem))
  281.         {
  282.             engfunc(EngFunc_SetModel, iEntity, w_model)
  283.             return FMRES_SUPERCEDE
  284.         }
  285.     }
  286.    
  287.     return FMRES_IGNORED
  288. }
  289.  
  290. public fw_SetModel() </* Empty statement */>   
  291. {
  292.     /*  Fallback  */
  293.     return FMRES_IGNORED
  294. }
  295. public fw_SetModel() <WeaponBox: Disabled> 
  296. {
  297.     /* Do nothing */
  298.     return FMRES_IGNORED
  299. }
  300.  
  301. public fw_Weaponbox_Spawn_Post(iWeaponBox)
  302. {
  303.     if(IsValidPev(iWeaponBox))
  304.     {
  305.         state (IsValidPev(pev(iWeaponBox, pev_owner))) WeaponBox: Enabled
  306.     }
  307.    
  308.     return HAM_IGNORED
  309. }
  310.  
  311. //**********************************************
  312. //* Weapon's codes.                            *
  313. //**********************************************
  314. public fw_Item_Deploy_Post(iItem)
  315. {
  316.     if(!IsCustomItem(iItem))
  317.         return
  318.        
  319.     static iPlayer; iPlayer = get_pdata_cbase(iItem, 41, 4)
  320.    
  321.     set_pev(iPlayer, pev_viewmodel2, v_model)
  322.     set_pev(iPlayer, pev_weaponmodel2, p_model)
  323.    
  324.     Weapon_SendAnim(iPlayer, iItem, ANIM_DRAW)
  325.    
  326.     set_pdata_string(iPlayer, (492) * 4, ANIM_EXTENSION, -1 , 20)
  327. }
  328.  
  329. public fw_Item_PostFrame(iItem)
  330. {
  331.     if(!IsCustomItem(iItem))
  332.         return HAM_IGNORED
  333.    
  334.     static iPlayer; iPlayer = get_pdata_cbase(iItem, 41, 4)
  335.    
  336.     if(get_pdata_int(iItem, 54, 4))
  337.     {
  338.         static iClip; iClip = get_pdata_int(iItem, 51, 4)
  339.         static iPrimaryAmmoIndex; iPrimaryAmmoIndex = PrimaryAmmoIndex(iItem)
  340.         static iAmmoPrimary; iAmmoPrimary = GetAmmoInventory(iPlayer, iPrimaryAmmoIndex)
  341.         static iAmount; iAmount = min(WEAPON_MAX_CLIP - iClip, iAmmoPrimary)
  342.        
  343.         set_pdata_int(iItem, 51, iClip + iAmount, 4)
  344.         SetAmmoInventory(iPlayer, iPrimaryAmmoIndex, iAmmoPrimary - iAmount)
  345.        
  346.         set_pdata_int(iItem, 54, 0, 4)
  347.     }  
  348.    
  349.     static Float:flLastEventCheck; flLastEventCheck = get_pdata_float(iItem, 38, 4)
  350.    
  351.     if(flLastEventCheck < get_gametime())
  352.     {
  353.         flLastEventCheck = get_gametime() + 2.0
  354.         set_pdata_float(iItem, 38, flLastEventCheck, 4)
  355.        
  356.         emit_sound(iPlayer, CHAN_ITEM, BuffM249_Sounds[3], 1.0, 0.4, 0, 94 + random_num(0, 15))
  357.     }
  358.    
  359.     return HAM_IGNORED
  360. }
  361.  
  362. public fw_Weapon_Reload(iItem)
  363. {
  364.     if(!IsCustomItem(iItem))
  365.         return HAM_IGNORED
  366.        
  367.     static iPlayer; iPlayer = get_pdata_cbase(iItem, 41, 4)
  368.    
  369.     static iClip; iClip = get_pdata_int(iItem, 51, 4)
  370.     static iPrimaryAmmoIndex; iPrimaryAmmoIndex = PrimaryAmmoIndex(iItem)
  371.     static iAmmoPrimary; iAmmoPrimary = GetAmmoInventory(iPlayer, iPrimaryAmmoIndex)
  372.    
  373.     if(min(WEAPON_MAX_CLIP - iClip, iAmmoPrimary) <= 0)
  374.         return HAM_SUPERCEDE
  375.    
  376.     set_pdata_int(iItem, 51, 0, 4)
  377.    
  378.     ExecuteHam(Ham_Weapon_Reload, iItem)
  379.    
  380.     set_pdata_int(iItem, 51, iClip, 4)
  381.    
  382.     set_pdata_float(iPlayer, 83, 4.53, 5)
  383.     set_pdata_float(iItem, 48, 4.53, 4)
  384.    
  385.     Weapon_SendAnim(iPlayer, iItem, ANIM_RELOAD)
  386.    
  387.     return HAM_SUPERCEDE   
  388. }
  389.  
  390. public fw_Weapon_WeaponIdle(iItem)
  391. {
  392.     if(!IsCustomItem(iItem))
  393.         return HAM_IGNORED
  394.        
  395.     static iPlayer; iPlayer = get_pdata_cbase(iItem, 41, 4)
  396.    
  397.     ExecuteHamB(Ham_Weapon_ResetEmptySound, iItem)
  398.  
  399.     if(get_pdata_float(iItem, 48, 4) > 0.0)
  400.         return HAM_SUPERCEDE
  401.    
  402.     set_pdata_float(iItem, 48, 10.0, 4)
  403.    
  404.     Weapon_SendAnim(iPlayer, iItem, ANIM_IDLE)
  405.    
  406.     return HAM_SUPERCEDE
  407. }
  408.  
  409. public fw_Weapon_PrimaryAttack(iItem)
  410. {
  411.     if(!IsCustomItem(iItem))
  412.         return HAM_IGNORED
  413.        
  414.     static iPlayer; iPlayer = get_pdata_cbase(iItem, 41, 4)
  415.     static iClip; iClip = get_pdata_int(iItem, 51, 4)
  416.    
  417.     if(iClip <= 0)
  418.     {
  419.         // No ammo, play empty sound and cancel
  420.         if(get_pdata_int(iItem, 45, 4))
  421.         {
  422.             ExecuteHamB(Ham_Weapon_PlayEmptySound, iItem)
  423.             set_pdata_float(iItem, 46, 0.2, 4)
  424.         }
  425.    
  426.         return HAM_SUPERCEDE
  427.     }
  428.    
  429.     CallOriginalFireBullets(iItem, iPlayer)
  430.    
  431.     static iFlags
  432.     static szAnimation[64], Float:Velocity[3]
  433.  
  434.     iFlags = pev(iPlayer, pev_flags)
  435.    
  436.     if(iFlags & FL_DUCKING)
  437.     {
  438.         formatex(szAnimation, charsmax(szAnimation), "crouch_shoot_%s", ANIM_EXTENSION)
  439.     }
  440.     else
  441.     {
  442.         formatex(szAnimation, charsmax(szAnimation), "ref_shoot_%s", ANIM_EXTENSION)
  443.     }
  444.    
  445.     Player_SetAnimation(iPlayer, szAnimation)
  446.    
  447.     set_pdata_float(iItem, 48, 1.0, 4)
  448.     Weapon_SendAnim(iPlayer, iItem, random_num(ANIM_SHOOT1, ANIM_SHOOT2))
  449.    
  450.     pev(iPlayer, pev_velocity, Velocity)
  451.        
  452.     if(xs_vec_len(Velocity) > 0)
  453.     {
  454.         Weapon_KickBack(iItem, iPlayer, 0.5, 0.275, 0.2, 0.03, 3.0, 2.0, 10)
  455.     }
  456.     else if(!(iFlags & FL_ONGROUND))
  457.     {
  458.         Weapon_KickBack(iItem, iPlayer, 0.9, 0.475, 0.35, 0.0425, 5.0, 3.0, 6)
  459.     }
  460.     else if(iFlags & FL_DUCKING)
  461.     {
  462.         Weapon_KickBack(iItem, iPlayer, 0.225, 0.15, 0.1, 0.015, 2.0, 1.0, 10)
  463.     }
  464.     else
  465.     {
  466.         Weapon_KickBack(iItem, iPlayer, 0.25, 0.175, 0.125, 0.02, 2.25, 1.25, 10)
  467.     }
  468.        
  469.     static Float:Accuracy
  470.     Accuracy = ((100.0 - WEAPON_SHOOT_ACCURACY) * 1.5) / 100.0
  471.     set_pdata_float(iItem, 62, Accuracy, 4)
  472.    
  473.     Make_MuzzleFlash(iPlayer)
  474.    
  475.     EjectBrass(iPlayer, iShellModelIndex, 1, .flForwardScale = 8.0)
  476.    
  477.     if(pev(iPlayer, pev_fov) == 90)
  478.     {
  479.         set_pdata_float(iItem, 46, WEAPON_TIME_NEXT_ATTACK, 4)
  480.         set_pdata_float(iItem, 47, WEAPON_TIME_NEXT_ATTACK, 4)
  481.        
  482.         emit_sound(iPlayer, CHAN_WEAPON, BuffM249_Sounds[0], 1.0, 0.4, 0, 94 + random_num(0, 15))
  483.     }
  484.     else
  485.     {
  486.         set_pdata_float(iItem, 46, WEAPON_TIME_NEXT_ATTACKZ, 4)
  487.         set_pdata_float(iItem, 47, WEAPON_TIME_NEXT_ATTACKZ, 4)
  488.        
  489.         emit_sound(iPlayer, CHAN_WEAPON, BuffM249_Sounds[1], 1.0, 0.4, 0, 94 + random_num(0, 15))
  490.        
  491.         Create_LaserEffect(iPlayer)
  492.     }
  493.    
  494.     if(--iClip <= 0) emit_sound(iPlayer, CHAN_VOICE, BuffM249_Sounds[2], 1.0, 0.4, 0, 94 + random_num(0, 15))
  495.    
  496.     return HAM_SUPERCEDE
  497. }
  498.  
  499. public fw_TraceAttack_Entity(iEntity, iAttacker, Float: flDamage) <FireBullets: Enabled>
  500. {
  501.     if(pev(iAttacker, pev_fov) == 90)
  502.     {
  503.         SetHamParamFloat(3, WEAPON_SHOOT_DAMAGE)
  504.     }
  505.     else
  506.     {
  507.         SetHamParamFloat(3, WEAPON_SHOOT_DAMAGEZ)
  508.     }
  509. }
  510.  
  511. public fw_TraceAttack_Entity() </* Empty statement */>     
  512. {
  513.     /* Fallback */
  514. }
  515.  
  516. public fw_TraceAttack_Entity() <FireBullets: Disabled>     
  517. {
  518.     /* Do notning */
  519. }
  520.  
  521. //**********************************************
  522. //* Effects                                    *
  523. //**********************************************
  524. Make_MuzzleFlash(iPlayer)
  525. {
  526.     if(global_get(glb_maxEntities) - engfunc(EngFunc_NumberOfEntities) < MUZZLE_INTOLERANCE)
  527.         return
  528.    
  529.     static Ent; Ent = engfunc(EngFunc_CreateNamedEntity, engfunc(EngFunc_AllocString, "info_target"))
  530.  
  531.     set_pev(Ent, pev_classname, MUZZLEFLASH_CLASSNAME)
  532.    
  533.     set_pev(Ent, pev_owner, iPlayer)
  534.     set_pev(Ent, pev_body, 1)
  535.     set_pev(Ent, pev_skin, iPlayer)
  536.     set_pev(Ent, pev_movetype, MOVETYPE_FLY)
  537.    
  538.     engfunc(EngFunc_SetModel, Ent,  muzzleflash)
  539.    
  540.     set_pev(Ent, pev_scale, 0.05)
  541.     set_pev(Ent, pev_frame, 0.0)
  542.     set_pev(Ent, pev_rendermode, kRenderTransAdd)
  543.     set_pev(Ent, pev_renderamt, 255.0)
  544.    
  545.     static Float:Angles[3]
  546.     Angles[2] = random_float(-180.0, 180.0)
  547.     set_pev(Ent, pev_angles, Angles)
  548.    
  549.     new Float:Origin[3]
  550.     pev(iPlayer, pev_origin, Origin)
  551.     set_pev(Ent, pev_origin, Origin)
  552.    
  553.     set_pev(Ent, pev_nextthink, get_gametime() + 0.03)
  554. }
  555.  
  556. public fw_MuzzleFlash_Think(Ent)
  557. {
  558.     if(!pev_valid(Ent))
  559.         return
  560.    
  561.     set_pev(Ent, pev_flags, FL_KILLME)
  562. }
  563.  
  564. Create_LaserEffect(iPlayer)
  565. {
  566.     static Float:StartOrigin[3], Float:EndOrigin[3]
  567.    
  568.     Get_Position(iPlayer, 40.0, !get_cvar_num("cl_righthand") ? -6.0 : 6.0, -7.0, StartOrigin)
  569.     fm_get_aim_origin(iPlayer, EndOrigin)
  570.    
  571.     for(new i = 0; i < 6; i++)
  572.     {
  573.         Create_BeamPoints(StartOrigin, EndOrigin, g_SprTrail, 0, 0, 6 - i, 20, 0, 241, 175, 0, 100 - i * 15, 0)
  574.     }
  575. }
  576.  
  577. //**********************************************
  578. //* Safety Functions                       *
  579. //**********************************************
  580. public Register_SafetyFunc()
  581. {
  582.     RegisterHam(Ham_Spawn, "player", "fw_Safety_Spawn_Post", 1)
  583.     RegisterHam(Ham_Killed, "player", "fw_Safety_Killed_Post", 1)
  584. }
  585.  
  586. public Register_SafetyFuncBot(iPlayer)
  587. {
  588.     RegisterHamFromEntity(Ham_Spawn, iPlayer, "fw_Safety_Spawn_Post", 1)
  589.     RegisterHamFromEntity(Ham_Killed, iPlayer, "fw_Safety_Killed_Post", 1)
  590. }
  591.  
  592. public Safety_Connected(iPlayer)
  593. {
  594.     Set_BitVar(g_IsConnected, iPlayer)
  595.     UnSet_BitVar(g_IsAlive, iPlayer)
  596. }
  597.  
  598. public Safety_Disconnected(iPlayer)
  599. {
  600.     UnSet_BitVar(g_IsConnected, iPlayer)
  601.     UnSet_BitVar(g_IsAlive, iPlayer)
  602. }
  603.  
  604. public fw_Safety_Spawn_Post(iPlayer)
  605. {
  606.     if(!is_user_alive(iPlayer))
  607.         return
  608.        
  609.     Set_BitVar(g_IsAlive, iPlayer)
  610. }
  611.  
  612. public fw_Safety_Killed_Post(iPlayer)
  613. {
  614.     UnSet_BitVar(g_IsAlive, iPlayer)
  615. }
  616.  
  617. public is_connected(iPlayer)
  618. {
  619.     if(!(1 <= iPlayer <= 32))
  620.         return 0
  621.     if(!Get_BitVar(g_IsConnected, iPlayer))
  622.         return 0
  623.  
  624.     return 1
  625. }
  626.  
  627. public is_alive(iPlayer)
  628. {
  629.     if(!is_connected(iPlayer))
  630.         return 0
  631.     if(!Get_BitVar(g_IsAlive, iPlayer))
  632.         return 0
  633.        
  634.     return 1
  635. }
  636.  
  637. //**********************************************
  638. //* Create and check our custom weapon.        *
  639. //**********************************************
  640. IsCustomItem(iItem)
  641. {
  642.     return (pev(iItem, pev_impulse) == g_iszWeaponKey)
  643. }
  644.  
  645. Weapon_Create(Float: Origin[3] = {0.0, 0.0, 0.0}, Float: Angles[3] = {0.0, 0.0, 0.0})
  646. {
  647.     new iWeapon
  648.  
  649.     static iszAllocStringCached
  650.     if (iszAllocStringCached || (iszAllocStringCached = engfunc(EngFunc_AllocString, WEAPON_BASE)))
  651.     {
  652.         iWeapon = engfunc(EngFunc_CreateNamedEntity, iszAllocStringCached)
  653.     }
  654.    
  655.     if(!IsValidPev(iWeapon))
  656.         return FM_NULLENT
  657.    
  658.     dllfunc(DLLFunc_Spawn, iWeapon)
  659.     set_pev(iWeapon, pev_origin, Origin)
  660.  
  661.     set_pdata_int(iWeapon, 51, WEAPON_MAX_CLIP, 4)
  662.    
  663.     set_pev(iWeapon, pev_impulse, g_iszWeaponKey)
  664.     set_pev(iWeapon, pev_angles, Angles)
  665.    
  666.     engfunc(EngFunc_SetModel, iWeapon, w_model)
  667.  
  668.     return iWeapon
  669. }
  670.  
  671. Weapon_Give(iPlayer)
  672. {
  673.     if(!IsValidPev(iPlayer))
  674.     {
  675.         return FM_NULLENT
  676.     }
  677.    
  678.     new iWeapon, Float: vecOrigin[3]
  679.     pev(iPlayer, pev_origin, vecOrigin)
  680.    
  681.     if((iWeapon = Weapon_Create(vecOrigin)) != FM_NULLENT)
  682.     {
  683.         Player_DropWeapons(iPlayer, ExecuteHamB(Ham_Item_ItemSlot, iWeapon))
  684.        
  685.         set_pev(iWeapon, pev_spawnflags, pev(iWeapon, pev_spawnflags) | SF_NORESPAWN)
  686.         dllfunc(DLLFunc_Touch, iWeapon, iPlayer)
  687.        
  688.         SetAmmoInventory(iPlayer, PrimaryAmmoIndex(iWeapon), WEAPON_DEFAULT_AMMO)
  689.        
  690.         return iWeapon
  691.     }
  692.    
  693.     return FM_NULLENT
  694. }
  695.  
  696. Player_DropWeapons(iPlayer, iSlot)
  697. {
  698.     new szWeaponName[32], iItem = get_pdata_cbase(iPlayer, 367 + iSlot, 5)
  699.  
  700.     while(IsValidPev(iItem))
  701.     {
  702.         pev(iItem, pev_classname, szWeaponName, charsmax(szWeaponName))
  703.         engclient_cmd(iPlayer, "drop", szWeaponName)
  704.  
  705.         iItem = get_pdata_cbase(iItem, 42, 4)
  706.     }
  707. }
  708.  
  709. //**********************************************
  710. //* Ammo Inventory.                            *
  711. //**********************************************
  712. PrimaryAmmoIndex(iItem)
  713. {
  714.     return get_pdata_int(iItem, 49, 4)
  715. }
  716.  
  717. GetAmmoInventory(iPlayer, iAmmoIndex)
  718. {
  719.     if(iAmmoIndex == -1)
  720.         return -1
  721.    
  722.     return get_pdata_int(iPlayer, 376 + iAmmoIndex, 5)
  723. }
  724.  
  725. SetAmmoInventory(iPlayer, iAmmoIndex, iAmount)
  726. {
  727.     if(iAmmoIndex == -1)
  728.         return 0
  729.    
  730.     set_pdata_int(iPlayer, 376 + iAmmoIndex, iAmount, 5)
  731.    
  732.     return 1
  733. }
  734.  
  735. //**********************************************
  736. //* Fire Bullets.                              *
  737. //**********************************************
  738. CallOriginalFireBullets(iItem, iPlayer)
  739. {
  740.     state FireBullets: Enabled
  741.     static Float:g_Recoil[3]
  742.  
  743.     pev(iPlayer, pev_punchangle, g_Recoil)
  744.     ExecuteHam(Ham_Weapon_PrimaryAttack, iItem)
  745.     set_pev(iPlayer, pev_punchangle, g_Recoil)
  746.    
  747.     state FireBullets: Disabled
  748. }
  749.  
  750. //**********************************************
  751. //* Decals.                                    *
  752. //**********************************************
  753. new Array: g_hDecals
  754.  
  755. public fw_DecalIndex_Post()
  756. {
  757.     if(!g_hDecals)
  758.     {
  759.         g_hDecals = ArrayCreate(1, 1)
  760.     }
  761.    
  762.     ArrayPushCell(g_hDecals, get_orig_retval())
  763. }
  764.  
  765. UTIL_GunshotDecalTrace(iTrace, bool: bIsGunshot = false)
  766. {
  767.     static iHit
  768.     static iMessage
  769.     static iDecalIndex
  770.    
  771.     static Float:flFraction
  772.     static Float:vecEndPos[3]
  773.    
  774.     iHit = INSTANCE(get_tr2(iTrace, TR_pHit))
  775.    
  776.     if(iHit && !IsValidPev(iHit) || (pev(iHit, pev_flags) & FL_KILLME))
  777.         return
  778.    
  779.     if(pev(iHit, pev_solid) != SOLID_BSP && pev(iHit, pev_movetype) != MOVETYPE_PUSHSTEP)
  780.         return
  781.    
  782.     iDecalIndex = ExecuteHamB(Ham_DamageDecal, iHit, 0)
  783.    
  784.     if(iDecalIndex < 0 || iDecalIndex >=  ArraySize(g_hDecals))
  785.         return
  786.    
  787.     iDecalIndex = ArrayGetCell(g_hDecals, iDecalIndex)
  788.    
  789.     get_tr2(iTrace, TR_flFraction, flFraction)
  790.     get_tr2(iTrace, TR_vecEndPos, vecEndPos)
  791.    
  792.     if(iDecalIndex < 0 || flFraction >= 1.0)
  793.         return
  794.    
  795.     if(bIsGunshot)
  796.     {
  797.         iMessage = TE_GUNSHOTDECAL
  798.     }
  799.     else
  800.     {
  801.         iMessage = TE_DECAL
  802.        
  803.         if(iHit != 0)
  804.         {
  805.             if(iDecalIndex > 255)
  806.             {
  807.                 iMessage = TE_DECALHIGH
  808.                 iDecalIndex -= 256
  809.             }
  810.         }
  811.         else
  812.         {
  813.             iMessage = TE_WORLDDECAL
  814.            
  815.             if(iDecalIndex > 255)
  816.             {
  817.                 iMessage = TE_WORLDDECALHIGH
  818.                 iDecalIndex -= 256
  819.             }
  820.         }
  821.     }
  822.    
  823.     engfunc(EngFunc_MessageBegin, MSG_PAS, SVC_TEMPENTITY, vecEndPos, 0)
  824.     write_byte(iMessage)
  825.     engfunc(EngFunc_WriteCoord, vecEndPos[0])
  826.     engfunc(EngFunc_WriteCoord, vecEndPos[1])
  827.     engfunc(EngFunc_WriteCoord, vecEndPos[2])
  828.  
  829.     if(bIsGunshot)
  830.     {
  831.         write_short(iHit)
  832.         write_byte(iDecalIndex)
  833.     }
  834.     else
  835.     {
  836.         write_byte(iDecalIndex)
  837.        
  838.         if(iHit)
  839.         {
  840.             write_short(iHit)
  841.         }
  842.     }
  843.    
  844.     message_end()
  845. }
  846.  
  847. //**********************************************
  848. //* Set Animations.                            *
  849. //**********************************************
  850. stock Weapon_SendAnim(iPlayer, iItem, iAnim)
  851. {
  852.     static i, iCount, iSpectator, aSpectators[32]
  853.    
  854.     set_pev(iPlayer, pev_weaponanim, iAnim)
  855.  
  856.     message_begin(MSG_ONE, SVC_WEAPONANIM, .player = iPlayer)
  857.     write_byte(iAnim)
  858.     write_byte(pev(iItem, pev_body))
  859.     message_end()
  860.    
  861.     if(IsObserver(iPlayer))
  862.         return
  863.    
  864.     get_players(aSpectators, iCount, "bch")
  865.  
  866.     for(i = 0; i < iCount; i++)
  867.     {
  868.         iSpectator = aSpectators[i]
  869.        
  870.         if(IsObserver(iSpectator) != OBS_IN_EYE || pev(iSpectator, pev_iuser2) != iPlayer)
  871.             continue
  872.        
  873.         set_pev(iSpectator, pev_weaponanim, iAnim)
  874.  
  875.         message_begin(MSG_ONE, SVC_WEAPONANIM, .player = iSpectator)
  876.         write_byte(iAnim)
  877.         write_byte(pev(iItem, pev_body))
  878.         message_end()
  879.     }
  880. }
  881.  
  882. stock Player_SetAnimation(iPlayer, szAnim[])
  883. {
  884.     #define ACT_RANGE_ATTACK1   28
  885.    
  886.     // Linux extra offsets
  887.     #define extra_offset_animating   4
  888.     #define extra_offset_player 5
  889.    
  890.     // CBaseAnimating
  891.     #define m_flFrameRate      36
  892.     #define m_flGroundSpeed      37
  893.     #define m_flLastEventCheck   38
  894.     #define m_fSequenceFinished   39
  895.     #define m_fSequenceLoops   40
  896.    
  897.     // CBaseMonster
  898.     #define m_Activity      73
  899.     #define m_IdealActivity      74
  900.    
  901.     // CBasePlayer
  902.     #define m_flLastAttackTime   220
  903.    
  904.     new iAnimDesired, Float:flFrameRate, Float:flGroundSpeed, bool:bLoops
  905.      
  906.     if((iAnimDesired = lookup_sequence(iPlayer, szAnim, flFrameRate, bLoops, flGroundSpeed)) == -1)
  907.     {
  908.         iAnimDesired = 0
  909.     }
  910.    
  911.     static Float:flGametime; flGametime = get_gametime()
  912.  
  913.     set_pev(iPlayer, pev_frame, 0.0)
  914.     set_pev(iPlayer, pev_framerate, 1.0)
  915.     set_pev(iPlayer, pev_animtime, flGametime)
  916.     set_pev(iPlayer, pev_sequence, iAnimDesired)
  917.    
  918.     set_pdata_int(iPlayer, m_fSequenceLoops, bLoops, extra_offset_animating)
  919.     set_pdata_int(iPlayer, m_fSequenceFinished, 0, extra_offset_animating)
  920.    
  921.     set_pdata_float(iPlayer, m_flFrameRate, flFrameRate, extra_offset_animating)
  922.     set_pdata_float(iPlayer, m_flGroundSpeed, flGroundSpeed, extra_offset_animating)
  923.     set_pdata_float(iPlayer, m_flLastEventCheck, flGametime , extra_offset_animating)
  924.    
  925.     set_pdata_int(iPlayer, m_Activity, ACT_RANGE_ATTACK1, extra_offset_player)
  926.     set_pdata_int(iPlayer, m_IdealActivity, ACT_RANGE_ATTACK1, extra_offset_player)  
  927.     set_pdata_float(iPlayer, m_flLastAttackTime, flGametime , extra_offset_player)
  928. }
  929.  
  930. //**********************************************
  931. //* Kick back.                                 *
  932. //**********************************************
  933. Weapon_KickBack(iItem, iPlayer, Float:upBase, Float:lateralBase, Float:upMod, Float:lateralMod, Float:upMax, Float:lateralMax, directionChange)
  934. {
  935.     static iDirection
  936.     static iShotsFired
  937.    
  938.     static Float: Punchangle[3]
  939.     pev(iPlayer, pev_punchangle, Punchangle)
  940.    
  941.     if((iShotsFired = get_pdata_int(iItem, 64, 4)) != 1)
  942.     {
  943.         upBase += iShotsFired * upMod
  944.         lateralBase += iShotsFired * lateralMod
  945.     }
  946.    
  947.     upMax *= -1.0
  948.     Punchangle[0] -= upBase
  949.  
  950.     if(upMax >= Punchangle[0])
  951.     {
  952.         Punchangle[0] = upMax
  953.     }
  954.    
  955.     if((iDirection = get_pdata_int(iItem, 60, 4)))
  956.     {
  957.         Punchangle[1] += lateralBase
  958.        
  959.         if(lateralMax < Punchangle[1])
  960.         {
  961.             Punchangle[1] = lateralMax
  962.         }
  963.     }
  964.     else
  965.     {
  966.         lateralMax *= -1.0;
  967.         Punchangle[1] -= lateralBase
  968.        
  969.         if(lateralMax > Punchangle[1])
  970.         {
  971.             Punchangle[1] = lateralMax
  972.         }
  973.     }
  974.    
  975.     if(!random_num(0, directionChange))
  976.     {
  977.         set_pdata_int(iItem, 60, !iDirection, 4)
  978.     }
  979.    
  980.     set_pev(iPlayer, pev_punchangle, Punchangle)
  981. }
  982.  
  983. //**********************************************
  984. //* Brass ejection.                            *
  985. //**********************************************
  986. EjectBrass(iPlayer, iModelIndex, iBounce, Float:flUpScale = -9.0, Float:flForwardScale = 16.0, Float:flRightScale = 0.0)
  987. {
  988.     static i, msgBrass
  989.    
  990.     static Float: vecUp[3]
  991.     static Float: vecRight[3]
  992.     static Float: vecForward[3]
  993.    
  994.     static Float: vecAngle[3]
  995.     static Float: vecOrigin[3]
  996.     static Float: vecViewOfs[3]
  997.     static Float: vecVelocity[3]
  998.    
  999.     pev(iPlayer, pev_v_angle, vecAngle)
  1000.     pev(iPlayer, pev_punchangle, vecOrigin)
  1001.    
  1002.     xs_vec_add(vecAngle, vecOrigin, vecOrigin)
  1003.     engfunc(EngFunc_MakeVectors, vecOrigin)
  1004.    
  1005.     pev(iPlayer, pev_origin, vecOrigin)
  1006.     pev(iPlayer, pev_view_ofs, vecViewOfs)
  1007.     pev(iPlayer, pev_velocity, vecVelocity)
  1008.    
  1009.     global_get(glb_v_up, vecUp)
  1010.     global_get(glb_v_right, vecRight)
  1011.     global_get(glb_v_forward, vecForward)
  1012.    
  1013.     for(i = 0; i < 3; i++)
  1014.     {
  1015.         vecOrigin[i] = vecOrigin[i] + vecViewOfs[i] + vecForward[i] * flForwardScale + vecUp[i] * flUpScale + vecRight[i] * flRightScale
  1016.         vecVelocity[i] = vecVelocity[i] + vecForward[i] * 25.0 + vecUp[i] * random_float(100.0, 150.0) + vecRight[i] * random_float(50.0, 70.0)
  1017.     }
  1018.    
  1019.     if(msgBrass || (msgBrass = get_user_msgid("Brass")))
  1020.     {
  1021.         engfunc(EngFunc_MessageBegin, MSG_PVS, msgBrass, vecOrigin, 0)
  1022.         write_byte(0 /* dummy */)
  1023.         engfunc(EngFunc_WriteCoord, vecOrigin[0])
  1024.         engfunc(EngFunc_WriteCoord, vecOrigin[1])
  1025.         engfunc(EngFunc_WriteCoord, vecOrigin[2])
  1026.         engfunc(EngFunc_WriteCoord, 0.0 /* dummy */)
  1027.         engfunc(EngFunc_WriteCoord, 0.0 /* dummy */)
  1028.         engfunc(EngFunc_WriteCoord, 0.0 /* dummy */)
  1029.         engfunc(EngFunc_WriteCoord, vecVelocity[0])
  1030.         engfunc(EngFunc_WriteCoord, vecVelocity[1])
  1031.         engfunc(EngFunc_WriteCoord, vecVelocity[2])
  1032.         engfunc(EngFunc_WriteAngle, vecAngle[1])
  1033.         write_short(iModelIndex)
  1034.         write_byte(iBounce)
  1035.         write_byte(0 /* dummy */)
  1036.         write_byte(iPlayer)
  1037.         message_end()
  1038.     }
  1039. }
  1040.  
  1041. stock Get_Position(iPlayer, Float:forw, Float:right, Float:up, Float:vStart[])
  1042. {
  1043.     new Float:Origin[3], Float:Angles[3], Float:vForward[3], Float:vRight[3], Float:vUp[3]
  1044.    
  1045.     pev(iPlayer, pev_origin, Origin)
  1046.     pev(iPlayer, pev_view_ofs,vUp) //for player
  1047.     xs_vec_add(Origin, vUp, Origin)
  1048.     pev(iPlayer, pev_v_angle, Angles) // if normal entity ,use pev_angles
  1049.    
  1050.     angle_vector(Angles, ANGLEVECTOR_FORWARD, vForward) //or use EngFunc_AngleVectors
  1051.     angle_vector(Angles, ANGLEVECTOR_RIGHT, vRight)
  1052.     angle_vector(Angles, ANGLEVECTOR_UP, vUp)
  1053.    
  1054.     vStart[0] = Origin[0] + vForward[0] * forw + vRight[0] * right + vUp[0] * up
  1055.     vStart[1] = Origin[1] + vForward[1] * forw + vRight[1] * right + vUp[1] * up
  1056.     vStart[2] = Origin[2] + vForward[2] * forw + vRight[2] * right + vUp[2] * up
  1057. }
  1058.  
  1059. stock get_speed_vector(Float:Origin1[3], Float:Origin2[3], Float:Speed, Float:NewVelocity[3])
  1060. {
  1061.     NewVelocity[0] = Origin2[0] - Origin1[0]
  1062.     NewVelocity[1] = Origin2[1] - Origin1[1]
  1063.     NewVelocity[2] = Origin2[2] - Origin1[2]
  1064.     new Float:num = floatsqroot(Speed*Speed / (NewVelocity[0]*NewVelocity[0] + NewVelocity[1]*NewVelocity[1] + NewVelocity[2]*NewVelocity[2]))
  1065.     NewVelocity[0] *= num
  1066.     NewVelocity[1] *= num
  1067.     NewVelocity[2] *= num
  1068.    
  1069.     return 1
  1070. }
  1071.  
  1072. stock Create_BeamPoints(Float:StartPosition[3], Float:TargetPosition[3], SpritesID, StartFrame, Framerate, Life, LineWidth, Amplitude, Red, Green, Blue, Brightness, Speed)
  1073. {
  1074.     message_begin(MSG_BROADCAST, SVC_TEMPENTITY)
  1075.     write_byte(TE_BEAMPOINTS)
  1076.     engfunc(EngFunc_WriteCoord, StartPosition[0])
  1077.     engfunc(EngFunc_WriteCoord, StartPosition[1])
  1078.     engfunc(EngFunc_WriteCoord, StartPosition[2])
  1079.     engfunc(EngFunc_WriteCoord, TargetPosition[0])
  1080.     engfunc(EngFunc_WriteCoord, TargetPosition[1])
  1081.     engfunc(EngFunc_WriteCoord, TargetPosition[2])
  1082.     write_short(SpritesID)
  1083.     write_byte(StartFrame)
  1084.     write_byte(Framerate)
  1085.     write_byte(Life)
  1086.     write_byte(LineWidth)
  1087.     write_byte(Amplitude)
  1088.     write_byte(Red)
  1089.     write_byte(Green)
  1090.     write_byte(Blue)
  1091.     write_byte(Brightness)
  1092.     write_byte(Speed)
  1093.     message_end()
  1094. }

If you have any problem, just comment down.
My regards.
These users thanked the author Jack GamePlay for the post:
Raheem (11 Months Ago)
Not interested in CS/Pawn anymore.
Accepting web projects.

User avatar
SexY DeviL CJ
Mod Tester
Mod Tester
Posts: 73
Joined: 1 Year Ago
Has thanked: 1 time
Been thanked: 10 times
Contact:

#2

Post by SexY DeviL CJ » 11 Months Ago

@Jack GamePlay

Thanks man :D
......Devil Was Here......

User avatar
Raheem
Mod Developer
Mod Developer
Egypt
Posts: 1948
Joined: 2 Years Ago
Location: Egypt
Has thanked: 32 times
Been thanked: 108 times
Age: 21
Contact:

#3

Post by Raheem » 11 Months Ago

+LIKE, good one.

Thanks :smiley: :blush:
You don't know? Learn and you will know.

Rain1153
Senior Member
Senior Member
India
Posts: 277
Joined: 1 Year Ago
Has thanked: 2 times
Been thanked: 1 time
Age: 18
Contact:

#4

Post by Rain1153 » 11 Months Ago

good teacher for newbies :D they will learn!
LOL

User avatar
Mark
Senior Member
Senior Member
United States of America
Posts: 281
Joined: 11 Months Ago
Location: Des Moines/USA
Has thanked: 6 times
Been thanked: 21 times
Age: 33
Contact:

#5

Post by Mark » 11 Months Ago

How do we do this again? :D

User avatar
Jack GamePlay
Mod Developer
Mod Developer
Egypt
Posts: 577
Joined: 2 Years Ago
Location: Egypt
Has thanked: 34 times
Been thanked: 47 times
Age: 19
Contact:

#6

Post by Jack GamePlay » 11 Months Ago

RapidFlush wrote:
11 Months Ago
How do we do this again? :D
What?! Explain.
Not interested in CS/Pawn anymore.
Accepting web projects.

User avatar
Mark
Senior Member
Senior Member
United States of America
Posts: 281
Joined: 11 Months Ago
Location: Des Moines/USA
Has thanked: 6 times
Been thanked: 21 times
Age: 33
Contact:

#7

Post by Mark » 11 Months Ago

Jack GamePlay wrote:
11 Months Ago
RapidFlush wrote:
11 Months Ago
How do we do this again? :D
What?! Explain.
Joking lol

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest