multikills

Discussions about ET modding (sdk code, player/weapon modeling)

Moderators: Forum moderators, developers

Post Reply
User avatar
Clutch152
Posts: 33
Joined: Thu Oct 12, 2006 8:52 pm

multikills

Post by Clutch152 »

Hello again everyone :D I have most of my mod finished and it includes such things as killingsprees, deathsprees, flak monkeys, and basic gag commands from etadmin(most of em). The thing I am not certain how to attempt is multikills. The only thing that stands in my way of that is how to make it counts 3 seconds and if they get another kill within 3 seconds then it starts the 3 seconds over again and so on and so on.

I guess I am trying to make this so those people that have windows servers and cant install etadmin mod can have some sense of the fun stuff.

Thx again everyone :D
User avatar
ReyalP
Posts: 1663
Joined: Fri Jul 25, 2003 11:44 am

Post by ReyalP »

I was under the impression that etadmin_mod can be made to work in windows. http://et.d1p.de/etadmin_mod/wiki/index ... th_Windows

Anyway, assuming you want to finish your mod, are you writing it as an etpro lua mod or a gamecode mod ?

From lua, you can do any periodic actions from et_RunFrame. That also gives you the level time, which is in milliseconds.
send lawyers, guns and money
User avatar
Clutch152
Posts: 33
Joined: Thu Oct 12, 2006 8:52 pm

Post by Clutch152 »

etadmin mod can be run in windows but some server hosting companies dont like the applications that makes it possible. I know Nuclear Fallout servers cannot run etadmin mod.

This is a .lua script and I am pretty much making to help etadmin mod so it doesnt get bogged down but useless crap so it can focus mainly on the stuff needed.

If I were to use et_RunFrame then wouldn't the leveltime always be changing? I believe what I need for this is something to get the time remaing in the game and inprint it into a variable that only captures the leveltime when called to and not every server frame. Otherwise if you tried to do any math with it you'd always get the same answer and not a countdown, correct?
User avatar
ReyalP
Posts: 1663
Joined: Fri Jul 25, 2003 11:44 am

Post by ReyalP »

Clutch152 wrote: If I were to use et_RunFrame then wouldn't the leveltime always be changing?
Yes, you have to do something with leveltime after you grab it.

Keep the current level time using et_RunFrame. When you detect a kill, record who got the kill at what time, using a table that is indexed on client number, for example. The next time you detect a kill, compare the current time with the last time that player got a kill.
send lawyers, guns and money
User avatar
Clutch152
Posts: 33
Joined: Thu Oct 12, 2006 8:52 pm

Post by Clutch152 »

ok so if it were to be like this:

Code: Select all

multikill=0
function et_Obituary( victim, killer, meansOfDeath )
      local kill1=""
      local kill2=""

      multikill=multikill+1

      if (multikill==1) then
            kill1=et_RunFrame( levelTime )
      elseif (multikill==2) then
            kill2=et_RunFrame( levelTime )

            if &#40;&#40;kill2-kill1&#41;<=3000&#41; then
                  blah blah blah doublekill!
            else
                  multikill=0
            end
      end
end
Would a code like this work?
User avatar
Deus
Posts: 1053
Joined: Fri Mar 12, 2004 2:24 am
Location: Germany
Contact:

Post by Deus »

not the way its intended to.

you need one multikill-counters per player.
User avatar
=FF=im2good4u
Posts: 3821
Joined: Wed Feb 05, 2003 7:30 am
Location: The Netherlands, HOLLAND
Contact:

Post by =FF=im2good4u »

one way would be

Code: Select all

function et_Obituary&#40; victim, killer, meansOfDeath &#41;
    lastkilltime&#91;killer&#93; = 300 --set the time im milisecs until its kills will nolonger count as multykill
end

