CellMod - a DarkRP module





What is CellMod?


What functions does CellMod give me?

Calling, Texting, Signal Core, and making your own cellphone company!


This is the Signal Frame that you’ll see all the time, at the bottom right at your screen.

Calling function is the most central function in CellMod.
You can /call to start dial, the player then has to approve your call by picking up the phone (/pickup).
Or he can /hangup and don’t answer your call.

The calls cost X amount (that is defined by the provider) each minute.

This function will probably mostly used.
You simply /text or /sms

You pay each message sent, the amount is defined by the provider.

Signal Core
This is a core that I made for the CellMod. The basic idea here is that every phone has reception.
The signal core decides how much reception you have, and when you loose it.
It’s based on already scripted-in areas from before, and also amount of props around you, if you are in
a area with extremely many props, your reception will drop (It never drops to No Signal state).

I made the reception drop, when you are near very many props. Since then you get this feeling that more stuff, is blocking the signal.
If you try to call someone or text someone, that is inside no-signal area. You’ll not be able to send the message or run the call.
If you are in a existing conversation and one of you two enter a no signal area, the conversation will be terminated.
There are currently only already scripted-in areas for signal for rp_downtown_v2 only. Expect more maps in next update!

Make your own cell provider
Make your own company with your own decided prices.
Choose how much a textmessage costs, and per minute a call cost, also
name your company what ever you want!

And give your simcard to other players with /givesim command!
Let’s see how many costumers you get!



Doesn’t work for G13. Feel free to download it and fix it yourself if you wish

Important Instruction of Install
1. Download the CellMod zip file.
2. Unzip it, and place it correctly in the DarkRP folder (It’s zipped just to drag and drop).
3. Enjoy and have fun calling!

The CellMod has not been updated for almost a year, don’t expect it to work at all / completly.

CellMod by Blt950 is licensed under a Creative Commons Attribution-NonCommercial-NoDerivs 3.0 Unported License.

You can find the changelog by clicking here


To-Do List

Future Update Plans
Ideas for next version.

- Remove the default coverage settings. Meaning: The provider needs to build cell towers, to give signal coverage to their clients.
- Cellphone provider company owner gets earning by clients using their service. (Not sure if I already implanted this or not, but it's going to be there)
- A visible counter down in the CellMod frame, showing the current call conversation duration.
- Fix the CellMod not loading properly on each restart of server, and compatible with Gmod 13 DarkRP.
- Make the entities that will be the Cell towers, that gives coverage to clients. A operator's cell tower will only send out his own signals.
- Bad signal will start to break up messages and delay them. Where texts will be simply delayed. 
And conversations would suddenly remove characters/words and breaking it up, and also delay them.
- Monthly payment from clients to owner: This will be X amount each payday probably. It will be optional to have this for companies.
- You can change call/text prices even after you've created the company. Maybe also make different subscriptions for one company?
Like two different ones, one where you pay no "monthly" fee, but calls are more expensive, and opposite. That will be up for you as provider to decide!
- Some sort of animation that shows you're talking in a phone.
- Maybe add a optional function for admins to disable/enable PMing, so people don't use it for free messages.
- A GUI for company owners, and players. Players will have a nice view all sent/recieved text messages, and call history and so on.
The provider owners will have all their company settings in there, such as plans, towers, income, outcome and so on.
- Fix GM:OnPlayerDeath, I overrided the function, instead of hook it.



Thanks to...

Blt950 (me)

Beta Testers

  • Torb
  • PetruZ
  • JamieH
  • LiX


  • Torb
  • PetruZ
  • Master One

Also thanks to FPtje for some helping, with some tips for the development!

Forgot to add somone? PM me, and I’ll fix it



I mean the video, Not the addon itself

Actually, this is one of the nicest DarkRP module’s I’ve seen. Surely it can be improved.

Seems like a nifty little thing, it might come in useful :slight_smile:

Thank you! As I’ve told, improvements comes now in future updates.
So the updates going to make it more exiting and fun :slight_smile:

Amazing!!! I will use this for my server FTW :smiley:

Finally not one “admin abuse commands” darkrp module… Congratulations, sir!

useless u can use the mic

I very well appreciate this module.
I was hoping that some day people would make addons for DarkRP. This was a great idea, I’d like to see it in game, so I’ll test it.

Great work.

Now there’s only one thing left for us to do: find a decent RP server running this addon…

Any test servers?

Indeed; Any servers running CellMod, send me a PM :slight_smile: I’ll list you up here on the main thread, and maybe you will be lucky to get a visit by me sometime :]

