Is there an addon for Slay in the next round for Murder server?
There are plenty for TTT where you'd just need to update the hook which is called on round start.
Here's mine: [url]https://dl.dropboxusercontent.com/u/26074909/tutoring/_systems/simple_slay_next_round/sv_slaynr.lua.html[/url]
Use slaynr /? or just slaynr in console for help.
Update the hook.Add for TTTBeginRound, TTTEndRound, TTTPrepareRound at the bottom.
Also, people typically frown upon requests in the dev forum as this is for people asking for help in coding... You're new so here are some help topics:
Hey, welcome to FacePunch.
This forum is for devs that need help working on things. Here are some resources to help you get started:
-------------------------------------------------------------
Generalized Lua Help ( Links to Wikis, Answers the question of "Where do I post a simple question or DarkRP Specific question", links to other resources compiled by forum members )
[url]https://dl.dropboxusercontent.com/u/26074909/tutoring/___welcome_docs/_welcome_general_lua_learning.lua.html[/url]
Useful Programs ( SteamCMD, Autosizer, Desktops, Process Explorer ) and Notepad++ Upgrades
[url]https://dl.dropboxusercontent.com/u/26074909/tutoring/___welcome_docs/_welcome_useful_programs_and_notepadpp_upgrades.lua.html[/url]
[QUOTE=Acecool;46814616]There are plenty for TTT where you'd just need to update the hook which is called on round start.
Here's mine: [url]https://dl.dropboxusercontent.com/u/26074909/tutoring/_systems/simple_slay_next_round/sv_slaynr.lua.html[/url]
Use slaynr /? or just slaynr in console for help.
Update the hook.Add for TTTBeginRound, TTTEndRound, TTTPrepareRound at the bottom.
Also, people typically frown upon requests in the dev forum as this is for people asking for help in coding... You're new so here are some help topics:
Hey, welcome to FacePunch.
This forum is for devs that need help working on things. Here are some resources to help you get started:
-------------------------------------------------------------
Generalized Lua Help ( Links to Wikis, Answers the question of "Where do I post a simple question or DarkRP Specific question", links to other resources compiled by forum members )
[url]https://dl.dropboxusercontent.com/u/26074909/tutoring/___welcome_docs/_welcome_general_lua_learning.lua.html[/url]
Useful Programs ( SteamCMD, Autosizer, Desktops, Process Explorer ) and Notepad++ Upgrades
[url]https://dl.dropboxusercontent.com/u/26074909/tutoring/___welcome_docs/_welcome_useful_programs_and_notepadpp_upgrades.lua.html[/url][/QUOTE]
I get these errors:
[ERROR] lua/autorun/sv_slaynr.lua:150: attempt to index field 'slay_next_round' (a nil value)
1. unknown - lua/autorun/sv_slaynr.lua:150
2. unknown - lua/includes/modules/concommand.lua:69
Did you copy from the .lua or .html?
It is defined on line 23 and this was one of the systems I tested. I'll go back and re-test it.
edit: Actually, I see you put it in lua/autorun/ a SHARED folder. It needs to be in the lua/autorun/server/ folder because it is a SERVER file.
[QUOTE=Acecool;46814781]Did you copy from the .lua or .html?
It is defined on line 23 and this was one of the systems I tested. I'll go back and re-test it.
edit: Actually, I see you put it in lua/autorun/ a SHARED folder. It needs to be in the lua/autorun/server/ folder because it is a SERVER file.[/QUOTE]
Add file to the server folder no errors, but nothing happens on Gamemode TTT
Type slaynr /? or slaynr in console ( make sure you're admin via IsAdmin function ). It'll give instructions on how to add / edit / remove slays...
The big thing is ensuring your admin system uses the PlayerMeta:IsAdmin( ) function. If it doesn't you'll either need to modify the meta function to add yourself to it or you'll need to edit the code to set up admins via groups.
[QUOTE=Acecool;46815158]Type slaynr /? or slaynr in console ( make sure you're admin via IsAdmin function ). It'll give instructions on how to add / edit / remove slays...
The big thing is ensuring your admin system uses the PlayerMeta:IsAdmin( ) function. If it doesn't you'll either need to modify the meta function to add yourself to it or you'll need to edit the code to set up admins via groups.[/QUOTE]
I wrote slaynr /test Nick, not what did not work, then probyval write all the teams the same
If it didn't output anything you may not be a valid admin...
AFTER THIS CODE:
[code]//
// So player can be tostring/output
//
local META_PLAYER = FindMetaTable( "Player" );
function META_PLAYER:__tostring( )
return "Player " .. self:Nick( ) .. " [ " .. self:SteamID( ) .. " ]";
end[/code]
ADD
[code]//
// These steamids are admins.. Follow the pattern
//
local AdminList = {
[ "STEAM_0:1:4173055" ] = true;
[ "STEAM_0:0:0" ] = true;
};
//
// This rewrites _p:IsAdmin( ) to return true if the steamid is in the list above...
//
function META_PLAYER:IsAdmin( )
return AdminList[ self:SteamID( ) ];
end[/code]
Make sure you change the steamid to yours.... then try it...
Here are the commands "slaynr /?" in console outputs:
[code] //
// Help System
//
Welcome to slaynr. use slaynr plus any of the following commands:
* /test <player_name> - If you want to know what partial username you need to type to access a player, use this. It makes no changes and only outputs the player name / steamid.
* /add <player_name> - Increments Player slays count by 1 ( works through map-change ).
* /del <player_name> - Reduces Player slay count by 1.
* /undo - Only undoes add/del actions. Only stores LAST action ( just in-case you made a typo with last action )...
* /list - Lists all pending slays.
* /now <player_name> - Slays a player immediately; does not add user to slay list.
* /run - slays all players on list immediately ( without counting towards number of slays for that player ). Useful to slay someone if they're causing issues after a round, etc.
* /reload - forces data file to be reloaded, useful if you edited using text-editor. This will overwrite any un-saved changes.
* /save - forces the file to be saved.[/code]
Meaning, in console as long as _p:IsAdmin( ) returns true for you then it'll return something. Otherwise it won't. If you're not IsAdmin then it'll print text into the SERVER console so if you have -condebug enabled in launch options we could see if the error message was output when you tried it.
Sorry, you need to Log In to post a reply to this thread.