AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Plugins (https://forums.alliedmods.net/forumdisplay.php?f=108)
-   -   [Source 2009, CS:GO] Stamm 2.28 - VIP Level Ranking (https://forums.alliedmods.net/showthread.php?t=142073)

enderandrew 07-04-2020 16:08

Re: [Source 2009, CS:GO] Stamm 2.28 - VIP Level Ranking
 
Code:

L 07/04/2020 - 14:52:36: [stamm\stamm.smx] [ STAMM ] [stamm_chatcolors] Couldn't find block 'l1'
L 07/04/2020 - 14:52:36: [stamm\stamm.smx] [ STAMM ] [stamm_chatcolors] Couldn't find block 'l1'
L 07/04/2020 - 14:52:36: [stamm\stamm.smx] [ STAMM ] [stamm_chatcolors] Couldn't find block 'l2'
L 07/04/2020 - 14:52:36: [stamm\stamm.smx] [ STAMM ] [stamm_chatcolors] Couldn't find block 'l2'
L 07/04/2020 - 14:52:36: [stamm\stamm.smx] [ STAMM ] [stamm_chatcolors] Couldn't find block 'l3'
L 07/04/2020 - 14:52:36: [stamm\stamm.smx] [ STAMM ] [stamm_chatcolors] Couldn't find block 'l3'
L 07/04/2020 - 14:52:36: [stamm\stamm.smx] [ STAMM ] [stamm_chatcolors] Couldn't find block 'l4'
L 07/04/2020 - 14:52:36: [stamm\stamm.smx] [ STAMM ] [stamm_chatcolors] Couldn't find block 'l4'
L 07/04/2020 - 14:52:36: [stamm\stamm.smx] [ STAMM ] [stamm_chatcolors] Couldn't find block 'l5'

Chatcolors:

Code:

// Here you can define the available colors and tags.
//
// Colors are defined by a color name, a hex string representing the color and a block on that a VIP get that color.
// Blocks have to be defined in the stamm_chatcolors.txt.
// You can generate colors here: http://hexcolorgenerator.com/
//
// The second part are the tags.
// They are defined by a tag name and a block on that a VIP get that tag.
//
"chatcolors"
{
        "colors"
        {
                // This is the name of the color
                "blue"
                {
                        // This is the hex string of the color
                        "color"    "99CCFF"
                       
                        // This is the name of the block on that a VIP get the color
                        "block"    "l1"
                }
               
                "beige"
                {
                        "color"    "F5F5DC"
                        "block"    "l1"
                }
               
                "green"
                {
                        "color"    "3EFF3E"
                        "block"    "l2"
                }
                "lime"
                {
                        "color"    "00FF00"
                        "block"    "l2"
                }
               
                "orange"
                {
                        "color"    "FFA500"
                        "block"    "l3"
                }
               
                "pink"
                {
                        "color"    "FFC0CB"
                        "block"    "l3"
                }
               
                "silver"
                {
                        "color"    "C0C0C0"
                        "block"    "l4"
                }
               
                "yellow"
                {
                        "color"    "FFFF00"
                        "block"    "l4"
                }
               
                "white"
                {
                        "color"    "FFFFFF"
                        "block"    "l5"
                }
        }
       
        "tags"
        {
                "Iron"                        "11"
                "Bronze"                "11"
                "Silver"                "12"
                "Gold"                        "12"
                "VIP"                        "13"
                "Platinum"                "13"
                "Diamond"                "14"
                "Master"                "14"
                "Grand Master"        "15"
                "John Wick"                "15"               
        }
}

stamm_chatcolors.txt:

Code:

// Here you can add the blocks for the chatcolor configuration
// You need them in the cfg/stamm/features/chatcolors.txt file.

"LevelSettings"
{
        // Block for e.g colors blue, beige and tag Player
        "11"        "Iron"
        "11"        "Bronze"
        "12"        "Silver"
        "12"        "Gold"
        "13"        "VIP"       
        "13"        "Platinum"
        "14"        "Diamond"
        "14"        "Master"
        "15"        "Grand Master"
        "15"        "John Wick"       
}

I'm not sure what I'm doing wrong because the blocks appear to be there. Can someone post a sample of their working config files perhaps?

Thanks!

bongotrommler 07-08-2020 07:55

Re: [Source 2009, CS:GO] Stamm 2.28 - VIP Level Ranking
 
could you try this:

Code:

// Here you can define the available colors and tags.
//
// Colors are defined by a color name, a hex string representing the color and a block on that a VIP get that color.
// Blocks have to be defined in the stamm_chatcolors.txt.
// You can generate colors here: http://hexcolorgenerator.com/
//
// The second part are the tags.
// They are defined by a tag name and a block on that a VIP get that tag.
//
"chatcolors"
{
        "colors"
        {
                // This is the name of the color
                "blue"
                {
                        // This is the hex string of the color
                        "color"    "99CCFF"
                       
                        // This is the name of the block on that a VIP get the color
                        "block"    "11"
                }
               
                "beige"
                {
                        "color"    "F5F5DC"
                        "block"    "11"
                }
               
                "green"
                {
                        "color"    "3EFF3E"
                        "block"    "12"
                }
                "lime"
                {
                        "color"    "00FF00"
                        "block"    "12"
                }
               
                "orange"
                {
                        "color"    "FFA500"
                        "block"    "13"
                }
               
                "pink"
                {
                        "color"    "FFC0CB"
                        "block"    "14"
                }
               
                "silver"
                {
                        "color"    "C0C0C0"
                        "block"    "14"
                }
               
                "yellow"
                {
                        "color"    "FFFF00"
                        "block"    "14"
                }
               
                "white"
                {
                        "color"    "FFFFFF"
                        "block"    "15"
                }
        }
       
        "tags"
        {
                "Iron"                        "11"
                "Bronze"                "11"
                "Silver"                "12"
                "Gold"                        "12"
                "VIP"                        "13"
                "Platinum"                "13"
                "Diamond"                "14"
                "Master"                "14"
                "Grand Master"        "15"
                "John Wick"                "15"               
        }
}


enderandrew 07-09-2020 12:17

Re: [Source 2009, CS:GO] Stamm 2.28 - VIP Level Ranking
 
That works! Thanks!

enderandrew 07-10-2020 22:18

Re: [Source 2009, CS:GO] Stamm 2.28 - VIP Level Ranking
 
1 Attachment(s)
Here is my attempt at taking the most recent GitHub version I found and updating all of it to the latest syntax.

All of it compiles with:

#pragma semicolon 1
#pragma newdecls required

I'm running a TF2 server with all of the features/plugins enabled that work on TF2 but I haven't tested this in a CS:GO server for example.

BlackPanda 09-23-2020 02:30

Re: [Source 2009, CS:GO] Stamm 2.28 - VIP Level Ranking
 
Hi,

I would like to change a line and recompile, but I always get an error message that he cannot read from the stamm-core.inc. I used this page https://spider.limetech.io/ and also uploaded all the necessary files. Who can help me?

Code:

/**
 * -----------------------------------------------------
 * File        stamm_spawnhp.sp
 * Authors    David <popoklopsi> Ordnung
 * License    GPLv3
 * Web        http://popoklopsi.de
 * -----------------------------------------------------
 *
 * Copyright (C) 2012-2014 David <popoklopsi> Ordnung
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program. If not, see <http://www.gnu.org/licenses/>
 */




// Includes
#include <sourcemod>
#include <autoexecconfig>

#undef REQUIRE_PLUGIN
#include <stamm>
#include <updater>

#pragma semicolon 1




new Handle:g_hHP;




// Plugin Info
public Plugin:myinfo =
{
        name = "Stamm Feature SpawnHP",
        author = "Popoklopsi",
        version = "1.4.1",
        description = "Give VIP's more HP on spawn",
        url = "https://forums.alliedmods.net/showthread.php?t=142073"
};




// Add Feature
public OnAllPluginsLoaded()
{
        if (!STAMM_IsAvailable())
        {
                SetFailState("Can't Load Feature, Stamm is not installed!");
        }

        STAMM_LoadTranslation();
        STAMM_RegisterFeature("VIP SpawnHP");
}




// Add to udater and add descriptions
public STAMM_OnFeatureLoaded(const String:basename[])
{
        decl String:urlString[256];


        Format(urlString, sizeof(urlString), "http://popoklopsi.de/stamm/updater/update.php?plugin=%s", basename);

        if (LibraryExists("updater") && STAMM_AutoUpdate())
        {
                Updater_AddPlugin(urlString);
                Updater_ForceUpdate();
        }
}



// Add descriptions
public STAMM_OnClientRequestFeatureInfo(client, block, &Handle:array)
{
        decl String:fmt[256];
       
        Format(fmt, sizeof(fmt), "%T", "GetSpawnHP", client, GetConVarInt(g_hHP) * block);
       
        PushArrayString(array, fmt);
}



// Create the config
public OnPluginStart()
{
        HookEvent("player_spawn", PlayerSpawn);


        AutoExecConfig_SetFile("spawnhp", "stamm/features");
        AutoExecConfig_SetCreateFile(true);

        g_hHP = AutoExecConfig_CreateConVar("spawnhp_hp", "50", "HP a VIP gets every spawn more per block");
       
        AutoExecConfig_CleanFile();
        AutoExecConfig_ExecuteFile();
}





// Change player health
public PlayerSpawn(Handle:event, String:name[], bool:dontBroadcast)
{
        new client = GetClientOfUserId(GetEventInt(event, "userid"));
       
        if (STAMM_IsClientValid(client))
        {
                // Timer to add points
                if (IsPlayerAlive(client) && (GetClientTeam(client) == 2 || GetClientTeam(client) == 3))
                {
                        CreateTimer(0.5, changeHealth, GetClientUserId(client));
                }
        }
}




// Change here the health
public Action:changeHealth(Handle:timer, any:userid)
{
        // Get highest client block
        new client = GetClientOfUserId(userid);

        if (!STAMM_IsClientValid(client))
        {
                return Plugin_Stop;
        }

        new clientBlock = STAMM_GetClientBlock(client);


        // Have client block
        if (clientBlock > 0)
        {
                // Set new HP
                new newHP = GetClientHealth(client) + GetConVarInt(g_hHP) * clientBlock;
               
                // also increate max HP
                SetEntProp(client, Prop_Data, "m_iMaxHealth", newHP);
                SetEntityHealth(client, newHP);
        }

        return Plugin_Stop;
}

to
Code:

CreateTimer(4.5, changeHealth, GetClientUserId(client));

I want to change the spawnhp because of spawnkill (deathmatch) (spawnprotection)

THX

helixpara 09-24-2020 10:50

Re: [Source 2009, CS:GO] Stamm 2.28 - VIP Level Ranking
 
Somehow it doesn't use MYSQL, but still SQL?

Where can I change this? The database.cfg is correct and I use the correct database prefix (STAMM_DB)

Stropy 09-25-2020 12:24

Re: [Source 2009, CS:GO] Stamm 2.28 - VIP Level Ranking
 
Quote:

Originally Posted by helixpara (Post 2718615)
Somehow it doesn't use MYSQL, but still SQL?

Where can I change this? The database.cfg is correct and I use the correct database prefix (STAMM_DB)

From Stamm wiki:
Code:

If you use MySQL than create a stamm_sql entry in the addons/sourcemod/config/database.cfg file
See: https://github.com/dordnung/Stamm/wiki/Install-stamm

Renegated 11-17-2020 06:20

Re: [Source 2009, CS:GO] Stamm 2.28 - VIP Level Ranking
 
Hi, I just downloaded the mod and when executing it on CS:S, i'm getting this errors:

Code:

L 11/17/2020 - 12:13:23: [SM] Call stack trace:
L 11/17/2020 - 12:13:23: [SM]  [0] ThrowNativeError
L 11/17/2020 - 12:13:23: [SM]  [1] Line 1187, stamm/nativelib.sp::nativelib_HaveClientFeature
L 11/17/2020 - 12:13:23: [SM]  [3] STAMM_HaveClientFeature
L 11/17/2020 - 12:13:23: [SM]  [4] Line 132, C:\Users\David\Documents\Github\Stamm\stamm_regenerate.sp::GiveHealth
L 11/17/2020 - 12:13:23: [SM] Exception reported: Block 1 is invalid! Feature only have 0 Blocks
L 11/17/2020 - 12:13:23: [SM] Blaming: stamm.smx
L 11/17/2020 - 12:13:23: [SM] Call stack trace:
L 11/17/2020 - 12:13:23: [SM]  [0] ThrowNativeError
L 11/17/2020 - 12:13:23: [SM]  [1] Line 1187, stamm/nativelib.sp::nativelib_HaveClientFeature
L 11/17/2020 - 12:13:23: [SM]  [3] STAMM_HaveClientFeature
L 11/17/2020 - 12:13:23: [SM]  [4] Line 102, C:\Users\David\Documents\Github\Stamm\stamm_fastladder.sp::OnPlayerRunCmd
L 11/17/2020 - 12:13:23: [SM] Exception reported: Block 1 is invalid! Feature only have 0 Blocks
L 11/17/2020 - 12:13:23: [SM] Blaming: stamm.smx
L 11/17/2020 - 12:13:23: [SM] Call stack trace:
L 11/17/2020 - 12:13:23: [SM]  [0] ThrowNativeError
L 11/17/2020 - 12:13:23: [SM]  [1] Line 1187, stamm/nativelib.sp::nativelib_HaveClientFeature
L 11/17/2020 - 12:13:23: [SM]  [3] STAMM_HaveClientFeature
L 11/17/2020 - 12:13:23: [SM]  [4] Line 135, C:\Users\David\Documents\Github\Stamm\stamm_froggyjump.sp::OnPlayerRunCmd
L 11/17/2020 - 12:13:23: [SM] Exception reported: Block 1 is invalid! Feature only have 0 Blocks
L 11/17/2020 - 12:13:23: [SM] Blaming: stamm.smx



Someone knows how to fix it?

Focus Nation 11-17-2020 07:11

Re: [Source 2009, CS:GO] Stamm 2.28 - VIP Level Ranking
 
Is there a way to add players to a admin group from leveling up from stamm instead of flag? (vip)
So I could add a player to vip when they get 1000 points? currently I'm only seeing a way to make them a spesific flag.

Focus Nation 11-17-2020 17:20

Re: [Source 2009, CS:GO] Stamm 2.28 - VIP Level Ranking
 
Or is it maybe possible for a command to go off when a player levels up? if so could someone help me?


All times are GMT -4. The time now is 12:23.

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