View Single Post
ghostofmybrain
Veteran Member
Join Date: Mar 2010
Old 02-11-2015 , 17:00   Re: [CS:GO] Multi-1v1 (v1.0.0, 2015-2-4)
Reply With Quote #587

How are people creating scout rounds? Do I add a new round type in the kniferound scripting?

Could I do something like this? (I don't know anything about scripting, so please don't laugh.)

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");
}
I mean, can I just make shit up like "ScoutHandler" and pretend that's a thing?

EDIT: Nope, apparently not. Let's try something else.
EDIT2: I was doing it right the whole time. I just forgot to close my bracket.
__________________
Boycott ESEA
My servers

Last edited by ghostofmybrain; 02-12-2015 at 17:24.
ghostofmybrain is offline