function et_RunFrame&#40;leveltime&#41;
    for client=0,64,1 do
        if lastkilltime&#91;client&#93; then --if it isnt 0
            lastkilltime&#91;client&#93; = lastkilltime&#91;cleint&#93; - 1 --decrease it whit 1
        else --if it is 0 thne his timer ran out
            et.G_Print&#40;"Client killed .. ppl"&#41;
        end
    end
end
but this will go over all clients each frame so might use a lot of cpu the other way is to check it at the killslike this

Code: Select all

function et_Obituary&#40; victim, killer, meansOfDeath &#41;
    currenttime = et.trap_Milliseconds&#40;&#41; --set the time at witch his 
last kill happent

    if &#40;currenttime - lastkilltime&#91;killer&#93;&#41; < 3000 then --if the kill happent whitin 3000 milisecs
        lastkilltime&#91;killer&#93; = currenttime --reset his killig time
        --count the kill for the multikill
    else
        et.G_Print&#40;"Client ".. killer .."has killed .. ppl"&#41;
        --his timer expired so count the current kills and print out the mesage and start counting at 1 again
    end 
end
the big prob whit this is that it will only conut thek il when a kill of that player happets so if he doesnt kill for a wehile the multykill message will not apear until his next kil and theryby sux.
User avatar
Clutch152
Posts: 33
Joined: Thu Oct 12, 2006 8:52 pm

Post by Clutch152 »

lol it would be great if i knew how to use the "for" control structure effectivly but until I get more into this script then ill settle with what I've got.
lol me == Lazy!
Deus wrote:not the way its intended to.

you need one multikill-counters per player.
Thats exactly what I did for the killingsprees, deathsprees, flak monkeys, and now multikills. I got it working at about 4:30 this morning lol using this code:

Code: Select all

killingspree0=0
flakkillse0=0
multikill0=0
deathspree0=0

local kill1=""
local kill2=""
local kill3=""
local kill4=""
local kill5=""
local kill6=""

killingspreesound="sound/misc/killingspree.wav"
rampagesound="sound/misc/rampage.wav"
dominatingsound="sound/misc/dominating.wav"
unstopablesound="sound/misc/unstoppable.wav"
godlikesound="sound/misc/godlike.wav"
wickedsicksound="sound/misc/wickedsick.wav"
pottersound="sound/misc/potter.wav"
flakmonkeysound="sound/misc/flakmonkey.wav"

deathspreesound1="sound/misc/humiliation.wav"
deathspreesound2="sound/misc/you_suck.wav"
deathspreesound3="sound/misc/ae821.wav"

doublekillsound="sound/misc/doublekill.wav"
multikillsound="sound/misc/multikill.wav"
ultrakillsound="sound/misc/ultrakill.wav"
monsterkillsound="sound/misc/monsterkill.wav"
ludicrouskillsound="sound/misc/ludicrouskill.wav"

function et_Obituary&#40; victim, killer, meansOfDeath &#41;
	if &#40;killer==0&#41; then
		killse0&#40;victim, killer, meansOfDeath&#41;
	end

	if &#40;victim==0&#41; then
		deathe0&#40;victim, killer, meansOfdeath&#41;
	end
end

function killse0&#40;victim, killer, meansOfDeath&#41;

	local killername=et.Info_ValueForKey&#40; et.trap_GetUserinfo&#40; killer &#41;, "name" &#41;
	local victimteam = tonumber&#40;et.gentity_get&#40;victim, "sess.sessionTeam"&#41;&#41; 
	local killerteam = tonumber&#40;et.gentity_get&#40;killer, "sess.sessionTeam"&#41;&#41;

	if &#40;killer~=victim&#41; then
		deathspree0=0
	else
	end
	
	if &#40;killer~=victim or victimteam~=killerteam&#41; then
		multikill0=multikill0+1

		if &#40;multikill0==1&#41; then 
			kill1=mtime

		elseif &#40;multikill0==2&#41; then 
			kill2=mtime

