Raised This Month: $51 Target: $400
 12% 

Need help understanding sourcemod code.


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Trielice
Junior Member
Join Date: Feb 2016
Old 02-19-2016 , 16:03   Need help understanding sourcemod code.
Reply With Quote #1

Hey,
Is there anyone who can help me understand how to setup a few plugins for sourcemod.
I have got alotta plugins to work fine.. but when it comes to using sourcemod to select maps from my workshop collection.. it wont show the workshop maps..

skype: Trielice
steam: Trielice

any help is appreciated.
Trielice is offline
hamilton5
Veteran Member
Join Date: Oct 2012
Location: USA
Old 02-19-2016 , 18:54   Re: Need help understanding sourcemod code.
Reply With Quote #2

Its all right there on the wiki for you to read and browse your self! glhf!

https://wiki.alliedmods.net/Map_Mana...28SourceMod%29
https://wiki.alliedmods.net/Managing...d_installation
hamilton5 is offline
Trielice
Junior Member
Join Date: Feb 2016
Old 02-19-2016 , 21:53   Re: Need help understanding sourcemod code.
Reply With Quote #3

Quote:
Originally Posted by hamilton5 View Post
Its all right there on the wiki for you to read and browse your self! glhf!

https://wiki.alliedmods.net/Map_Mana...28SourceMod%29
https://wiki.alliedmods.net/Managing...d_installation
Thank you and i will review these in detail.. but i am oviously doing something wrong.
I got the new commands to show up in the sourcemod ui.. but when i tell it to decrease speed by half it does nothing.

They show up but do nothing.
Trielice is offline
Trielice
Junior Member
Join Date: Feb 2016
Old 02-19-2016 , 22:49   Re: Need help understanding sourcemod code.
Reply With Quote #4

So i added sv_maxspeed with a few option like 350 normal 500 max 2 slow..
But when i select it, in the consol it says it doesnt know that command.. but yet when i type rcon sv_maxspeed 2 it works?
i tried rcon sv_maxspeed in the sourcemod but it said rcon command not known.
HELP!
can i not use consol command in the sourcemod? if not what good is this junk?
Trielice is offline
ddhoward
Veteran Member
Join Date: May 2012
Location: California
Old 02-19-2016 , 23:10   Re: Need help understanding sourcemod code.
Reply With Quote #5

What do you mean "in the sourcemod?"
__________________
ddhoward is offline
Trielice
Junior Member
Join Date: Feb 2016
Old 02-19-2016 , 23:29   Re: Need help understanding sourcemod code.
Reply With Quote #6

Quote:
Originally Posted by ddhoward View Post
What do you mean "in the sourcemod?"
Thank you for the responce. I am refering to SourceMod that give me the Ui when i type !admin
When i edit
File Manager > \addons\sourcemod\configs\adminmenu_custom.tx t
I would like to give me the option to change rcon sv_ settings on the fly. without typing them in the console every time

I feel i am close to figureing this out. Though i am having a hard time wrapping my head around the way I am to wrtie the code.

"Commands"
{
"Fun Commands"
{
"Set Player Speed"
{
"cmd" "sm_cvar sv_maxspeed #1 @2"
"admin" "sm_kick"
"execute" "player"
"1"
{
"type" "groupplayer"
"method" "name"
"title" "Player/Team to Edit"

}
"2"
{
"type" "list"
"title" "Speed Multiplier"
"1" "350"
"1." "Normal"
"2" "100"
"2." "80%"
"3" "2"
"3." "Half"
"4" "1.5"
"4." "50% Boost"
"5" "2.0"
"5." "Double"
"5*" "sm_ban"
//restrict the double option to admins who have access to the 'sm_ban' override
}

At the moment it sets the maxspeed to @all if i choose all vs the "2" like i want
Trielice is offline
Trielice
Junior Member
Join Date: Feb 2016
Old 02-19-2016 , 23:32   Re: Need help understanding sourcemod code.
Reply With Quote #7

Trielice is offline
Trielice
Junior Member
Join Date: Feb 2016
Old 02-19-2016 , 23:43   Re: Need help understanding sourcemod code.
Reply With Quote #8

So i switched it to

"Fun Commands"
{
"Set Player Speed 2"
{
"cmd" "sm_cvar sv_maxspeed 2"
"admin" "sm_kick"
"execute" "player"
"1"
{
"type" "groupplayer"
"method" "name"
"title" "Player/Team to Edit"
}
But if someone could help me understand how to get it to give multiple options vs making 100 lines for choices i would appreciate it.
Trielice is offline
asherkin
SourceMod Developer
Join Date: Aug 2009
Location: OnGameFrame()
Old 02-20-2016 , 04:44   Re: Need help understanding sourcemod code.
Reply With Quote #9

This is also well documented on the wiki: https://wiki.alliedmods.net/Custom_A...nu_(SourceMod)
__________________

Last edited by asherkin; 02-20-2016 at 04:45.
asherkin is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 19:32.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode