Absurd Minds
http://forums.absurdminds.net/

Modding 1v1 Server .sp Files
http://forums.absurdminds.net/viewtopic.php?f=58&t=2963
Page 1 of 1

Author:  Traviesaurus [ 11 Feb 2015 19:45 ]
Post subject:  Modding 1v1 Server .sp Files

I'm doing some research and learning how to make changes to source mod files. I am taking requests for the information you want me to find. Sourcemod is surprisingly easy to use, much to the inverse of what I was told. It is very similar to AMXmod. Actually coding is not easy if you have no coding background (me); however, it is easy to make small changes to other peoples mods.

How to turn off pistols, on non-"pistol only" modes.

Go to SCRIPTING > multi1v1.sp
Open the file
Search for the line 175 which says:
Code:
    g_hPistolBehavior = CreateConVar("sm_multi1v1_pistol_behavior", "0", "Behavior 0=always give the pistol the player selected, 1=never give pistols on non-pistol rounds, 2=always give sm_multi1v1_default_pistol on non-pistol rounds 3=give pistol choice on rifle/pistol rounds, but use sm_multi1v1_default_pistol on awp rounds");
Replace the first "0" with "1"

Click here to find Splewis' 1v1 mod

Author:  Amaroq [ 11 Feb 2015 21:12 ]
Post subject:  Re: Modding 1v1 Server .sp Files

That config actually exists in the config file. I changed it earlier tonight and it should be working like that. Is it not?

EDIT: Actually right now I have it set to give a pistol on rifle rounds but not on awp rounds. Should I change it so you don't have a pistol on rifle rounds too?

(Just for your information, the line you point to defines the cvar, and sets the default to 0. Changing it to 1 simply changes the default setting to 1. I defined the cvar as 1 in the config file instead of simply changing the default value and recompiling the plugin.)

Author:  Amaroq [ 11 Feb 2015 21:17 ]
Post subject:  Re: Modding 1v1 Server .sp Files

In terms of a request, I want you to figure out how I can make a scout round without losing the knife round.

This is what I've tried so far.

Author:  Amaroq [ 12 Feb 2015 18:25 ]
Post subject:  Re: Modding 1v1 Server .sp Files

Quote:
In terms of a request, I want you to figure out how I can make a scout round without losing the knife round.

This is what I've tried so far.
Hey, I figured it out! I can now add whatever type of round I want!
Code:
#include <sourcemod>
#include <smlib>
#include "include/multi1v1.inc"
#include "multi1v1/version.sp"

#pragma semicolon 1

public Plugin:myinfo = {
    name = "CS:GO Multi1v1: knife round addon",
    author = "splewis",
    description = "Adds an unranked knife round-type",
    version = PLUGIN_VERSION,
    url = "https://github.com/splewis/csgo-multi-1v1"
};

public void Multi1v1_OnRoundTypesAdded() {
    Multi1v1_AddRoundType("Knife", "knife", KnifeHandler, Multi1v1_NullChoiceMenu, true, false);
    Multi1v1_AddRoundType("Scout", "ssg08", ScoutHandler, Multi1v1_NullChoiceMenu, true,false);
}

public void KnifeHandler(int client) {
    Client_RemoveAllWeapons(client, "", true);
    Client_SetArmor(client, 100);
    GivePlayerItem(client, "weapon_knife");
}

public void ScoutHandler(int client) {
    Client_RemoveAllWeapons(client, "", true);
    Client_SetArmor(client, 100);
    GivePlayerItem(client, "weapon_ssg08");
}

Author:  Traviesaurus [ 12 Feb 2015 18:56 ]
Post subject:  Re: Modding 1v1 Server .sp Files

That's EXACTLY what I was going to do XD. I was going to search for awp rounds through the files. BTW scout rounds don't give you a knife currently. Just a scout.

Author:  Amaroq [ 12 Feb 2015 19:01 ]
Post subject:  Re: Modding 1v1 Server .sp Files

Should I give them a knife too

Author:  Traviesaurus [ 12 Feb 2015 19:06 ]
Post subject:  Re: Modding 1v1 Server .sp Files

Quote:
Should I give them a knife too
I'm indifferent. It just felt weird being forced to cycle through scopes to unscope

Author:  Amaroq [ 17 Feb 2015 11:08 ]
Post subject:  Re: Modding 1v1 Server .sp Files

I don't know what this means, but here is a suggestion:

https://forums.alliedmods.net/showpost. ... tcount=591

Page 1 of 1 All times are UTC-04:00
Powered by phpBB® Forum Software © phpBB Limited
https://www.phpbb.com/