--50000 = 5 seconds. there is a random 0 tacked on the end of the levelTime
			if &#40;&#40;kill2-kill1&#41;<=50000&#41; then 
				et.trap_SendServerCommand&#40; killer,"bp "^1DOUBLEKILL!"\n"&#41;
				et.G_globalSound&#40;doublekillsound&#41; 
			else 
				multikill0=0 
			end 
		elseif &#40;multikill0==3&#41; then 
			kill3=tonumber&#40;mtime&#41; 

			if &#40;&#40;kill3-kill2&#41;<=50000&#41; then 
				et.trap_SendServerCommand&#40; killer,"bp "^1MULTIKILL!"\n"&#41;
				et.G_globalSound&#40;multikillsound&#41; 
			else 
				multikill0=0 
			end
		elseif &#40;multikill0==4&#41; then 
			kill4=tonumber&#40;mtime&#41; 

			if &#40;&#40;kill4-kill3&#41;<=50000&#41; then 
				et.trap_SendServerCommand&#40; killer,"bp "^1ULTRAKILL!"\n"&#41;
				et.G_globalSound&#40;ultrakillsound&#41; 
			else 
				multikill0=0 
			end
		elseif &#40;multikill0==5&#41; then 
			kill5=tonumber&#40;mtime&#41; 

			if &#40;&#40;kill5-kill4&#41;<=50000&#41; then 
				et.trap_SendServerCommand&#40; killer,"bp "^1MONSTERKILL!"\n"&#41;
				et.G_globalSound&#40;monsterkillsound&#41; 
			else 
				multikill0=0 
			end
		elseif &#40;multikill0==6&#41; then 
			kill6=tonumber&#40;mtime&#41; 

			if &#40;&#40;kill6-kill5&#41;<=50000&#41; then 
				et.trap_SendServerCommand&#40; killer,"bp "^1LUDICROUSKILL!"\n"&#41;
				et.G_globalSound&#40;ludicrouskillsound&#41; 
			else 
				multikill0=0 
			end
		end
	else
		multikill0=0
	end

	

	if &#40;killer~=victim or victimteam~=killerteam&#41; then
		killingspree0=killingspree0+1

		if &#40;killingspree0==5&#41; then
			et.trap_SendServerCommand&#40; killer,"cp "^1KILLINGSPREE!"\n"&#41;
			et.trap_SendConsoleCommand&#40; et.EXEC_APPEND, "bp ^7" ..killername.. " ^1is on a killingspree!\n" &#41;
			et.G_globalSound&#40;killingspreesound&#41;
		elseif &#40;killingspree0==10&#41; then
			et.trap_SendServerCommand&#40; killer,"cp "^1RAMPAGE!"\n"&#41;
			et.trap_SendConsoleCommand&#40; et.EXEC_APPEND, "bp ^7" ..killername.. " ^1is on a rampage!\n" &#41;
			et.G_globalSound&#40;rampagesound&#41;
		elseif &#40;killingspree0==15&#41; then
			et.trap_SendServerCommand&#40; killer,"cp "^1DOMINATION!"\n"&#41;
			et.trap_SendConsoleCommand&#40; et.EXEC_APPEND, "bp ^7" ..killername.. " ^1is dominating!\n" &#41;
			et.G_globalSound&#40;dominatingsound&#41;
		elseif &#40;killingspree0==20&#41; then
			et.trap_SendServerCommand&#40; killer,"cp "^1UNSTOPABLE!"\n"&#41;
			et.trap_SendConsoleCommand&#40; et.EXEC_APPEND, "bp ^7" ..killername.. " ^1is unstopable!\n" &#41;
			et.G_globalSound&#40;unstopablesound&#41;
		elseif &#40;killingspree0==25&#41; then
			et.trap_SendServerCommand&#40; killer,"cp "^1GODLIKE!"\n"&#41;
			et.trap_SendConsoleCommand&#40; et.EXEC_APPEND, "bp ^7" ..killername.. " ^1is godlike!\n" &#41;
			et.G_globalSound&#40;godlikesound&#41;
		elseif &#40;killingspree0==30&#41; then
			et.trap_SendServerCommand&#40; killer,"cp "^1WICKED SICK!"\n"&#41;
			et.trap_SendConsoleCommand&#40; et.EXEC_APPEND, "bp ^7" ..killername.. " ^1is wicked sick!\n" &#41;
			et.G_globalSound&#40;wickedsicksound&#41;
		elseif &#40;killingspree0==35&#41; then
			et.trap_SendServerCommand&#40; killer,"cp "^1POTTER!"\n"&#41;
			et.trap_SendConsoleCommand&#40; et.EXEC_APPEND, "bp ^7" ..killername.. " ^1is a god amongst men!\n" &#41;
			et.G_globalSound&#40;pottersound&#41;
		end



	else
		killingspree0=0
	end

	if &#40;meansOfDeath==17 or meansOfDeath==43 or meansOfDeath==44&#41; then
		if &#40;killer~=victim or victimteam~=killerteam&#41; then
			flakkillse0=flakkillse0+1

			if &#40;flakkillse0==3&#41; then
				et.trap_SendServerCommand&#40; killer,"cp "^1FLAKMONKEY!"\n"&#41;
				et.trap_SendConsoleCommand&#40; et.EXEC_APPEND, "bp ^7" ..killername.. " ^1got a flakmonkey!\n" &#41;
				et.G_globalSound&#40;flakmonkeysound&#41;

				flakkillse0=0
			end

		else
				flakkillse0=0
		end
	else
				flakkillse0=0
	end
