Raised This Month: $ Target: $400
 0% 

[CSS] Plugin TEAMBETS MODIFICATION (BET CT ALL)


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
susus
Junior Member
Join Date: Apr 2012
Old 05-11-2013 , 10:02   [CSS] Plugin TEAMBETS MODIFICATION (BET CT ALL)
Reply With Quote #1

Hi! I'd like to know if it is possible to add a menu to https://forums.alliedmods.net/showthread.php?p=763549


so it is displayed automatically when you die, with three options: Bet T all / Bet CT all / No bet


I don't know if this is too complicated or not, but thank you anyway!
susus is offline
Franc1sco
Veteran Member
Join Date: Oct 2010
Location: Spain (Madrid)
Old 05-11-2013 , 10:11   Re: [CSS] Plugin TEAMBETS MODIFICATION (BET CT ALL)
Reply With Quote #2

Done, try this
Attached Files
File Type: sp Get Plugin or Get Source (bet_menu.sp - 1158 views - 1.6 KB)
__________________
Veteran Coder -> Activity channel
Coding on CS2 and taking paid and free jobs.

Contact: Steam, Telegram or discord ( franug ).

You like my work? +Rep in my steam profile comments or donate.

Franc1sco is offline
Send a message via MSN to Franc1sco
susus
Junior Member
Join Date: Apr 2012
Old 05-11-2013 , 10:53   Re: [CSS] Plugin TEAMBETS MODIFICATION (BET CT ALL)
Reply With Quote #3

Thank you so much Francisco
susus is offline
Harley
Member
Join Date: Aug 2006
Old 05-16-2013 , 05:23   Re: [CSS] Plugin TEAMBETS MODIFICATION (BET CT ALL)
Reply With Quote #4

Nice but can you make a button to make it of only for the map?
__________________
Harley is offline
muxy
Junior Member
Join Date: Apr 2020
Old 04-23-2020 , 18:28   Re: [CSS] Plugin TEAMBETS MODIFICATION (BET CT ALL)
Reply With Quote #5

Quote:
Originally Posted by Franc1sco View Post
Done, try this
I changed .sp file and added more betting options but it is not show in game.


PHP Code:
#pragma semicolon 1
#include <sourcemod>



#define PLUGIN_VERSION "1.0 by Franc1sco franug"


public Plugin:myinfo =
{
    
name "SM Bet Menu",
    
author "Franc1sco Steam: franug",
    
description "x",
    
version PLUGIN_VERSION,
    
url "www.servers-cfg.foroactivo.com"
};

public 
OnPluginStart()
{
    
CreateConVar("sm_betmenu_version"PLUGIN_VERSION"version"FCVAR_PLUGIN|FCVAR_SPONLY|FCVAR_REPLICATED|FCVAR_NOTIFY);
    
    
HookEvent("player_death"PlayerDeath);
}

public 
Action:PlayerDeath(Handle:event, const String:name[], bool:dontBroadcast)
{

    new 
client GetClientOfUserId(GetEventInt(event"userid"));
    
    
DID(client);
}

public 
Action:DID(clientId
{
    new 
Handle:menu CreateMenu(DIDMenuHandler);
    
SetMenuTitle(menu"GeoStrike.Net - Betting System);
    AddMenuItem(menu, "
option1", "Bet T all");
    AddMenuItem(menu, "
option2", "Bet CT all");
    AddMenuItem(menu, "
option3", "Bet T 1000");
    AddMenuItem(menu, "
option4", "Bet CT 1000");
    AddMenuItem(menu, "
option5", "Bet T 2000");
    AddMenuItem(menu, "
option6", "Bet CT 2000"); 
    AddMenuItem(menu, "
option7", "Bet T 3500");
    AddMenuItem(menu, "
option8", "Bet CT 3500");
    AddMenuItem(menu, "
option9", "Bet T 5000");
    AddMenuItem(menu, "
option10", "Bet CT 5000");
    AddMenuItem(menu, "
option11", "No bet");
    SetMenuExitButton(menu, true);
    DisplayMenu(menu, clientId, MENU_TIME_FOREVER);

}

public DIDMenuHandler(Handle:menu, MenuAction:action, client, itemNum) 
{
    if ( action == MenuAction_Select ) 
    {
        new String:info[32];
        
        GetMenuItem(menu, itemNum, info, sizeof(info));
        
        if ( strcmp(info,"
option1") == 0 ) 
        {
            
            
            FakeClientCommand(client, "
say bet t all");
  
            
        }
        
        else if ( strcmp(info,"
option2") == 0 ) 
        {

            FakeClientCommand(client, "
say bet ct all");
            
            
        }
        else if ( strcmp(info,"
option3") == 0 ) 
        {

            FakeClientCommand(client, "
say bet t 1000");
            
            
        }

        else if ( strcmp(info,"
option4") == 0 ) 
        {

            FakeClientCommand(client, "
say bet ct 1000");
            
            
        }
        else if ( strcmp(info,"
option5") == 0 ) 
        {

            FakeClientCommand(client, "
say bet t 2000");
            
            
        }

        else if ( strcmp(info,"
option6") == 0 ) 
        {

            FakeClientCommand(client, "
say bet ct 2000");
            
            
        }

        else if ( strcmp(info,"
option7") == 0 ) 
        {

            FakeClientCommand(client, "
say bet t 3500");
            
            
        }
 
       else if ( strcmp(info,"
option8") == 0 ) 
        {

            FakeClientCommand(client, "
say bet ct 3500");
            
            
        }

       else if ( strcmp(info,"
option9") == 0 ) 
        {

            FakeClientCommand(client, "
say bet t 5000");
            
            
        }
       

        else if ( strcmp(info,"
option10") == 0 ) 
        {

            FakeClientCommand(client, "
say bet ct 5000");
            
            
        }
    }

    else if (action == MenuAction_End)
    {
        CloseHandle(menu);
    }

i still see three options 1) bet ct all 2) bet t all 3) no bet

can you help me?
muxy is offline
Pilo
AlliedModders Donor
Join Date: Jan 2019
Location: Israel
Old 04-24-2020 , 04:08   Re: [CSS] Plugin TEAMBETS MODIFICATION (BET CT ALL)
Reply With Quote #6

Code:
SetMenuTitle(menu, "GeoStrike.Net - Betting System);
Change to :
Code:
SetMenuTitle(menu, "GeoStrike.Net - Betting System");
If you need help feel free to message me on discord : Pilo#8253
__________________

Taking Private(PAID) Plugins In PM
Feel free to Donate with PayPal
Feel free to message me in Discord Pilo#8253
Total donated : 25$
Pilo 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 21:21.


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