AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Plugin/Gameplay Ideas and Requests (https://forums.alliedmods.net/forumdisplay.php?f=60)
-   -   [CSS] Plugin TEAMBETS MODIFICATION (BET CT ALL) (https://forums.alliedmods.net/showthread.php?t=215709)

susus 05-11-2013 10:02

[CSS] Plugin TEAMBETS MODIFICATION (BET CT ALL)
 
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!

Franc1sco 05-11-2013 10:11

Re: [CSS] Plugin TEAMBETS MODIFICATION (BET CT ALL)
 
1 Attachment(s)
Done, try this

susus 05-11-2013 10:53

Re: [CSS] Plugin TEAMBETS MODIFICATION (BET CT ALL)
 
Thank you so much Francisco

Harley 05-16-2013 05:23

Re: [CSS] Plugin TEAMBETS MODIFICATION (BET CT ALL)
 
Nice but can you make a button to make it of only for the map?

muxy 04-23-2020 18:28

Re: [CSS] Plugin TEAMBETS MODIFICATION (BET CT ALL)
 
Quote:

Originally Posted by Franc1sco (Post 1949921)
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?

Pilo 04-24-2020 04:08

Re: [CSS] Plugin TEAMBETS MODIFICATION (BET CT ALL)
 
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


All times are GMT -4. The time now is 21:20.

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