end

function deathe0&#40;victim, killer, meansOfDeath&#41;

	local killername=et.Info_ValueForKey&#40; et.trap_GetUserinfo&#40; killer &#41;, "name" &#41;
	local victimteam = tonumber&#40;et.gentity_get&#40;victim, "sess.sessionTeam"&#41;&#41; 
	local killerteam = tonumber&#40;et.gentity_get&#40;killer, "sess.sessionTeam"&#41;&#41;
	local killedname=et.Info_ValueForKey&#40; et.trap_GetUserinfo&#40; victim &#41;, "name" &#41;
	deathspree0=deathspree0+1

	if &#40;killingspree0>=5&#41; then
		et.trap_SendConsoleCommand&#40; et.EXEC_APPEND, "bp ^7" ..killername.. " ^1ended ^7" ..killedname.. "^1's Killingspree! ^2&#40;^7" ..killingspree0.. "^2&#41;\n" &#41;
		killingspree0=0
	else
		killingspree0=0
	end
		
	if &#40;deathspree0==10&#41; then
		et.trap_SendConsoleCommand&#40; et.EXEC_APPEND, "bp ^7" ..killedname.. " ^7seems to be having a bad day!\n" &#41;
		et.G_globalSound&#40;deathspreesound1&#41;
	elseif &#40;deathspree0==15&#41; then
		et.trap_SendConsoleCommand&#40; et.EXEC_APPEND, "bp ^7" ..killedname.. " ^7is on the way to getting ^3victim^7 of the day!\n" &#41;
		et.G_globalSound&#40;deathspreesound2&#41;
	elseif &#40;deathspree0==20&#41; then
		et.trap_SendConsoleCommand&#40; et.EXEC_APPEND, "bp ^7" ..killedname.. " ^7is getting his ass kicked!\n" &#41;
		et.G_globalSound&#40;deathspreesound3&#41;
	end


	if &#40;flakkillse0>=1&#41; then
		flakkillse0=0
	end
end
Still working on how to make it all reset when the player disconnects but the et_ClientDisconnect( clientNum ) doesnt seem to like me very much.
[*EDIT*] Nevermind I figured this out just now aswell.

