Hello.
Can i load addons only necessary addons for specific gamemode?
E.G.
TTT:
- any TTT HUD
- SpecDM
- PointShop
DarkRP
- CustomJobs
- CW:2.0
Overall
- ULX/ULib
- Community script for sync with MySQL / Site
Why I asking? Cuz i need to use overall sv.db and some scripts
P.S. Sorry for my English.
Most scripts have a thing (proper name escapes me) that you can refer to, to detect if it exists
like for example
[code]
if PS then
-- your code if the pointshop exists on server
end
[/code]
For TTT, you could check if TEAM_TERROR is not nil, etc etc
[QUOTE=NiandraLades;48541344]Most scripts have a thing (proper name escapes me) that you can refer to, to detect if it exists
like for example
[code]
if PS then
-- your code if the pointshop exists on server
end
[/code]
For TTT, you could check if TEAM_TERROR is not nil, etc etc[/QUOTE]
i think u don't understand me. I know how to write scripts, compare data etc...
I mean avoid loading PointShop e.g. if we playing on DarkRP server, but not if TTT.
Ofc we can do something like this:
addons/pointshop-master/lua/pointshop.lua
[CODE]
if not GetConVarString("gamemode") == "terrortown" then return end
-- PointShop source code here...
[/CODE]
but 1) it looks ugly no? 2) We need to edit source files, so we need to make editions after each addon update.
I mean mb exists any method (config) or something else.
And same for server.cfg, different gamemodes use different convars...
[QUOTE=NiandraLades;48541344]Most scripts have a thing (proper name escapes me) that you can refer to, to detect if it exists
like for example
[code]
if PS then
-- your code if the pointshop exists on server
end
[/code]
For TTT, you could check if TEAM_TERROR is not nil, etc etc[/QUOTE]
the addons load before ttt can define its things
[editline]25th August 2015[/editline]
[QUOTE=Koji6ac9H;48541428]
Ofc we can do something like this:
addons/pointshop-master/lua/pointshop.lua
[CODE]
if not GetConVarString("gamemode") == "terrortown" then return end
-- PointShop source code here...
[/CODE][/QUOTE]
doesn't even work
[editline]25th August 2015[/editline]
best solution is separate srcds instances for each gamemode
[editline]25th August 2015[/editline]
or you could use a script to move files around in your srcds run script
I don't get it, why not just remove the pointshop-master folder from the DarkRP addons directory?
engine.ActiveGamemode()
[QUOTE=JasonMan34;48543297]I don't get it, why not just remove the pointshop-master folder from the DarkRP addons directory?[/QUOTE]
Maybe he has a game mode switched on his server?
Sorry, you need to Log In to post a reply to this thread.