[MOD]GunGame


(nukits) #21

You have to make maps to for it , and its not that easy like it seems i think , but that would be coolio :stuck_out_tongue:


(carnage) #22

I have played the gg mode for counter strike. Its actuly pretty fun game. Although its probably because I find regular counter strike very boring, and in the gg your not wating 5 minutes for the match to end before you can respawn

But the best way to see if it would be fun in ET would be to make the mod and test it. As far as needing custom maps goes. You could play it on stock maps but most gg servers in cs have pertty smaall symatrical maps as i guess this suits the gameplay a lot more


(Miki) #23

I have a lot of funmaps in witch deathmatch is central, but in every dm map, you can run gungame.


(Miki) #24

Okey, I want to pump some new life into this,
I think the mod is pretty simple to make. I’ve made a little step-plan
IF YOU CAN HELP ME ON ANY STEP, OR EVEN POINT ME IN THE RIGHT DIRECTION, PLEASE HELP ME!
any help will be very appreciated!

  1. Find the place where guns are put into the inventory on spawning, and remove them and set them to knife + weapon of the level (and set only soldier as possible to select ingame)
  2. If there is a kill, check what level that person has, and change it to a ‘better’ one – if that level++ = maxlevel, then ‘player xxx won!’, and nextmap

Any suggestions in what files I should look?


(stealth6) #25

maybe it would be easier to make a lua script for ETpro?
Cause in TJ servers they make your adrenaline 999 and disable other weapons so half the code is already out there, and it would save you alot of trouble.


(Miki) #26

the lua idea is great, but where can i find a reference, or a tutorial, or any help?


(Nail) #27

here:
http://wolfwiki.anime.net/index.php/ETPro:Lua_Mod_API


(Miki) #28

thanks for that reference!

the big problem there is : there is nothing like weapons commands there?
How can you change the player’s weapon then?


(ailmanki) #29

http://code3arena.planetquake.gamespy.com/tutorials/tutorial1.shtml


(Miki) #30

So far, so good. Everything works, I can see what level somebody is, you lose a level for selfkill, you gain a level for a kill. But now…
How do I take and give weapons…?


(crapshoot) #31

[QUOTE=Miki;192150]So far, so good. Everything works, I can see what level somebody is, you lose a level for selfkill, you gain a level for a kill. But now…
How do I take and give weapons…?[/QUOTE]

look in g_items.c functions Pickup_Weapon and G_DropWeapon for examples of adding and removing weapons from a client


(Pande) #32

heh this sounds like a lot of fun! I would play it :smiley:


(Miki) #33

Yes, but that’s in the C++ code. What I’m currently doing, is in LUA.
When a weapon is dropped, is there a command send to the server? I guess so, and in LUA for ETPRO you can force clients to execute a command (like ‘say Hi everybody!’, but then just ‘drop MP40’) or something…
But then the problem of ‘give’ a weapon stays…


(Pande) #34

perhaps make them get a ‘give all’ and then drop all the weapons that they aren’t allowed to have yet?

so like from Luger > Silenced luger you might have give all on a Luger kill and then drop every gun except for silenced luger?

wouldn’t work well unless your not allowing weapon pick ups though… probably not I would imagine.


(crapshoot) #35

ahh missed that part. you could try et.gentity_get() and et.gentity_set() functions by setting the Fieldnames sess.PlayerWeapon and / or sess.latchPlayerWeapon. no idea if that works, but it would be the first thing i would try.


(ailmanki) #36

thinking about it the mod idea sounds nice… looking forward to it :slight_smile:


(Miki) #37

I think we are on the right path here, but it still doesn’t work. So basicly, this is a little part of that script.

function et_ClientSpawn(clientNum, revived)
	levelup(clientNum)
	wapen = et.gentity_get (clientNum,"sess.playerWeapon",0) 
	wapen2 = et.gentity_get (clientNum,"sess.playerWeapon2",0) 
	et.G_Say(clientNum,0,"I have got a " .. wapen .. " and a " .. wapen2)
end 
function levelup(clientNum)
	if firstspawn == true or playerlevel[clientNum] == 0 then
		et.gentity_set(clientNum,"sess.playerWeapon", 0, 0)
		et.gentity_set(clientNum,"sess.playerWeapon2", 0, 1)
		et.G_Say(clientNum,0,"**SHOULD GET FIST WEAPON**")
		firstspawn = false
	else
		et.G_Say(clientNum,0,"**SHOULD GET COLT**")
		et.gentity_set(clientNum,"sess.playerWeapon", 0, 0)
		et.gentity_set(clientNum,"sess.playerWeapon2", 0, 7)
	end 
end 

Never mind the ‘else’ part in the levelupfunction, just take a look at the first one.
If you join the game, then your weapon as a spec is ‘0’, so i put the ‘sess.playerweapon’ on 0, but no effect.
Even the sess.playerweapon doesn’t work. The code for the luger is ‘1’, but if you join the game as a allied soldier, you still get your colt.

Any other suggestions or any errors here? in my ETDED console, there are no errors…


(Pande) #38

Isn’t that fine? Colt and Luger do the same damage do they not?


(Miki) #39

Yes but the MP40 nor the Thompson go away
everybody will be shooting with them instead of with luger/colt


(ailmanki) #40

might be the source of this rocketmod can help:
http://qmm.planetquake.gamespy.com/forums/viewtopic.php?t=61

it is for QMM and RTCW, but I have used that as a base for a plugin for ET, and it works fine. So bascially the structure is same, just the weapon codes are different.
But this code allows, to exactly define with what stuff a player spawns. Not which class though.

I tried to compare it to lua code, but I do not really understand where it meets…