the killingspree0, flakkillse0, multikill0, deathspree0 have a number at the end to indicate player slot number for whoever is editing the code. You may notice that some of the varialbes and functions have a random "e" at the end before the number, I did that to make it easier to use the replace tool in wordpad.
me == lazy again

Now I read that when you have a local variable outside a function and then the variable is used in the function its called a upvalue. Does this mean that the value that is used in the function not valid outside the function?
http://www.lua.org/manual/5.0/manual.html#2.6

Please be patient with me, I have only started learning this script 2 days ago lol and I wanna be a programmer but I hate school :D
User avatar
Lagger
Posts: 316
Joined: Mon Sep 29, 2003 8:30 am

Post by Lagger »

I tried to make your code work for all players, i'm just as much a lua nab, but i think i got the syntax right, except maybe the array initializations.

Code: Select all

mkillcount=0
mkilltime=0
killspree=0
deathspree=0

killingspreesound="sound/misc/killingspree.wav"
rampagesound="sound/misc/rampage.wav"
dominatingsound="sound/misc/dominating.wav"
unstopablesound="sound/misc/unstoppable.wav"
godlikesound="sound/misc/godlike.wav"
wickedsicksound="sound/misc/wickedsick.wav"
pottersound="sound/misc/potter.wav"
flakmonkeysound="sound/misc/flakmonkey.wav"

deathspreesound1="sound/misc/humiliation.wav"
deathspreesound2="sound/misc/you_suck.wav"
deathspreesound3="sound/misc/ae821.wav"

doublekillsound="sound/misc/doublekill.wav"
multikillsound="sound/misc/multikill.wav"
ultrakillsound="sound/misc/ultrakill.wav"
monsterkillsound="sound/misc/monsterkill.wav"
ludicrouskillsound="sound/misc/ludicrouskill.wav"

function et_Obituary&#40; victim, killer, meansOfDeath &#41;
	killse&#40;victim, killer, meansOfDeath&#41;
	deathe&#40;victim, killer, meansOfdeath&#41;
end

