Advertisement
Guest User

Untitled

a guest
Dec 19th, 2014
184
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 4.07 KB | None | 0 0
  1. Version = "1.5"
  2. Author  = "^wMicha^0!"
  3. Description = "^7Hide^1&^7Seek"
  4. Homepage = "^7www^1.^7gs2175^1.^7fastdl^1.^7de "
  5. Irc = "^7#^wh^1&^ws.et "
  6. IP = "188.40.49.145:27972"
  7.  
  8. -------------------------------------------------------
  9. -- Updated July 2009
  10. --  Changelog:
  11. --
  12. --    1.5:
  13. --      Disabled forcetapout command
  14. --      Disabled lock command
  15. --
  16. --    1.4:
  17. --      Disabled kill command
  18. --
  19. --    1.3: 
  20. --      Added unlimited Stamina
  21. --      Added Message
  22. --
  23. --    1.2:
  24. --      Corrected Text
  25. --
  26. --    1.1:
  27. --      Made Configable
  28. --
  29. --    1.0:
  30. --          Known bugs u still get a knife
  31. --          initial release
  32. --
  33. -------------------------------------------------------
  34.  
  35. --global vars
  36. et.MAX_WEAPONS = 50
  37. samplerate = 200
  38. --
  39.  
  40. --note sme got no comments because it arent weapons
  41. weapons = {
  42.     nil,        --// 1
  43.     false,  --WP_LUGER,             // 2
  44.     false,  --WP_MP40,              // 3
  45.     false,  --WP_GRENADE_LAUNCHER,      // 4
  46.     false,  --WP_PANZERFAUST,           // 5
  47.     false,  --WP_FLAMETHROWER,      // 6
  48.     true,       --WP_COLT,              // 7    // equivalent american weapon to german luger
  49.     false,  --WP_THOMPSON,          // 8    // equivalent american weapon to german mp40
  50.     false,  --WP_GRENADE_PINEAPPLE, /   // 9
  51.     false,  --WP_STEN,              // 10   // silenced sten sub-machinegun
  52.     true,       --WP_MEDIC_SYRINGE,     // 11   // JPW NERVE -- broken out from CLASS_SPECIAL per Id request
  53.     true,       --WP_AMMO,              // 12   // JPW NERVE likewise
  54.     false,  --WP_ARTY,              // 13
  55.     false,  --WP_SILENCER,          // 14   // used to be sp5
  56.     false,  --WP_DYNAMITE,          // 15
  57.     nil,        --// 16
  58.     nil,        --// 17
  59.     nil,        --// 18
  60.     true,       --WP_MEDKIT,            // 19
  61.     false,  --WP_BINOCULARS,            // 20
  62.     nil,        --// 21
  63.     nil,        --// 22
  64.     false,  --WP_KAR98,             // 23   // WolfXP weapons
  65.     false,  --WP_CARBINE,           // 24
  66.     false,  --WP_GARAND,            // 25
  67.     false,  --WP_LANDMINE,          // 26
  68.     false,  --WP_SATCHEL,           // 27
  69.     false,  --WP_SATCHEL_DET,           // 28
  70.     nil,        --// 29
  71.     false,  --WP_SMOKE_BOMB,            // 30
  72.     false,  --WP_MOBILE_MG42,           // 31
  73.     false,  --WP_K43,               // 32
  74.     false,  --WP_FG42,              // 33
  75.     nil,        --// 34
  76.     false,  --WP_MORTAR,            // 35
  77.     nil,        --// 36
  78.     false,  --WP_AKIMBO_COLT,           // 37
  79.     false,  --WP_AKIMBO_LUGER,      // 38
  80.     nil,        --// 39
  81.     nil,        --// 40
  82.     false,  --WP_SILENCED_COLT,     // 41
  83.     false,  --WP_GARAND_SCOPE,      // 42
  84.     false,  --WP_K43_SCOPE,         // 43
  85.     false,  --WP_FG42SCOPE,         // 44
  86.     false,  --WP_MORTAR_SET,            // 45
  87.     false,  --WP_MEDIC_ADRENALINE,      // 46
  88.     false,  --WP_AKIMBO_SILENCEDCOLT,   // 47
  89.     false       --WP_AKIMBO_SILENCEDLUGER,  // 48
  90. }
  91.  
  92. function et_InitGame(levelTime,randomSeed,restart)
  93.     maxclients = tonumber( et.trap_Cvar_Get( "sv_maxClients" ) )   --gets the maxclients
  94.     et.G_Print("[HS] Version:"..Version.." Loaded\n")
  95.     et.RegisterModname("H&S by Micha!")
  96.     et.trap_SendServerCommand(-1, "b 8 \""..Description.." ^1[^7LUA^1] ^7powered by "..Author.." ^0^7Visit "..Homepage.." ^7Idle^1&^7Stay "..Irc.." \n\"" )
  97.         count = {}
  98.             for i = 0, mclients - 1 do
  99.             count[i] = 0   
  100.     end
  101. end
  102.  
  103. -- called every server frame
  104. function et_RunFrame( levelTime )
  105.    
  106.    if math.mod(levelTime, samplerate) ~= 0 then return end
  107.    -- for all clients
  108.    for j = 0, (maxclients - 1) do
  109.       for k=1, (et.MAX_WEAPONS - 1), 1 do
  110.           if not weapons[k] then
  111.             et.gentity_set(j, "ps.ammoclip", k, 0)
  112.             et.gentity_set(j, "ps.ammo", k, 0)
  113.             et.gentity_set(j, "ps.ammo", 7, 150)
  114.         et.gentity_set(j, "ps.ammo", 11, 150)
  115.         et.gentity_set(j, "ps.powerups", 12, levelTime + 10000 )
  116.          end
  117.       end      
  118.    end
  119.      
  120. function et_ClientBegin( clientNum )
  121.    et.trap_SendServerCommand(clientNum, "cp \"^wHide ^1& ^wSeek\"\n" )
  122. end
  123.  
  124. end
  125.  
  126. function et_ClientCommand(client, command)
  127.   if string.lower(command) == "kill" then
  128.     et.trap_SendServerCommand( client, "cp \"^1Sorry^z, ^wit's ^1disabled ^won this server^z.\n\"" )
  129.     return 1
  130.   end
  131.   if string.lower(command) == "forcetapout" then
  132.     et.trap_SendServerCommand( clientNum, "cp \"^1Sorry, outtapping is disabled on this server.\n\"" )
  133.     return 1
  134.   end
  135.   if string.lower(command) == "lock" then
  136.     et.trap_SendServerCommand( clientNum, "cpm \"^1Sorry, this command is disabled on this server.\n\"" )
  137.     return 1
  138.   end
  139. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement