Comments (7)
The fact that many servers have this is no reason to add it by default.
Let servers give their own twist to it.
from darkrpmodification.
Not everyone knows how to code lua. It was my understanding the DarkRPModification addon was to make it so that you just need to know how to change values to make the changes you would generally want to make to customize your server easily and without extraneous coding.
I don't want it to be added by default and have to make people turn it off - it can be off by default, I just think it's something common enough that it should be included for the good of the script.
Anyway, if you're willing to help, I have this in my lua/autorun/server/assassinated.lua:
hook.Add("PlayerDeath","DemoteMayor",function(ply)
if (ply:Team() == TEAM_MAYOR) then
ply:ChangeTeam(TEAM_CITIZEN,true);
for k, v in ipairs(player.GetAll()) do
v:PrintMessage(HUD_PRINTCENTER,"The current Mayor of the city has been Assassinated!");
if v:Team() == TEAM_MAYORGUARD then
v:ChangeTeam(TEAM_CITIZEN,true);
end;
end;
end;
end);
It doesn't do anything when the mayor dies.
from darkrpmodification.
So the trick is that you want it for your server, and instead of making it yourself you ask me to put it in DarkRP by default.
from darkrpmodification.
I want it on other servers as well. This used to be something I'd see a lot and it makes a lot of sense so shitty mayors can be overthrown, but in the more recent versions of darkRP i've seen hosted, it hasn't been a feature just because it's not included. I think it should be an option like dropping cash on death or not, or voting on job changes or not.
If you don't want to code it I'd appreciate you telling me how to fix the version I want to implement, because apparently it's super easy (this code worked before but you removed the main.lua file I had it in) but I just don't know much, if you insist on not including it. I know it's not your job to implement every little feature I ask or tell me how to do it if you don't, but as a lua coder this is child's play to you, so the only reason you wouldn't just tell me is to be defensive about not wanting to do the work to put it in the script as a default.
Which would be easier than arguing!
from darkrpmodification.
I would learn gmod lua myself because it'd be easier than basically begging you for help on this ticket system when I run into simple issues but there's no resource anymore for learning the kind of lua at work in gmod today because Garry keeps fucking changing it and breaking everything and refactoring things to be 'easier' and 'better' and then people get sick of making documentation for it again and now there's no tutorials or intros to lua or anything. If you can point me to a good one go ahead.
from darkrpmodification.
On a less assholey note on my part, here's an error i'm getting on that code executing:
[ERROR] addons/darkrpmodification/lua/darkrp_modules/extragoodies/sv_models.lua:3: attempt to call method 'ChangeTeam' (a nil value)
- fn - addons/darkrpmodification/lua/darkrp_modules/extragoodies/sv_models.lua:3
- unknown - addons/ulib/lua/ulib/shared/hook.lua:183
if you just tell me what i'm supposed to be using here I'll go away.
from darkrpmodification.
Should be changeTeam (lowercase C).
from darkrpmodification.
Related Issues (20)
- I get this issue but unsure why
- darkrp data not writing to database. HOT 2
- setBodygroup doesn't change anything HOT 1
- customcheck not works HOT 2
- This is not a help forum. HOT 1
- settings.lua not functioning correclty HOT 3
- editing files HOT 1
- Sos
- Custom things aren't working HOT 4
- Police commands issue HOT 1
- Error with custom darkrpmodification files HOT 1
- DarkRP, HUD, F4, Scoreboard, Gray Playermodel issue HOT 1
- Some translation strings are not working HOT 9
- Spawns and Doorgroups not saving HOT 1
- I think i'm going insane over this. HOT 1
- ERROR HOT 1
- PocketBlacklist in settings.lua not doing anything HOT 2
- No HungerMod in settings.lua HOT 1
- language change HOT 8
- Hi problems HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from darkrpmodification.