function killse&#40;victim, killer, meansOfDeath&#41;

	local killername=et.Info_ValueForKey&#40; et.trap_GetUserinfo&#40; killer &#41;, "name" &#41;
	local victimteam = tonumber&#40;et.gentity_get&#40;victim, "sess.sessionTeam"&#41;&#41; 
	local killerteam = tonumber&#40;et.gentity_get&#40;killer, "sess.sessionTeam"&#41;&#41;

	if &#40;killer~=victim or victimteam~=killerteam&#41; then
		-- player kills an opponent
		deathspree&#91;killer&#93;=0

		-- multikills
		if &#40;mtime-mkilltime&#91;killer&#93;<50000&#41; then
			-- it's a multikill
			mkilltime = mtime
			mkillcount&#91;killer&#93; = mkillcount + 1
			
			if &#40;mkillcount&#91;killer&#93;==2&#41; then
				et.trap_SendServerCommand&#40; killer,"bp \"^1DOUBLEKILL!\"\n"&#41;
				et.G_globalSound&#40;doublekillsound&#41; 
			elseif &#40;mkillcount&#91;killer&#93;==3&#41; then
				et.trap_SendServerCommand&#40; killer,"bp \"^1MULTIKILL!\"\n"&#41;
				et.G_globalSound&#40;multikillsound&#41; 
			elseif &#40;mkillcount&#91;killer&#93;==4&#41; then
				et.trap_SendServerCommand&#40; killer,"bp \"^1ULTRAKILL!\"\n"&#41;
				et.G_globalSound&#40;ultrakillsound&#41; 
			elseif &#40;mkillcount&#91;killer&#93;==5&#41; then
				et.trap_SendServerCommand&#40; killer,"bp \"^1MONSTERKILL!\"\n"&#41;
				et.G_globalSound&#40;monsterkillsound&#41; 
			elseif &#40;mkillcount&#91;killer&#93;==6&#41; then
				et.trap_SendServerCommand&#40; killer,"bp \"^1LUDICROUSKILL!\"\n"&#41;
				et.G_globalSound&#40;ludicrouskillsound&#41; 
			end
		else
			-- no more multikill
			mkillcount&#91;killer&#93; = 0
		end
		
		-- killing sprees
		killspree&#91;killer&#93; = killspree +1
		if &#40;killspree&#91;killer&#93;==5&#41; then
			et.trap_SendServerCommand&#40; killer,"cp \"^1KILLINGSPREE!\"\n"&#41;
			et.trap_SendConsoleCommand&#40; et.EXEC_APPEND, "bp ^7" ..killername.. " ^1is on a killingspree!\n" &#41;
			et.G_globalSound&#40;killingspreesound&#41;
		elseif &#40;killspree&#91;killer&#93;==10&#41; then
			et.trap_SendServerCommand&#40; killer,"cp \"^1RAMPAGE!\"\n"&#41;
			et.trap_SendConsoleCommand&#40; et.EXEC_APPEND, "bp ^7" ..killername.. " ^1is on a rampage!\n" &#41;
			et.G_globalSound&#40;rampagesound&#41;
		elseif &#40;killspree&#91;killer&#93;==15&#41; then
			et.trap_SendServerCommand&#40; killer,"cp \"^1DOMINATION!\"\n"&#41;
			et.trap_SendConsoleCommand&#40; et.EXEC_APPEND, "bp ^7" ..killername.. " ^1is dominating!\n" &#41;
			et.G_globalSound&#40;dominatingsound&#41;
		elseif &#40;killspree&#91;killer&#93;==20&#41; then
			et.trap_SendServerCommand&#40; killer,"cp \"^1UNSTOPABLE!\"\n"&#41;
			et.trap_SendConsoleCommand&#40; et.EXEC_APPEND, "bp ^7" ..killername.. " ^1is unstopable!\n" &#41;
			et.G_globalSound&#40;unstopablesound&#41;
		elseif &#40;killspree&#91;killer&#93;==25&#41; then
			et.trap_SendServerCommand&#40; killer,"cp \"^1GODLIKE!\"\n"&#41;
			et.trap_SendConsoleCommand&#40; et.EXEC_APPEND, "bp ^7" ..killername.. " ^1is godlike!\n" &#41;
			et.G_globalSound&#40;godlikesound&#41;
		elseif &#40;killspree&#91;killer&#93;==30&#41; then
			et.trap_SendServerCommand&#40; killer,"cp \"^1WICKED SICK!\"\n"&#41;
			et.trap_SendConsoleCommand&#40; et.EXEC_APPEND, "bp ^7" ..killername.. " ^1is wicked sick!\n" &#41;
			et.G_globalSound&#40;wickedsicksound&#41;
		elseif &#40;killspree&#91;killer&#93;==35&#41; then
			et.trap_SendServerCommand&#40; killer,"cp \"^1POTTER!\"\n"&#41;
			et.trap_SendConsoleCommand&#40; et.EXEC_APPEND, "bp ^7" ..killername.. " ^1is a god amongst men!\n" &#41;
			et.G_globalSound&#40;pottersound&#41;
		end
	end
end

