AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Learn to code (https://forums.alliedmods.net/showthread.php?t=281568)

Leffeiilp 04-14-2016 14:31

Learn to code
 
Hello.

I'm new to addons and mods, and I'm trying to figure out how to complete my gameserver i use for Team pracc and matches. I can start by explaining that its a CSGO server and i use pugsetup or whatever its called, its actually great.

I want to add some commands to be displayed on the .setup menu.
I also want to be able to add my own "sv mp" commands in the fiture, but i have no idea on how to code.

so basicly i want to add for ex "allrounds" and have options "yes" "no", if no "mp_match_can_clinch 0" and if "yes" then "mp_match_can_clinch 1"

i have a understanding of code, and i get how it works but i cant figure out how to manage this.

in the pugsetup cfg it says this:
// In this file you can modify how options behave on the setup menu.
// You can change the default for any setting, and can enable/disable it
// from even showing up on the menu (by chaning display_setting to 0)
// If you turn the display_setting to 0, the default will always be used.

Code:

"SetupOptions"
{
        "maptype"
        {
                "default"                "current"                        // allowed values are "vote", "veto", and "current"
                "display_setting"                "1"
        }
        "teamtype"
        {
                "default"                "manual"                // allowed values are "captains", "manual", "random", "autobalanced" (if the rwsbalancer is enabled)
                "display_setting"                "1"
        }
        "autolive"
        {
                "default"                "1"
                "display_setting"                "1"
        }
        "kniferound"
        {
                "default"                "1"
                "display_setting"                "1"
        }
        "teamsize"
        {
                "default"                "5"
                "display_setting"                "1"
        }
        "record"
        {
                "default"                "1"
                "display_setting"                "1"                        // this will only be displayed also if tv_enable is set to 1
        }
        "aimwarmup"
        {
                "default"                "0"
                "display_setting"                "1"        // this will only be displayed also if the aim map list (configs/pugsetup/aim_maps.txt) has at least 1 valid map
        }
        "mapchange"
        {
                "display_setting"                "1"                        // you can allow clients to change map from the setup menu by changing this to 1
        }
        "playout"
        {
                "default"                "0"
                "display_setting"                "0"
        }
}

i dont see any commands here, only shortcuts like "autolive"

so my question is:

how can i add code to that?

best regards leffe
im deeply sorry for my poor english

Leffeiilp 04-14-2016 14:31

Re: Learn to code
 
Let me try to explain better...

I want to be able to add code to the .setupmenu
Lets say we decide to play allrounds on pracc, then i want to be able to select if i want that or not.

If i select NO to allrounds
then it will execute both LIVE.cfg and an other cfg with the commands "mp_match_can_clinch 1" and "mp_overtime_enable 1"

and if we choose YES to allrounds
then i select no on the menu and it will execute both LIVE.cfg and ofc the config with "mp_match_can_clinch 0" and "mp_overtime_enable 0"

Depresie 04-14-2016 14:33

Re: Learn to code
 
https://forums.alliedmods.net/forumdisplay.php?f=52

Go to the sourcemod section, amx is only for cs 1.6

Leffeiilp 04-14-2016 14:38

Re: Learn to code
 
oh im sorry!!!

but now i cant post more cus im a new member, could you help me here instead?

ddhoward 04-14-2016 17:18

Re: Learn to code
 
https://forums.alliedmods.net/showthread.php?t=281566
https://forums.alliedmods.net/showthread.php?t=281569

Once is enough.

Artifact 04-15-2016 00:10

Re: Learn to code
 
Quote:

Originally Posted by Depresie (Post 2411058)
https://forums.alliedmods.net/forumdisplay.php?f=52

Go to the sourcemod section, amx is only for cs 1.6

Hm... CSGO is HL2 based game, and amxx is not for cs 1.6 only because there is few game based on HL1 engine, right?

klippy 04-15-2016 07:03

Re: Learn to code
 
Quote:

Originally Posted by Artifact (Post 2411134)
Hm... CSGO is HL2 based game, and amxx is not for cs 1.6 only because there is few game based on HL1 engine, right?

Few? More like hundreds.

Artifact 04-15-2016 16:44

Re: Learn to code
 
I think HL1 engine is a large part of what made games like CS, DoD, TFC, Firearms, Action Half-Life, The Specialists, etc. and everyone of this can be modified by amxx but priority is CS


All times are GMT -4. The time now is 18:33.

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