CellMod - a DarkRP module

Yeah! I’m completly aware of my missuse of NWvars and stuff, I actually started making the module with DarkRPvars instead, then I found out; They didn’t want to co-operate with me, heh. So I just made it NWvars.

I’ve already listed optimizing as a point for v.1.1 update, where I will fix stuff like these double loops, and use Usermessages for SendLua and Vars, and stuff that can be used with it :slight_smile:

Thanks for the advice anyway!
And also, as I commented in the script it self “… so I made this crappy workaround” heh.

[editline]11th October 2011[/editline]

I’m pretty sure they should be included, I had that issue myself, but I fixed it. So I think it should be working.
If you notice I forgot something, then write again. And I’ll check it out, maybe it’s a bug.

I have been trying to get it to work for a while now but it’s not possible.
No sounds and no SIM picture. Could you tell me what you did to fix it?
Hope this will be fixed soon, can’t wait! :slight_smile:

/ LiX


IMPORTANT

The v.1.1 has been released.
The only change is: I added the missing sounds and material files that I forgot in 1.0 facepalm

When you sent me the PM about overriding the /call thing, I thought you had already tried the playerSay hook.

You haven’t O_o

This code demonstrates how to override DarkRP’s chat command “/call”.

[lua]hook.Add(“PlayerSay”, “CM.Callingstuff”, function(ply, text, teamonly, dead)
if string.find(text, “/call”) then
– Do your stuff here
return “” – Return “” to make sure it doesn’t show up in chat
end
end)
[/lua]

I strongly suggest you check out the Gamemode hooks page to see what hooks are available.

Thanks, ill release it to my server now. Everyone likes it on there :smiley:

Oh, heh. Embarrasing to forget something so obvious :confused: Well thanks!
Maybe for the v.1.2 update the editing main.lua will be fixed then :wink: That’s great news :slight_smile:
I’ll test this tomorrow :slight_smile:

Thanks again.

Dark RP needs to be it’s own game or something. Supporting hundreds of players.

I’d probably fix looping through the players 3-4 times per tick thing first to be honest :v:

This is getting fixed in the next update 1.2. This will be only a optimization update :slight_smile:
Going to fix alot of small stuff there, and also bugs if there will be some :slight_smile:

Way to complicated to install

I truly understand. Wait a few days until I release the optimization update.
Then its only drop the files and play :slight_smile: No more complicated instal then.

Great, going to add this to my server, once it launches!

One of the few things that can actually make a serious DarkRP.

Train your admins personally, it will help massively as well.
Also make sure they never use admin privileges as playing rights.
By that I mean things like noclip for building, spawning weapons for self etc.

Yeah, I do all of these, my admins have been on duty 3 years now. Some of them aren’t the best roleplayers per se, since I recruited them out of sandbox, but they learn.

I am also not intending to have any such priviliges, as it would ruin everything.

But thanks anyway, they are good suggestions. :v:

Cool.

Awesome! if only more servers used this.

This is FUCKING AWESOME SAUCE

Neat idea.
But you should take time to review the script. It’s kind of messy on most parts.

Got broken by the new patch, gotta fix it.

[editline]16th October 2011[/editline]

I fixed it, these are lines 17-29 of CellMod.lua in gamemodes/DarkRP/modules


local function AddDir(dir) // recursively adds everything in a directory to be downloaded by client
	local List = file.FindDir(dir.."/*", true)

	for _, fdir in pairs(List) do
		if fdir != ".svn" then // don't spam people with useless .svn folders
			AddDir(dir.."/"..fdir)
		end
	end
 
	for k,v in pairs(file.Find(dir.."/*", true)) do
		resource.AddFile(dir.."/"..v)
	end
end

It was broken in the newest patch.

By habit you shouldn’t be adding every single file there is, check if it’s a folder, and if it is, call the function again, otherwise check the extension and if it’s a valid model/file then add it…