function deathe&#40;victim, killer, meansOfDeath&#41;

	local killername = et.Info_ValueForKey&#40; et.trap_GetUserinfo&#40; killer &#41;, "name" &#41;
	local killedname = et.Info_ValueForKey&#40; et.trap_GetUserinfo&#40; victim &#41;, "name" &#41;
	local victimteam = tonumber&#40;et.gentity_get&#40;victim, "sess.sessionTeam"&#41;&#41; 
	local killerteam = tonumber&#40;et.gentity_get&#40;killer, "sess.sessionTeam"&#41;&#41;

	if &#40;killspree&#91;victim&#93;>=5&#41; then
		et.trap_SendConsoleCommand&#40; et.EXEC_APPEND, "bp ^7" ..killername.. " ^1ended ^7" ..killedname.. "^1's Killingspree! ^2&#40;^7" ..killspree&#91;victim&#93;.. "^2&#41;\n" &#41;
	end
    
	killspree&#91;victim&#93; = 0
	deathspree&#91;victim&#93; = deathspree&#91;victim&#93; + 1

	-- announce death sprees
	if &#40;deathspree&#91;victim&#93; == 10&#41; then
		et.trap_SendConsoleCommand&#40; et.EXEC_APPEND, "bp ^7" ..killedname.. " ^7seems to be having a bad day!\n" &#41;
		et.G_globalSound&#40;deathspreesound1&#41;
	elseif &#40;deathspree&#91;victim&#93; == 15&#41; then
		et.trap_SendConsoleCommand&#40; et.EXEC_APPEND, "bp ^7" ..killedname.. " ^7is on the way to getting ^3victim^7 of the day!\n" &#41;
		et.G_globalSound&#40;deathspreesound2&#41;
	elseif &#40;deathspree&#91;victim&#93; == 20&#41; then
		et.trap_SendConsoleCommand&#40; et.EXEC_APPEND, "bp ^7" ..killedname.. " ^7is getting his ass kicked!\n" &#41;
		et.G_globalSound&#40;deathspreesound3&#41;
	end
end
User avatar
ReyalP
Posts: 1663
Joined: Fri Jul 25, 2003 11:44 am

Post by ReyalP »

Clutch152 wrote:lol it would be great if i knew how to use the "for" control structure effectivly but until I get more into this script then ill settle with what I've got.
lol me == Lazy!
Wow.

Just give up now.
send lawyers, guns and money
User avatar
Clutch152
Posts: 33
Joined: Thu Oct 12, 2006 8:52 pm

Post by Clutch152 »

ReyalP wrote:Wow.

Just give up now.
That's a little rude. Like I said, I only started like 2 days ago.
:cry:
User avatar
ReyalP
Posts: 1663
Joined: Fri Jul 25, 2003 11:44 am

Post by ReyalP »

Clutch152 wrote: That's a little rude. Like I said, I only started like 2 days ago.
:cry:
To do what you want to do, you need to understand tables and loops. Doing it any other way is insane, and no one will want to help you with the resulting code. There are lots of people here willing to help you, but very few who will just do the project for you.

If you've never done any coding before, you have a lot to learn. That's OK, many people have taught themselves, but you do have to accept that it is going to take quite a bit of time and effort.

I strongly suggest looking at the examples available on the wiki http://wolfwiki.anime.net/index.php/Category:ETPro:Mods Many of them do things like what you are trying to do.

I'm sorry if my response seemed rude. You obviously have put a lot of work into your script, but you need to pick up some more of the basics before you can use it effectively.
Now I read that when you have a local variable outside a function and then the variable is used in the function its called a upvalue. Does this mean that the value that is used in the function not valid outside the function?
You only have to worry about upvalues if you are defining functions inside of functions, which you most certainly do not want to be doing at this point.

In addition to the manual, there is an online version of the book Programming in Lua which takes a more tutorial approach.
send lawyers, guns and money
User avatar
Clutch152
Posts: 33
Joined: Thu Oct 12, 2006 8:52 pm

Post by Clutch152 »

Yea I'm only 19 and have only had 1 liberty basic programming class but I usually learn pretty quick and dont expect anyone to do anything for me such is the way of the pessimist. I already have been looking at codes from that site and have been looking at the EtPower mod for some refrences. Ive actually got the code pretty much finished without loops of any sort but I had to make 2 functions for every player slot for the kills and the deaths. I've currently got it up to 32 slots :D I've just got some small tweaking to do.

After I get it working the way I need it I'll revise it with tables and loops and such fanciness.

I thank you mr. ReyalP for your help.
Post Reply