Ulysses Stuff > Ulysses Release Archives
RADAR (Radar is A Death-match Addition to Role-play)
Megiddo:
If it's more than about 1k lines, my personal preference is multiple files...
JamminR:
When you start getting large, and have sections that are client only, and sections that are server only, and then some that do both, it's often easier (again) with large projects to have all three (Which, ULib/ULX does, cl, and sh)
LuaTenshi:
I have updated the code above and I have moved the old code to PasteBin, Also I have added another file called rdr_invis.lua its pretty much a copy of what ULX uses for invisibility, but this one will not give you any errors. (Look at the code to see what I mean.)
I am still looking for people to help me with this, I really don't want to post this on facepunch because I am afraid that people will steal it, so please just spread the word to people you think may be interested and together we can make this thing awesome.
Oh and the scores are kinda messed up, and they wont save.
---snip---
Here is the AntiPK code because some people where asking me for just the AntiPK code. (The damage to sender does not work yet but it will, after I update it.)
--- Code: ---function antiPk( target, dmginfo )
if( dmginfo:GetDamageType() == DMG_CRUSH ) then
-- local atk = dmginfo:GetAttacker()
-- if( IsValid(atk) and atk:Alive() ) then
-- if(atk:Health() >= 1) then
-- atk:SetHealth(atk:Health() - dmginfo:GetDamage())
-- else
-- atk:Kill()
-- end
-- end
dmginfo:ScaleDamage( 0 )
end
end
hook.Add( "EntityTakeDamage", "antiPk", antiPk )
--- End code ---
MrPresident:
--- Quote from: HeLLFox_15 on November 30, 2012, 08:20:45 AM ---...
So in short, what is most convenient for you as developers.
--- End quote ---
I know this isn't a gamemode, but for instance here is a snip of my gamemode's gamemode folder.
Technically this could ALL be in one huge file but considering the init.lua file alone has over 10,000 lines of code in it... It would just be an unreadable mess.
Just be sure you set up your includes correctly and keep in mind that certain things are called in order, such as setting up tables and such. For instance.. make sure a table exists in your code before you try to modify it. This is pretty basic and easy to understand if you keep your code in one file, but can start to get tricky when you break it down.
Navigation
[0] Message Index
[*] Previous page
Go to full version