HLMOD.HU Forrás Megtekintés - www.hlmod.hu
  1. /* Plugin Template generated by Pawn Studio */
  2.  
  3. #include <sourcemod>
  4. #include <sdkhooks>
  5.  
  6. #define KnifeSpeed 1.2
  7. #define KnifeGravity 0.8
  8.  
  9. public Plugin:myinfo =
  10. {
  11. name = "CustomSpeed&Gravity",
  12. author = "apocalyptic",
  13. description = "Kes sebbeseg és gravitacio",
  14. version = "1.0",
  15. url = "<- URL ->"
  16. }
  17.  
  18. public OnClientPutInServer(client)
  19. {
  20. SDKHook(client, SDKHook_WeaponSwitchPost, OnWeaponSwitchPost)
  21. }
  22.  
  23. public OnClientDisconnect(client)
  24. {
  25. SDKUnhook(client, SDKHook_WeaponSwitchPost, OnWeaponSwitchPost)
  26. }
  27.  
  28. public OnWeaponSwitchPost(client, weapon)
  29. {
  30. new String:Wpn[24]
  31. GetClientWeapon(client,Wpn,24)
  32. if (StrEqual(Wpn,"weapon_knife"))
  33. {
  34. SetClientSpeed(client,KnifeSpeed)
  35. SetEntityGravity(client,KnifeGravity)
  36. }
  37. else
  38. {
  39. SetClientSpeed(client,1.0)
  40. SetEntityGravity(client,1.0)
  41. }
  42. }
  43.  
  44. public SetClientSpeed(client,Float:speed)
  45. {
  46. SetEntPropFloat(client, Prop_Send, "m_flLaggedMovementValue",speed)
  47. }