When a user sends a text or calls somebody, where does the money go? Will it go into the Mobile Operator’s pocket?

Now I feel like running a DarkRP server just for this. Good job mister.

Thank you :slight_smile:

The money currently don’t go anywhere, which is a little fault of my own side to forget to add. This will probably come in the first update v.1.1 :slight_smile:

Really cool module, though you use networked variables in a lot of places that you… well, don’t need to be networking things :v:

I would advise going through your script and checking to make sure that every single NWVar you use has to be access by everyone on the map. If you don’t need everyone on the server to be aware of an NWVar, don’t use an NWVar.

Also, don’t use SendLua so much.
Use usermessages, they’re a lot more reliable.

SendLua has a limit to how much data can be transferred per message and sometimes the data will be dropped or cut off at a certain character limit and the client will end up executing an unfinished script.

Other than that, it’s a really cool mod, good job :slight_smile:


Flawless just pointed out that you use Think hooks a lot… and, well, really poorly actually :v:

You have 3 functions hooked to “Think”, which is a bad start.
Think is called each tick, and you’re running it on the server, so you’ll be lagging the server quite a bit, mostly because in each of the three Think hooks you’re calling, you’re looping through all the players in the map, which means each tick of the server, you’re making the server loop through the players and perform various actions, including modifying networked data, 3 times every tick, which is bad.

In CM.ChangedTeam() you loop through each player on the server (Once again in the Think hook), and then inside an if-statement you’re looping through each player AGAIN, in the middle of an ongoing for-loop through each player in the server. Essentially, it’s possible that you’re looping through every player in the server 3-4 times each tick, PLUS doing an additional loop for every player on the server. That’s a lot of loops :v:

[lua]function CM.ChangedTeam() – Somehow the default detect team functions didnt want to co-operate :frowning: So I made this crappy workaround.
for k,user in pairs(player.GetAll()) do
if user:Team() == TEAM_MOPERATOR and not user:GetNWBool(“cm_config”) then
user:SetNWBool(“cm_config”, true)
elseif user:Team() != TEAM_MOPERATOR and user:GetNWString(“cm_company”) == user:GetNWString(“cm_operator”) and user:GetNWString(“cm_company”) != nil and user:GetNWString(“cm_company”) != “” and user:GetNWString(“cm_operator”) != nil and user:GetNWString(“cm_operator”) != “” then
for k, v in pairs(player.GetAll()) do
if v:GetNWString(“cm_operator”) == user:GetNWString(“cm_company”) then
v:SendLua(“chat.AddText(Color(255,50,0), ‘Your cellphone operator “…user:GetNWString(“cm_company”)…” has been dissolved’)”)
v:SendLua(“chat.AddText(Color(255,50,0), ‘Your current simcard will still work untill you change.’)”)
user:SetNWString(“cm_operator”, “”)
user:SetNWString(“cm_company”, “”)
elseif user:Team() != TEAM_MOPERATOR then
user:SetNWBool(“cm_config”, false)
hook.Add(“Think”, “CM.ChangedTeam”, CM.ChangedTeam)[/lua]

Using the think hook is fine, you just need to know how to control your intervals.
Create a single function hooked to Think, and put all of your current Think hook logic inside that function, then make a variable named “cm_NextTick” and use that to delay the execution of your code, er, here lemme show you:

local cm_NextTick = CurTime()
local cm_TickDelay = 3
function CM.Think()
if CurTime() >= cm_NextTick then --If it’s time to run our tick…
–Run the code
cm_NextTick = CurTime() + cm_TickDelay --Delay the next tick
hook.Add(“Think”, “CMThink”, CM.Think)

These are all honest mistakes and nobody should be railing on you for making them, but you should definitely fix these issues if you want people to use this addon on their servers.

Really nice module, will definitely run this on my server but I have a little trouble getting it to work properly.
The sounds are not working because you haven’t included the sound files in the download and the SIM picture is not showing up - it’s just a black/purple square.

Did I install it wrong or did you simply forgot to include some files?

/ LiX

wow, nice

My server currently is running this addon. I Like it alot. Check it out. It’s a build RP server. Just say your from here and youll get a reward :slight_smile: Server IP:

Great, now I can call all my gangsters.

I like calling my gangsters.

This is pretty cool, very impressive.