hlmod.hu
https://hlmod.hu/

Kés model
https://hlmod.hu/viewtopic.php?f=29&t=7281
Oldal: 1 / 1

Szerző:  demon [ 2013.01.26. 18:10 ]
Hozzászólás témája:  Kés model

Üdv!

Egy olyan plugin kellene amivel kicserélhetem külön a CT és külön T kés modeljét (v_ és p_modelt)

Előre is köszönöm

Szerző:  HunGamer [ 2013.01.26. 19:00 ]
Hozzászólás témája:  Re: Kés model

SMA Forráskód: [ Mindet kijelol ]
  1. #include <amxmodx>
  2. #include <amxmisc>
  3. #include <fakemeta>
  4.  
  5. #define PLUGIN "New Plug-In"
  6. #define VERSION "1.0"
  7. #define AUTHOR "HunGamer"
  8.  
  9.  
  10. public plugin_init()
  11. {
  12. register_plugin(PLUGIN, VERSION, AUTHOR)
  13. register_event("CurWeapon", "Event_Change_Weapon", "be", "1=1")
  14. }
  15. public Event_Change_Weapon(id)
  16. {
  17. new weaponID = read_data(2)
  18.  
  19. if(weaponID == CSW_KNIFE)
  20. {
  21. if(get_user_team(id) == 1)
  22. {
  23. set_pev(id, pev_viewmodel2, "models/v_te.mdl") //TE V_
  24. set_pev(id, pev_weaponmodel2, "models/p_te.mdl")//TE P_
  25. }
  26. else if(get_user_team(id) == 2)
  27. {
  28. set_pev(id, pev_viewmodel2, "models/v_ct.mdl")//CT V_
  29. set_pev(id, pev_weaponmodel2, "models/p_ct.mdl")//CT P_
  30. }
  31. }
  32. return PLUGIN_CONTINUE
  33. }

Szerző:  demon [ 2013.01.26. 21:09 ]
Hozzászólás témája:  Re: Kés model

HunGamer írta:
SMA Forráskód: [ Mindet kijelol ]
  1. #include <amxmodx>
  2. #include <amxmisc>
  3. #include <fakemeta>
  4.  
  5. #define PLUGIN "New Plug-In"
  6. #define VERSION "1.0"
  7. #define AUTHOR "HunGamer"
  8.  
  9.  
  10. public plugin_init()
  11. {
  12. register_plugin(PLUGIN, VERSION, AUTHOR)
  13. register_event("CurWeapon", "Event_Change_Weapon", "be", "1=1")
  14. }
  15. public Event_Change_Weapon(id)
  16. {
  17. new weaponID = read_data(2)
  18.  
  19. if(weaponID == CSW_KNIFE)
  20. {
  21. if(get_user_team(id) == 1)
  22. {
  23. set_pev(id, pev_viewmodel2, "models/v_te.mdl") //TE V_
  24. set_pev(id, pev_weaponmodel2, "models/p_te.mdl")//TE P_
  25. }
  26. else if(get_user_team(id) == 2)
  27. {
  28. set_pev(id, pev_viewmodel2, "models/v_ct.mdl")//CT V_
  29. set_pev(id, pev_weaponmodel2, "models/p_ct.mdl")//CT P_
  30. }
  31. }
  32. return PLUGIN_CONTINUE
  33. }


Valami nem jó, feltettem és fel megyek a szerverre átváltok késre akkor kivág a játékból

Szerző:  HunGamer [ 2013.01.27. 11:01 ]
Hozzászólás témája:  Re: Kés model

Hopp. My fail. Ez már jó lesz.
SMA Forráskód: [ Mindet kijelol ]
  1. #include <amxmodx>
  2. #include <amxmisc>
  3. #include <fakemeta>
  4.  
  5. #define PLUGIN "New Plug-In"
  6. #define VERSION "1.0"
  7. #define AUTHOR "HunGamer"
  8.  
  9. new const p_temodel[] = "models/p_te.mdl" //TE P_ MODEL
  10. new const v_temodel[] = "models/v_te.mdl" //TE V_ MODEL
  11. new const p_ctmodel[] = "models/p_ct.mdl" //CT P_ MODEL
  12. new const v_ctmodel[] = "models/v_ct.mdl" //CT V_ MODEL
  13.  
  14. public plugin_init()
  15. {
  16. register_plugin(PLUGIN, VERSION, AUTHOR)
  17. register_event("CurWeapon", "Event_Change_Weapon", "be", "1=1")
  18. }
  19. public plugin_precache()
  20. {
  21. precache_model(p_temodel)
  22. precache_model(v_temodel)
  23. precache_model(p_ctmodel)
  24. precache_model(v_ctmodel)
  25. }
  26. public Event_Change_Weapon(id)
  27. {
  28. new weaponID = read_data(2)
  29.  
  30. if(weaponID == CSW_KNIFE)
  31. {
  32. if(get_user_team(id) == 1)
  33. {
  34. set_pev(id, pev_viewmodel2, v_temodel)
  35. set_pev(id, pev_weaponmodel2, p_temodel)
  36. }
  37. else if(get_user_team(id) == 2)
  38. {
  39. set_pev(id, pev_viewmodel2, v_ctmodel)
  40. set_pev(id, pev_weaponmodel2, p_ctmodel)
  41. }
  42. }
  43. return PLUGIN_CONTINUE
  44. }

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