hlmod.hu
https://hlmod.hu/

Global Offensive.
https://hlmod.hu/viewtopic.php?f=29&t=25187
Oldal: 1 / 1

Szerző:  Szupercsillagparaszt [2016.06.11. 14:23 ]
Hozzászólás témája:  Global Offensive.

Sziasztoook!
Valaki eltudná linkelni nekem Deró modját?
Előre is Köszii :*

Szerző:  Pista. [2016.06.11. 15:43 ]
Hozzászólás témája:  Re: Global Offensive.

tessék

Csatolmányok:
NationalGO.sma [196.84KiB]
Letöltve 108 alkalommal.

Szerző:  Szupercsillagparaszt [2016.06.11. 22:59 ]
Hozzászólás témája:  Re: Global Offensive.

Pista. írta:
tessék

Nem pont erre gondoltam:D

Szerző:  Pista. [2016.06.12. 11:25 ]
Hozzászólás témája:  Re: Global Offensive.

Szupercsillagparaszt írta:
Pista. írta:
tessék

Nem pont erre gondoltam:D

hát ez a deroidé. ne válogass annyit.

Szerző:  Szupercsillagparaszt [2016.06.12. 12:57 ]
Hozzászólás témája:  Re: Global Offensive.

Pista. írta:
Szupercsillagparaszt írta:
Pista. írta:
tessék

Nem pont erre gondoltam:D

hát ez a deroidé. ne válogass annyit.

nekem az kéne,amiben van fegyver vizsgálat stb..
Láttam fb-n hogy publikus lett valahol...

Szerző:  Zohan [2016.06.12. 21:55 ]
Hozzászólás témája:  Re: Global Offensive.

  1. #include <amxmodx>
  2. #include <engine>
  3. #include <fakemeta>
  4. #include <hamsandwich>
  5.  
  6. new const PLUGIN[] = "Weap inspect"
  7. new const VERSION[] = "1.0"
  8. new const AUTHOR[] = "mforce"
  9.  
  10. const m_iId = 43
  11. const m_pPlayer = 41
  12. const XO_WEAPON = 4
  13. const m_pActiveItem = 373
  14.  
  15. #define get_weapon_owner(%1)        get_pdata_cbase(%1, m_pPlayer, XO_WEAPON)
  16. #define get_weapon_id(%1)           get_pdata_int(%1, m_iId, XO_WEAPON)
  17. #define get_active_item(%1)         get_pdata_cbase(%1, m_pActiveItem)
  18.  
  19. public plugin_init() {
  20.     register_plugin(PLUGIN, VERSION, AUTHOR)
  21.     register_impulse(100, "ClCmd_Impulse")
  22.     RegisterHam(Ham_Item_Deploy, "weapon_ak47", "OnItemDeployPost", 1);
  23. }
  24.  
  25. new const fegyver[] = "models/weap_skins/v_ak47.mdl";
  26.  
  27. public OnItemDeployPost(ent) {
  28.     new id = get_weapon_owner(ent);
  29.  
  30.     if(id > 0) {
  31.         new Weapon = get_weapon_id(ent);
  32.         if(Weapon == CSW_AK47)
  33.             set_pev(id, pev_viewmodel2, fegyver);    // v_model
  34.     }
  35.  
  36.     return HAM_IGNORED;
  37. }
  38.  
  39. public plugin_precache() {
  40.     precache_model(fegyver);
  41. }
  42.  
  43. public ClCmd_Impulse(id) {
  44.     new ActiveItem = get_active_item(id);
  45.     new Weapon = get_weapon_id(ActiveItem);
  46.     if(Weapon == CSW_AK47) {
  47.         SendWeaponAnim(id, .iAnim = 6)
  48.         return PLUGIN_HANDLED;
  49.     }
  50.     return PLUGIN_CONTINUE;
  51. }
  52.  
  53. // fm
  54. stock SendWeaponAnim(id, iAnim) {
  55.     set_pev(id, pev_weaponanim, iAnim)
  56.  
  57.     message_begin(MSG_ONE/* _UNRELIABLE */, SVC_WEAPONANIM, _, id)
  58.     write_byte(iAnim)
  59.     write_byte(pev(id, pev_body))
  60.     message_end()
  61. }

Skineket, írdhozá.

Szerző:  Szupercsillagparaszt [2016.06.12. 22:30 ]
Hozzászólás témája:  Re: Global Offensive.

Zohan írta:
  1. #include <amxmodx>
  2. #include <engine>
  3. #include <fakemeta>
  4. #include <hamsandwich>
  5.  
  6. new const PLUGIN[] = "Weap inspect"
  7. new const VERSION[] = "1.0"
  8. new const AUTHOR[] = "mforce"
  9.  
  10. const m_iId = 43
  11. const m_pPlayer = 41
  12. const XO_WEAPON = 4
  13. const m_pActiveItem = 373
  14.  
  15. #define get_weapon_owner(%1)        get_pdata_cbase(%1, m_pPlayer, XO_WEAPON)
  16. #define get_weapon_id(%1)           get_pdata_int(%1, m_iId, XO_WEAPON)
  17. #define get_active_item(%1)         get_pdata_cbase(%1, m_pActiveItem)
  18.  
  19. public plugin_init() {
  20.     register_plugin(PLUGIN, VERSION, AUTHOR)
  21.     register_impulse(100, "ClCmd_Impulse")
  22.     RegisterHam(Ham_Item_Deploy, "weapon_ak47", "OnItemDeployPost", 1);
  23. }
  24.  
  25. new const fegyver[] = "models/weap_skins/v_ak47.mdl";
  26.  
  27. public OnItemDeployPost(ent) {
  28.     new id = get_weapon_owner(ent);
  29.  
  30.     if(id > 0) {
  31.         new Weapon = get_weapon_id(ent);
  32.         if(Weapon == CSW_AK47)
  33.             set_pev(id, pev_viewmodel2, fegyver);    // v_model
  34.     }
  35.  
  36.     return HAM_IGNORED;
  37. }
  38.  
  39. public plugin_precache() {
  40.     precache_model(fegyver);
  41. }
  42.  
  43. public ClCmd_Impulse(id) {
  44.     new ActiveItem = get_active_item(id);
  45.     new Weapon = get_weapon_id(ActiveItem);
  46.     if(Weapon == CSW_AK47) {
  47.         SendWeaponAnim(id, .iAnim = 6)
  48.         return PLUGIN_HANDLED;
  49.     }
  50.     return PLUGIN_CONTINUE;
  51. }
  52.  
  53. // fm
  54. stock SendWeaponAnim(id, iAnim) {
  55.     set_pev(id, pev_weaponanim, iAnim)
  56.  
  57.     message_begin(MSG_ONE/* _UNRELIABLE */, SVC_WEAPONANIM, _, id)
  58.     write_byte(iAnim)
  59.     write_byte(pev(id, pev_body))
  60.     message_end()
  61. }

Skineket, írdhozá.


Kösziii :*

Oldal: 1 / 1 Minden időpont UTC+02:00 időzóna szerinti
Powered by phpBB® Forum Software © phpBB Limited
https://www.phpbb.com/