Advertisement
Guest User

Untitled

a guest
Jan 27th, 2018
115
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 26.85 KB | None | 0 0
  1. Version = 1.5
  2. Author = "Perlo_0ung?!"
  3. Description = "LUGERWAR"
  4. Homepage = "www.ef-clan.org"
  5.  
  6. --global vars
  7. et.MAX_WEAPONS = 50
  8. samplerate = 200
  9. vtime = 1500
  10. min_vote_time = 300
  11.  
  12. --
  13.  
  14. --note sme got no comment thats becase it arent weapons
  15. weapons = {
  16. nil, --// 1
  17. true, --WP_LUGER, // 2
  18. false, --WP_MP40, // 3
  19. false, --WP_GRENADE_LAUNCHER, // 4
  20. false, --WP_PANZERFAUST, // 5
  21. false, --WP_FLAMETHROWER, // 6
  22. true, --WP_COLT, // 7 // equivalent american weapon to german luger
  23. false, --WP_THOMPSON, // 8 // equivalent american weapon to german mp40
  24. false, --WP_GRENADE_PINEAPPLE, // 9
  25. false, --WP_STEN, // 10 // silenced sten sub-machinegun
  26. false, --WP_MEDIC_SYRINGE, // 11 // JPW NERVE -- broken out from CLASS_SPECIAL per Id request
  27. true, --WP_AMMO, // 12 // JPW NERVE likewise
  28. true, --WP_ARTY, // 13
  29. false, --WP_SILENCER, // 14 // used to be sp5
  30. true, --WP_DYNAMITE, // 15
  31. nil, --// 16
  32. nil, --// 17
  33. nil, --// 18
  34. false, --WP_MEDKIT, // 19
  35. true, --WP_BINOCULARS, // 20
  36. nil, --// 21
  37. nil, --// 22
  38. false, --WP_KAR98, // 23 // WolfXP weapons
  39. false, --WP_CARBINE, // 24
  40. false, --WP_GARAND, // 25
  41. false, --WP_LANDMINE, // 26
  42. false, --WP_SATCHEL, // 27
  43. false, --WP_SATCHEL_DET, // 28
  44. nil, --// 29
  45. false, --WP_SMOKE_BOMB, // 30
  46. false, --WP_MOBILE_MG42, // 31
  47. false, --WP_K43, // 32
  48. false, --WP_FG42, // 33
  49. nil, --// 34
  50. false, --WP_MORTAR, // 35
  51. nil, --// 36
  52. false, --WP_AKIMBO_COLT, // 37
  53. false, --WP_AKIMBO_LUGER, // 38
  54. nil, --// 39
  55. nil, --// 40
  56. false, --WP_SILENCED_COLT, // 41
  57. false, --WP_GARAND_SCOPE, // 42
  58. false, --WP_K43_SCOPE, // 43
  59. false, --WP_FG42SCOPE, // 44
  60. false, --WP_MORTAR_SET, // 45
  61. false, --WP_MEDIC_ADRENALINE, // 46
  62. false, --WP_AKIMBO_SILENCEDCOLT,// 47
  63. false --WP_AKIMBO_SILENCEDLUGER,// 48
  64. }
  65.  
  66. sweapons = {
  67. nil, --// 1
  68. false, --WP_LUGER, // 2
  69. false, --WP_MP40, // 3
  70. false, --WP_GRENADE_LAUNCHER, // 4
  71. false, --WP_PANZERFAUST, // 5
  72. false, --WP_FLAMETHROWER, // 6
  73. false, --WP_COLT, // 7 // equivalent american weapon to german luger
  74. false, --WP_THOMPSON, // 8 // equivalent american weapon to german mp40
  75. false, --WP_GRENADE_PINEAPPLE, // 9
  76. true, --WP_STEN, // 10 // silenced sten sub-machinegun
  77. false, --WP_MEDIC_SYRINGE, // 11 // JPW NERVE -- broken out from CLASS_SPECIAL per Id request
  78. true, --WP_AMMO, // 12 // JPW NERVE likewise
  79. true, --WP_ARTY, // 13
  80. false, --WP_SILENCER, // 14 // used to be sp5
  81. true, --WP_DYNAMITE, // 15
  82. nil, --// 16
  83. nil, --// 17
  84. nil, --// 18
  85. false, --WP_MEDKIT, // 19
  86. true, --WP_BINOCULARS, // 20
  87. nil, --// 21
  88. nil, --// 22
  89. false, --WP_KAR98, // 23 // WolfXP weapons
  90. false, --WP_CARBINE, // 24
  91. false, --WP_GARAND, // 25
  92. false, --WP_LANDMINE, // 26
  93. false, --WP_SATCHEL, // 27
  94. false, --WP_SATCHEL_DET, // 28
  95. nil, --// 29
  96. false, --WP_SMOKE_BOMB, // 30
  97. false, --WP_MOBILE_MG42, // 31
  98. false, --WP_K43, // 32
  99. false, --WP_FG42, // 33
  100. nil, --// 34
  101. false, --WP_MORTAR, // 35
  102. nil, --// 36
  103. false, --WP_AKIMBO_COLT, // 37
  104. false, --WP_AKIMBO_LUGER, // 38
  105. nil, --// 39
  106. nil, --// 40
  107. false, --WP_SILENCED_COLT, // 41
  108. false, --WP_GARAND_SCOPE, // 42
  109. false, --WP_K43_SCOPE, // 43
  110. false, --WP_FG42SCOPE, // 44
  111. false, --WP_MORTAR_SET, // 45
  112. false, --WP_MEDIC_ADRENALINE, // 46
  113. false, --WP_AKIMBO_SILENCEDCOLT,// 47
  114. false --WP_AKIMBO_SILENCEDLUGER,// 48
  115. }
  116. kweapons = {
  117. nil, --// 1
  118. false, --WP_LUGER, // 2
  119. false, --WP_MP40, // 3
  120. false, --WP_GRENADE_LAUNCHER, // 4
  121. false, --WP_PANZERFAUST, // 5
  122. false, --WP_FLAMETHROWER, // 6
  123. false, --WP_COLT, // 7 // equivalent american weapon to german luger
  124. false, --WP_THOMPSON, // 8 // equivalent american weapon to german mp40
  125. false, --WP_GRENADE_PINEAPPLE, // 9
  126. false, --WP_STEN, // 10 // silenced sten sub-machinegun
  127. false, --WP_MEDIC_SYRINGE, // 11 // JPW NERVE -- broken out from CLASS_SPECIAL per Id request
  128. true, --WP_AMMO, // 12 // JPW NERVE likewise
  129. true, --WP_ARTY, // 13
  130. false, --WP_SILENCER, // 14 // used to be sp5
  131. true, --WP_DYNAMITE, // 15
  132. nil, --// 16
  133. nil, --// 17
  134. nil, --// 18
  135. false, --WP_MEDKIT, // 19
  136. true, --WP_BINOCULARS, // 20
  137. nil, --// 21
  138. nil, --// 22
  139. true, --WP_KAR98, // 23 // WolfXP weapons
  140. true, --WP_CARBINE, // 24
  141. true, --WP_GARAND, // 25
  142. false, --WP_LANDMINE, // 26
  143. false, --WP_SATCHEL, // 27
  144. false, --WP_SATCHEL_DET, // 28
  145. nil, --// 29
  146. false, --WP_SMOKE_BOMB, // 30
  147. false, --WP_MOBILE_MG42, // 31
  148. true, --WP_K43, // 32
  149. false, --WP_FG42, // 33
  150. nil, --// 34
  151. false, --WP_MORTAR, // 35
  152. nil, --// 36
  153. false, --WP_AKIMBO_COLT, // 37
  154. false, --WP_AKIMBO_LUGER, // 38
  155. nil, --// 39
  156. nil, --// 40
  157. false, --WP_SILENCED_COLT, // 41
  158. false, --WP_GARAND_SCOPE, // 42
  159. false, --WP_K43_SCOPE, // 43
  160. false, --WP_FG42SCOPE, // 44
  161. false, --WP_MORTAR_SET, // 45
  162. false, --WP_MEDIC_ADRENALINE, // 46
  163. false, --WP_AKIMBO_SILENCEDCOLT,// 47
  164. false --WP_AKIMBO_SILENCEDLUGER,// 48
  165. }
  166. function tobits( number )
  167.  
  168. -- bits array
  169. local bits = { }
  170.  
  171. -- let's get some bits
  172. while( number > 0 ) do
  173.  
  174. -- bit value (reversed)
  175. table.insert( bits, math.mod( number, 2 ) )
  176.  
  177. -- divide
  178. number = math.floor( number / 2 )
  179. end
  180.  
  181. return bits
  182. end
  183.  
  184. function ParseString(inputString)
  185. local i = 1
  186. local t = {}
  187. for w in string.gfind(inputString, "([^%s]+)%s*") do
  188. t[i]=w
  189. i=i+1
  190. end
  191. return t
  192. end
  193.  
  194. function et_InitGame(levelTime,randomSeed,restart)
  195. maxclients = tonumber( et.trap_Cvar_Get( "sv_maxClients" ) ) --gets the maxclients
  196. gamestate = tonumber(et.trap_Cvar_Get( "gamestate" ))
  197. et.G_Print("[Lugerwar] Version:1.2 Loaded\n")
  198. et.RegisterModname("Lugerwar by Perlo_0ung!?")
  199. et.trap_SendServerCommand(-1, "chat \"^1Welcome to ^7e^yL^7emen^yT^1'^73 ^yH^7ead^ys^7hot^7!! ^7This server runs ^3changed mapscripts ^7please visit ^7www^y.^7ef-clan^y.^7org for additional informations and check command map 4 new spawnpoints\n\"" )
  200. count = {}
  201. ammocount = {}
  202. hp = {}
  203. voteon = 0
  204. voteoff = 0
  205. vcount1 = 0
  206. vcount2 = 0
  207. svoteon = 0
  208. svoteoff = 0
  209. svcount1 = 0
  210. svcount2 = 0
  211. kvoteon = 0
  212. kvoteoff = 0
  213. kvcount1 = 0
  214. kvcount2 = 0
  215. mcount = 0
  216. for i = 0, maxclients - 1 do
  217. count[i] = 0
  218. ammocount[i] = 5
  219. end
  220. if gamestate == 0 then
  221. if tonumber(et.trap_Cvar_Get( "g_luger" )) == 1 or tonumber(et.trap_Cvar_Get( "g_k43" )) == 1 or tonumber(et.trap_Cvar_Get( "g_sten" )) == 1 then
  222. et.trap_SendServerCommand( -1 , "chat \"^7FUNWAR voting has been ^1disabled ^7for 5 minutes!\n\"" )
  223. voteon = 1
  224. end
  225. end
  226. end
  227.  
  228. function et_ClientSpawn(client,revived)
  229. count[client] = 0
  230. hp[client] = tonumber(et.gentity_get(client, "health"))
  231. luger = tonumber(et.trap_Cvar_Get( "g_luger" ))
  232. for i=1,(et.MAX_WEAPONS-1),1 do
  233. if not weapons[i] then
  234. if luger == 1 then
  235. et.gentity_set(client,"ps.ammoclip",i,0)
  236. et.gentity_set(client,"ps.ammo",i,0)
  237. et.gentity_set(client, "ps.ammo", 7, 150)
  238. et.gentity_set(client, "ps.ammo", 2, 150)
  239. elseif luger == 0 then
  240. et.gentity_set(client,"ps.ammoclip",3,120)
  241. et.gentity_set(client,"ps.ammo",3,120)
  242. et.gentity_set(client,"ps.ammoclip",8,120)
  243. et.gentity_set(client,"ps.ammo",8,120)
  244. end
  245. end
  246. end
  247. end
  248.  
  249. -- called every server frame
  250. function et_RunFrame( levelTime )
  251.  
  252. luger = tonumber(et.trap_Cvar_Get( "g_luger" ))
  253. if math.mod(levelTime, samplerate) ~= 0 then return end
  254. if sten == 1 then
  255. for j = 0, (maxclients - 1) do
  256. et.gentity_set(j,"sess.latchPlayerWeapon", 10)
  257. end
  258. end
  259. if k43 == 1 then
  260. for j = 0, (maxclients - 1) do
  261. teamnum = et.gentity_get(j,"sess.sessionTeam")
  262. weapon = et.gentity_get(j,"sess.latchPlayerWeapon")
  263. if teamnum == 1 then
  264. et.gentity_set(j,"sess.latchPlayerWeapon", 23)
  265. elseif teamnum == 2 then
  266. et.gentity_set(j,"sess.latchPlayerWeapon", 24)
  267. end
  268. if weapon == 3 or weapon == 8 then
  269. et.gentity_set(j, "health", -200)
  270. et.trap_SendServerCommand( j,"qsay \"^7U have been gibbed: ^1Spawned with wrong weapon!\n\"")
  271.  
  272. end
  273. end
  274. end
  275.  
  276. if mcount == 1 then
  277. mcount = mcount + 1
  278. end
  279. if mcount == 300 then
  280. mcount = 0
  281. end
  282. if lvoteon == 1 then
  283. vcount1 = vcount1 + 1
  284. end
  285. if lvoteoff == 1 then
  286. vcount2 = vcount2 + 1
  287. end
  288. if kvoteon == 1 then
  289. kvcount1 = kvcount1 + 1
  290. end
  291. if kvoteoff == 1 then
  292. kvcount2 = kvcount2 + 1
  293. end
  294. if svoteon == 1 then
  295. svcount1 = svcount1 + 1
  296. end
  297. if svoteoff == 1 then
  298. svcount2 = svcount2 + 1
  299. end
  300. if vcount1 == vtime then
  301. voteon = 0
  302. et.trap_SendServerCommand(-1 , "chat \"^7LUGERWAR Voting is now: ^1Activated!\n\"" )
  303. vcount1 = 0
  304. end
  305. if vcount2 == vtime then
  306. voteoff = 0
  307. et.trap_SendServerCommand(-1 , "chat \"^7LUGERWAR Voting is now: ^1Activated!\n\"" )
  308. vcount2 = 0
  309. end
  310. if kvcount1 == vtime then
  311. kvoteon = 0
  312. et.trap_SendServerCommand(-1 , "chat \"^7K43WAR Voting is now: ^1Activated!\n\"" )
  313. kvcount1 = 0
  314. end
  315. if kvcount2 == vtime then
  316. kvoteoff = 0
  317. et.trap_SendServerCommand(-1 , "chat \"^7K43WAR Voting is now: ^1Activated!\n\"" )
  318. kvcount2 = 0
  319. end
  320. if svcount1 == vtime then
  321. svoteon = 0
  322. et.trap_SendServerCommand(-1 , "chat \"^7STENWAR Voting is now: ^1Activated!\n\"" )
  323. svcount1 = 0
  324. end
  325. if svcount2 == vtime then
  326. svoteoff = 0
  327. et.trap_SendServerCommand(-1 , "chat \"^7STENWAR Voting is now: ^1Activated!\n\"" )
  328. svcount2 = 0
  329. end
  330. for j = 0, (maxclients - 1) do
  331. if count[j] == 50 then
  332. et.trap_SendServerCommand(-1 , "chat \""..et.gentity_get(j, "pers.netname").."^3's prone-disarm has been lifted!\n\"" )
  333. count[j] = 0
  334. et.gentity_set(j,"ps.ammoclip",3,120)
  335. et.gentity_set(j,"ps.ammo",3,120)
  336. et.gentity_set(j,"ps.ammoclip",8,120)
  337. et.gentity_set(j,"ps.ammo",8,120)
  338. et.gentity_set(j,"ps.ammo",7,32)
  339. et.gentity_set(j,"ps.ammoclip",7,8)
  340. et.gentity_set(j,"ps.ammo",2,32)
  341. et.gentity_set(j,"ps.ammoclip",2,8)
  342. et.gentity_set(j,"ps.ammo",10,64)
  343. et.gentity_set(j,"ps.ammoclip",10,32)
  344. et.gentity_set(j,"ps.ammo",23,20)
  345. et.gentity_set(j,"ps.ammoclip",23,10)
  346. et.gentity_set(j,"ps.ammo",24,20)
  347. et.gentity_set(j,"ps.ammoclip",24,10)
  348. end
  349. if count[j] > 0 then
  350. count[j] = count[j] +1
  351. end
  352. end
  353. for j = 0, (maxclients - 1) do
  354. local bits = tobits( et.gentity_get( j, "s.eFlags" ) )
  355. if bits[20] or bits[21] then
  356. if gamestate == 0 then
  357. if count[j] == 0 then
  358. count[j] = count[j] + 1
  359. if count[j] == 1 then
  360. et.trap_SendServerCommand(-1 , "chat \""..et.gentity_get(j, "pers.netname").." ^3proned !He has been disarmed for 10 Seconds!\n\"" )
  361. end
  362. end
  363. end
  364. end
  365. end
  366. for j = 0, (maxclients - 1) do
  367. for l=1, (et.MAX_WEAPONS - 1), 1 do
  368. if not weapons[l] then
  369. local luger = tonumber(et.trap_Cvar_Get( "g_luger" ))
  370. if luger == 1 then
  371. if count[j] < 50 then
  372. if count[j] > 0 then
  373. et.gentity_set(j, "ps.ammoclip", l, 0)
  374. et.gentity_set(j, "ps.ammo", l, 0)
  375. et.gentity_set(j, "ps.ammo", 7, 0)
  376. et.gentity_set(j, "ps.ammo", 2, 0)
  377. et.gentity_set(j, "ps.ammoclip", 7, 0)
  378. et.gentity_set(j, "ps.ammoclip", 2, 0)
  379. end
  380. end
  381. if count[j] == 0 then
  382. et.gentity_set(j, "ps.ammoclip", l, 0)
  383. et.gentity_set(j, "ps.ammo", l, 0)
  384. et.gentity_set(j, "ps.ammo", 7, 150)
  385. et.gentity_set(j, "ps.ammo", 2, 150)
  386. end
  387. elseif luger == 0 then
  388. if count[j] < 50 then
  389. if count[j] > 0 then
  390. et.gentity_set(j, "ps.ammoclip", l, 0)
  391. et.gentity_set(j, "ps.ammo", l, 0)
  392. et.gentity_set(j, "ps.ammo", 7, 0)
  393. et.gentity_set(j, "ps.ammo", 2, 0)
  394. et.gentity_set(j, "ps.ammoclip", 7, 0)
  395. et.gentity_set(j, "ps.ammoclip", 2, 0)
  396. end
  397. end
  398. end
  399. end
  400. end
  401. for s=1, (et.MAX_WEAPONS - 1), 1 do
  402. if not sweapons[s] then
  403. local sten = tonumber(et.trap_Cvar_Get( "g_sten" ))
  404. if sten == 1 then
  405. if count[j] < 50 then
  406. if count[j] > 0 then
  407. et.gentity_set(j, "ps.ammoclip", s, 0)
  408. et.gentity_set(j, "ps.ammo", s, 0)
  409. et.gentity_set(j, "ps.ammo", 10, 0)
  410. et.gentity_set(j, "ps.ammoclip", 10, 0)
  411. end
  412. end
  413. if count[j] == 0 then
  414. et.gentity_set(j, "ps.ammoclip", s, 0)
  415. et.gentity_set(j, "ps.ammo", s, 0)
  416. et.gentity_set(j, "ps.ammo", 10, 150)
  417. end
  418. elseif sten == 0 then
  419. if count[j] < 50 then
  420. if count[j] > 0 then
  421. et.gentity_set(j, "ps.ammoclip", s, 0)
  422. et.gentity_set(j, "ps.ammo", s, 0)
  423. et.gentity_set(j, "ps.ammo", 7, 0)
  424. et.gentity_set(j, "ps.ammo", 2, 0)
  425. et.gentity_set(j, "ps.ammoclip", 7, 0)
  426. et.gentity_set(j, "ps.ammoclip", 2, 0)
  427. end
  428. end
  429. end
  430. end
  431. end
  432. for k=1, (et.MAX_WEAPONS - 1), 1 do
  433. if not kweapons[k] then
  434. local k43 = tonumber(et.trap_Cvar_Get( "g_k43" ))
  435. if k43 == 1 then
  436. if count[j] < 50 then
  437. if count[j] > 0 then
  438. et.gentity_set(j, "ps.ammoclip", k, 0)
  439. et.gentity_set(j, "ps.ammo", k, 0)
  440. et.gentity_set(j, "ps.ammo", 23, 0)
  441. et.gentity_set(j, "ps.ammoclip", 23, 0)
  442. et.gentity_set(j, "ps.ammo", 24, 0)
  443. et.gentity_set(j, "ps.ammoclip", 24, 0)
  444. end
  445. end
  446. if count[j] == 0 then
  447. et.gentity_set(j, "ps.ammoclip", k , 0)
  448. et.gentity_set(j, "ps.ammo", k, 0)
  449. et.gentity_set(j, "ps.ammo", 23, 150)
  450. et.gentity_set(j, "ps.ammo", 24, 150)
  451. end
  452. elseif k43 == 0 then
  453. if count[j] < 50 then
  454. if count[j] > 0 then
  455. et.gentity_set(j, "ps.ammoclip", k, 0)
  456. et.gentity_set(j, "ps.ammo", k, 0)
  457. et.gentity_set(j, "ps.ammo", 23, 0)
  458. et.gentity_set(j, "ps.ammo", 24, 0)
  459. et.gentity_set(j, "ps.ammoclip", 23, 0)
  460. et.gentity_set(j, "ps.ammoclip", 24, 0)
  461. end
  462. end
  463. end
  464. end
  465. end
  466.  
  467. end
  468. end
  469. function et_ClientCommand(client, command)
  470. team = et.gentity_get(client,"sess.sessionTeam")
  471. sound1 = "sound/etpro/osp_prepare.wav"
  472. luger = tonumber(et.trap_Cvar_Get( "g_luger" ))
  473. sten = tonumber(et.trap_Cvar_Get( "g_sten" ))
  474. k43 = tonumber(et.trap_Cvar_Get( "g_k43" ))
  475. if string.lower(command) == "callvote" then
  476. if gamestate == 0 then
  477. if tonumber(et.gentity_get(client, "pers.voteCount")) > 4 then return end
  478. end
  479. if et.trap_Argv(1) == "map" then
  480. if et.trap_Argv(2) == "LUGERON" then
  481.  
  482. if luger == 1 then
  483. if team == 3 then return end
  484. et.trap_SendServerCommand( client,"cpm \"^7Sorry, but Lugerwar is already ^1ACTIVATED^7!\n\"")
  485. return 1
  486. end
  487. if luger == 0 then
  488. if team == 3 then return end
  489. if sten == 1 then
  490. et.trap_SendServerCommand( client,"cpm \"^7Sorry, but STENWAR is already ^1ACTIVATED^7!\n\"")
  491. return 1
  492. end
  493. if k43 == 1 then
  494. et.trap_SendServerCommand( client,"cpm \"^7Sorry, but K43WAR is already ^1ACTIVATED^7!\n\"")
  495. return 1
  496. end
  497. if lvoteoff == 0 then
  498. if mcount > 0 then return end
  499. et.G_globalSound( sound1 )
  500. et.trap_SendServerCommand( -1,"chat \"^7This vote ^1won't change map^7.. It's for activating the ^1Lugerwar^7!!!\n\"")
  501. mcount = 1
  502. elseif lvoteoff == 1 then
  503. et.trap_SendServerCommand( client,"cpm \"^7This vote is currently ^1DISABLED!\n\"")
  504. return 1
  505. end
  506. end
  507. end
  508. if et.trap_Argv(2) == "LUGEROFF" then
  509. if luger == 0 then
  510. if sten == 1 then
  511. et.trap_SendServerCommand( client,"cpm \"^7This vote is currently ^1DISABLED!\n\"")
  512. return 1
  513. end
  514. if k43 == 1 then
  515. et.trap_SendServerCommand( client,"cpm \"^7This vote is currently ^1DISABLED!\n\"")
  516. return 1
  517. end
  518. if team == 3 then return end
  519. et.trap_SendServerCommand( client,"cpm \"^7Sorry, but Lugerwar is already ^1DEACTIVATED^7!\n\"")
  520. return 1
  521. end
  522. if luger == 1 then
  523. if team == 3 then return end
  524. if lvoteon == 0 then
  525. if mcount > 0 then return end
  526. et.G_globalSound( sound1 )
  527. et.trap_SendServerCommand( -1,"chat \"^7This vote ^1won't change map^7.. It's for deactivating the ^1Lugerwar^7!!!\n\"")
  528. mcount = 1
  529. elseif lvoteon == 1 then
  530. et.trap_SendServerCommand( client,"cpm \"^7This vote is currently ^1DISABLED!\n\"")
  531. return 1
  532. end
  533. end
  534. end
  535. if et.trap_Argv(2) == "STENON" then
  536. if sten == 1 then
  537. if team == 3 then return end
  538. et.trap_SendServerCommand( client,"cpm \"^7Sorry, but Stenwar is already ^1ACTIVATED^7!\n\"")
  539. return 1
  540. end
  541. if sten == 0 then
  542. if team == 3 then return end
  543. if luger == 1 then
  544. et.trap_SendServerCommand( client,"cpm \"^7Sorry, but LUGERWAR is already ^1ACTIVATED^7!\n\"")
  545. return 1
  546. end
  547. if k43 == 1 then
  548. et.trap_SendServerCommand( client,"cpm \"^7Sorry, but K43WAR is already ^1ACTIVATED^7!\n\"")
  549. return 1
  550. end
  551. if svoteoff == 0 then
  552. if mcount > 0 then return end
  553. et.G_globalSound( sound1 )
  554. et.trap_SendServerCommand( -1,"chat \"^7This vote ^1won't change map^7.. It's for activating the ^1Stenwar^7!!!\n\"")
  555. mcount = 1
  556. elseif svoteoff == 1 then
  557. et.trap_SendServerCommand( client,"cpm \"^7This vote is currently ^1DISABLED!\n\"")
  558. return 1
  559. end
  560. end
  561. end
  562. if et.trap_Argv(2) == "STENOFF" then
  563. if sten == 0 then
  564. if luger == 1 then
  565. et.trap_SendServerCommand( client,"cpm \"^7This vote is currently ^1DISABLED!\n\"")
  566. return 1
  567. end
  568. if k43 == 1 then
  569. et.trap_SendServerCommand( client,"cpm \"^7This vote is currently ^1DISABLED!\n\"")
  570. return 1
  571. end
  572. if team == 3 then return end
  573. et.trap_SendServerCommand( client,"cpm \"^7Sorry, but Stenwar is already ^1DEACTIVATED^7!\n\"")
  574. return 1
  575. end
  576. if sten == 1 then
  577. if team == 3 then return end
  578. if svoteon == 0 then
  579. if mcount > 0 then return end
  580. et.G_globalSound( sound1 )
  581. et.trap_SendServerCommand( -1,"chat \"^7This vote ^1won't change map^7.. It's for deactivating the ^1Stenwar^7!!!\n\"")
  582. mcount = 1
  583. elseif svoteon == 1 then
  584. et.trap_SendServerCommand( client,"cpm \"^7This vote is currently ^1DISABLED!\n\"")
  585. return 1
  586. end
  587. end
  588.  
  589. end
  590.  
  591. if et.trap_Argv(2) == "K43ON" then
  592. if k43 == 1 then
  593. if team == 3 then return end
  594. et.trap_SendServerCommand( client,"cpm \"^7Sorry, but Stenwar is already ^1ACTIVATED^7!\n\"")
  595. return 1
  596. end
  597. if k43 == 0 then
  598. if team == 3 then return end
  599. if luger == 1 then
  600. et.trap_SendServerCommand( client,"cpm \"^7Sorry, but LUGERWAR is already ^1ACTIVATED^7!\n\"")
  601. return 1
  602. end
  603. if sten == 1 then
  604. et.trap_SendServerCommand( client,"cpm \"^7Sorry, but STENWAR is already ^1ACTIVATED^7!\n\"")
  605. return 1
  606. end
  607. if kvoteoff == 0 then
  608. if mcount > 0 then return end
  609. et.G_globalSound( sound1 )
  610. et.trap_SendServerCommand( -1,"chat \"^7This vote ^1won't change map^7.. It's for activating the ^1K43war^7!!!\n\"")
  611. mcount = 1
  612. elseif kvoteoff == 1 then
  613. et.trap_SendServerCommand( client,"cpm \"^7This vote is currently ^1DISABLED!\n\"")
  614. return 1
  615. end
  616. end
  617. end
  618. if et.trap_Argv(2) == "K43OFF" then
  619. if k43 == 0 then
  620. if luger == 1 then
  621. et.trap_SendServerCommand( client,"cpm \"^7This vote is currently ^1DISABLED!\n\"")
  622. return 1
  623. end
  624. if sten == 1 then
  625. et.trap_SendServerCommand( client,"cpm \"^7This vote is currently ^1DISABLED!\n\"")
  626. return 1
  627. end
  628. if team == 3 then return end
  629. et.trap_SendServerCommand( client,"cpm \"^7Sorry, but STENWAR is already ^1DEACTIVATED^7!\n\"")
  630. return 1
  631. end
  632. if k43 == 1 then
  633. if team == 3 then return end
  634. if kvoteon == 0 then
  635. if mcount > 0 then return end
  636. et.G_globalSound( sound1 )
  637. et.trap_SendServerCommand( -1,"chat \"^7This vote ^1won't change map^7.. It's for deactivating the ^1K43war^7!!!\n\"")
  638. mcount = 1
  639. elseif kvoteon == 1 then
  640. et.trap_SendServerCommand( client,"cpm \"^7This vote is currently ^1DISABLED!\n\"")
  641. return 1
  642. end
  643. end
  644.  
  645. end
  646. end
  647.  
  648. if et.trap_Argv(1) == "campaign" then
  649. if et.trap_Argv(2) == "cmpgn_ef10map" then
  650. et.trap_SendServerCommand( client,"cpm \"^7Sorry, but map voting has been ^1DISABLED^7!\n\"")
  651. return 1
  652. end
  653. if et.trap_Argv(2) == "cmpgn_centraleurope" then
  654. et.trap_SendServerCommand( client,"cpm \"^7Sorry, but map voting has been ^1DISABLED^7!\n\"")
  655. return 1
  656. end
  657. if et.trap_Argv(2) == "cmpgn_northafrica" then
  658. et.trap_SendServerCommand( client,"cpm \"^7Sorry, but map voting has been ^1DISABLED^7!\n\"")
  659. return 1
  660. end
  661. end
  662. if et.trap_Argv(1) == "shuffleteamsxp" then
  663. et.trap_SendServerCommand( client,"cpm \"^7Sorry, but you can only vote for ^1shuffle_norestart^7!\n\"")
  664. return 1
  665. end
  666. if et.trap_Argv(1) == "timelimit" then
  667. entered_argument2 = string.lower(et.trap_Argv(2))
  668. timel = tonumber(entered_argument2)
  669. if (timel > 1) then
  670. et.trap_SendServerCommand(client, "cpm \"^7Sorry, but you can only vote for ^1end the map^7!\n\"" )
  671. return 1
  672. end
  673. end
  674. end
  675. if string.lower(command) == "kill" then
  676. et.trap_SendServerCommand( client, "cp \"^1Sorry, selfkilling is disabled on this server.\n\"" )
  677. return 1
  678. end
  679. return 0
  680. end
  681.  
  682.  
  683. function et_Print(text)
  684. local t = ParseString(text)
  685. sound = "sound/etpro/osp_fight.wav"
  686. sound1 = "sound/chat/allies/65a.wav"
  687. sound2 = "sound/chat/allies/64a.wav"
  688. sound3 = "sound/chat/allies/63a.wav"
  689. if t[3] == "campaign" and t[4] == "'LUGERON'" then
  690. et.G_globalSound( sound )
  691. et.trap_Cvar_Set( "g_luger", "1" )
  692. lvoteon = 1
  693. et.trap_SendServerCommand( -1 , "chat \"^3LUGERWAR^7: ^1ON ^7/ ^7All Weapons: ^1OFF \n\"" )
  694. et.trap_SendServerCommand( -1 , "cp \"^3LUGERWAR^7: ^1ON ^7/ ^7All Weapons: ^1OFF \n\"" )
  695. if gamestate == 0 then
  696. et.trap_SendServerCommand( -1 , "chat \"^1FUNWAR voting ^7has been ^1disabled ^7for 5 minutes!\n\"" )
  697. end
  698. end
  699. if t[3] == "campaign" and t[4] == "'LUGEROFF'" then
  700. et.G_globalSound( sound )
  701. et.trap_Cvar_Set( "g_luger", "0" )
  702. lvoteoff = 1
  703. et.trap_SendServerCommand( -1 , "chat \"^3LUGERWAR^7: ^1OFF ^7/ ^7Weapons have been ^1RESTORED\n\"" )
  704. et.trap_SendServerCommand( -1 , "cp \"^3LUGERWAR^7: ^1OFF ^7/ ^7Weapons have been ^1RESTORED\n\"" )
  705. if gamestate == 0 then
  706. et.trap_SendServerCommand( -1 , "chat \"^1FUNWAR voting ^7has been ^1disabled ^7for 5 minutes!\n\"" )
  707. end
  708. for k = 0, (maxclients - 1) do
  709. et.gentity_set(k,"ps.ammoclip",3,120)
  710. et.gentity_set(k,"ps.ammo",3,120)
  711. et.gentity_set(k,"ps.ammoclip",8,120)
  712. et.gentity_set(k,"ps.ammo",8,120)
  713. et.gentity_set(k,"ps.ammo",7,32)
  714. et.gentity_set(k,"ps.ammoclip",7,8)
  715. et.gentity_set(k,"ps.ammo",2,32)
  716. et.gentity_set(k,"ps.ammoclip",2,8)
  717. et.gentity_set(k,"ps.ammo",23,20)
  718. et.gentity_set(k,"ps.ammoclip",23,10)
  719. et.gentity_set(k,"ps.ammo",24,20)
  720. et.gentity_set(k,"ps.ammoclip",24,10)
  721. end
  722. end
  723.  
  724. if t[3] == "campaign" and t[4] == "'STENON'" then
  725. et.G_globalSound( sound1 )
  726. et.trap_Cvar_Set( "g_sten", "1" )
  727. for k = 0, (maxclients - 1) do
  728. et.gentity_set(k,"sess.latchPlayerType",4)
  729. et.gentity_set(k,"sess.latchPlayerWeapon",10)
  730. et.trap_Cvar_Set( "team_maxSoldiers", "0" )
  731. et.trap_Cvar_Set( "team_maxMedics", "0" )
  732. et.trap_Cvar_Set( "team_maxEngineers", "0" )
  733. et.trap_Cvar_Set( "team_maxFieldops", "0" )
  734. et.trap_Cvar_Set( "team_maxCovertops", "-1" )
  735. et.gentity_set(k, "health", -200)
  736. end
  737. svoteon = 1
  738. et.trap_SendServerCommand( -1 , "chat \"^3STENWAR^7: ^1ON ^7/ ^7All Weapons: ^1OFF \n\"" )
  739. et.trap_SendServerCommand( -1 , "cp \"^3STENWAR^7: ^1ON ^7/ ^7All Weapons: ^1OFF \n\"" )
  740. if gamestate == 0 then
  741. et.trap_SendServerCommand( -1 , "chat \"^1FUNWAR voting ^7has been ^1disabled ^7for 5 minutes!\n\"" )
  742. end
  743. end
  744. if t[3] == "campaign" and t[4] == "'STENOFF'" then
  745. et.G_globalSound( sound2 )
  746. et.trap_Cvar_Set( "g_sten", "0" )
  747. svoteoff = 1
  748. et.trap_SendServerCommand( -1 , "chat \"^3STENWAR^7: ^1OFF ^7/ ^7Weapons have been ^1RESTORED\n\"" )
  749. et.trap_SendServerCommand( -1 , "cp \"^3STENWAR^7: ^1OFF ^7/ ^7Weapons have been ^1RESTORED\n\"" )
  750. if gamestate == 0 then
  751. et.trap_SendServerCommand( -1 , "chat \"^1FUNWAR voting ^7has been ^1disabled ^7for 5 minutes!\n\"" )
  752. end
  753. for k = 0, (maxclients - 1) do
  754. et.gentity_set(k,"sess.latchPlayerType",3)
  755. et.trap_Cvar_Set( "team_maxSoldiers", "-1" )
  756. et.trap_Cvar_Set( "team_maxMedics", "0" )
  757. et.trap_Cvar_Set( "team_maxEngineers", "-1" )
  758. et.trap_Cvar_Set( "team_maxFieldops", "-1" )
  759. et.trap_Cvar_Set( "team_maxCovertops", "0" )
  760. et.gentity_set(k, "health", -200)
  761. et.gentity_set(k,"ps.ammoclip",3,120)
  762. et.gentity_set(k,"ps.ammo",3,120)
  763. et.gentity_set(k,"ps.ammoclip",8,120)
  764. et.gentity_set(k,"ps.ammo",8,120)
  765. et.gentity_set(k,"ps.ammo",7,32)
  766. et.gentity_set(k,"ps.ammoclip",7,8)
  767. et.gentity_set(k,"ps.ammo",2,32)
  768. et.gentity_set(k,"ps.ammoclip",2,8)
  769. end
  770. end
  771.  
  772.  
  773. if t[3] == "campaign" and t[4] == "'K43ON'" then
  774. et.G_globalSound( sound3 )
  775. et.trap_Cvar_Set( "g_k43", "1" )
  776. for k = 0, (maxclients - 1) do
  777. et.gentity_set(k,"sess.latchPlayerType",2)
  778. if team == 1 then
  779. et.gentity_set(k,"sess.latchPlayerWeapon",23)
  780. elseif team == 2 then
  781. et.gentity_set(k,"sess.latchPlayerWeapon",24)
  782. end
  783. et.trap_Cvar_Set( "team_maxSoldiers", "0" )
  784. et.trap_Cvar_Set( "team_maxMedics", "0" )
  785. et.trap_Cvar_Set( "team_maxEngineers", "-1" )
  786. et.trap_Cvar_Set( "team_maxFieldops", "0" )
  787. et.trap_Cvar_Set( "team_maxCovertops", "0" )
  788. et.gentity_set(k, "health", -200)
  789. end
  790. kvoteon = 1
  791. et.trap_SendServerCommand( -1 , "chat \"^3K43WAR^7: ^1ON ^7/ ^7All Weapons: ^1OFF \n\"" )
  792. et.trap_SendServerCommand( -1 , "cp \"^3K43WAR^7: ^1ON ^7/ ^7All Weapons: ^1OFF \n\"" )
  793. if gamestate == 0 then
  794. et.trap_SendServerCommand( -1 , "chat \"^1FUNWAR voting ^7has been ^1disabled ^7for 5 minutes!\n\"" )
  795. end
  796. end
  797. if t[3] == "campaign" and t[4] == "'K43OFF'" then
  798. et.G_globalSound( sound2 )
  799. et.trap_Cvar_Set( "g_k43", "0" )
  800. kvoteoff = 1
  801. et.trap_SendServerCommand( -1 , "chat \"^3K43WAR^7: ^1OFF ^7/ ^7Weapons have been ^1RESTORED\n\"" )
  802. et.trap_SendServerCommand( -1 , "cp \"^3K43WAR^7: ^1OFF ^7/ ^7Weapons have been ^1RESTORED\n\"" )
  803. if gamestate == 0 then
  804. et.trap_SendServerCommand( -1 , "chat \"^1FUNWAR voting ^7has been ^1disabled ^7for 5 minutes!\n\"" )
  805. end
  806. for k = 0, (maxclients - 1) do
  807. et.gentity_set(k,"sess.latchPlayerType",3)
  808. et.trap_Cvar_Set( "team_maxSoldiers", "-1" )
  809. et.trap_Cvar_Set( "team_maxMedics", "0" )
  810. et.trap_Cvar_Set( "team_maxEngineers", "-1" )
  811. et.trap_Cvar_Set( "team_maxFieldops", "-1" )
  812. et.trap_Cvar_Set( "team_maxCovertops", "0" )
  813. et.gentity_set(k, "health", -200)
  814. et.gentity_set(k,"ps.ammoclip",3,120)
  815. et.gentity_set(k,"ps.ammo",3,120)
  816. et.gentity_set(k,"ps.ammoclip",8,120)
  817. et.gentity_set(k,"ps.ammo",8,120)
  818. et.gentity_set(k,"ps.ammo",7,32)
  819. et.gentity_set(k,"ps.ammoclip",7,8)
  820. et.gentity_set(k,"ps.ammo",2,32)
  821. et.gentity_set(k,"ps.ammoclip",2,8)
  822. end
  823. end
  824. end
  825. function et_ClientDisconnect(cno)
  826. count[cno] = 0
  827. end
  828. function et_Obituary( victim, killer, meansofdeath )
  829. count[victim] = 0
  830. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement