Raised This Month: $ Target: $400
 0% 

[REQ] Bomb Site chooser and limiter


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
lascage
Member
Join Date: Nov 2010
Old 04-04-2011 , 08:39   [REQ] Bomb Site chooser and limiter
Reply With Quote #1

Hello !

I request a modification of a plugin if it's possible.

I have a plugin, which request at the bomber where to plant the bomb :

Code:
#include <sourcemod>
#include <sdktools>
#include <cstrike>
 
public Plugin:myinfo =
{
    name = "Bomb Site",
    author = "AoT [!] Farzad",
    description = "Displays a menu to the bomber to choose the bomb's destination.",
    version = "1.0.0.0",
    url = "http://www.aotclan.net/"
}
 
public OnPluginStart()
{
    // Hook the spawn event
    HookEvent("player_spawn", Event_Spawn);
}
 
public Event_Spawn(Handle:event,const String:name[],bool:dontBroadcast)
{
    // Get the client id from the event
    new client = GetClientOfUserId(GetEventInt(event, "userid"));

    // Check if client is ingame and a terrorist
    if (IsClientInGame(client) && GetClientTeam(client) == CS_TEAM_T)
    {
        CreateTimer(1.0, Timer_ShowMenu, GetClientUserId(client), TIMER_FLAG_NO_MAPCHANGE);
    }
}

public Action:Timer_ShowMenu(Handle:timer, any:userid)
{
    new client = GetClientOfUserId(userid);
    // Check if client is ingame and a terrorist
    if (client && IsClientInGame(client) && IsPlayerAlive(client) && GetClientTeam(client) == CS_TEAM_T)
    {
        // Check to see if the player has the bomb
        new ent = -1;
        if ((ent = GetPlayerWeaponSlot(client, CS_SLOT_C4)) != -1)
        {
            if (!IsValidEntity(ent)) {
                return Plugin_Stop;
            }

            new String:className[32];
            GetEdictClassname(ent, className, sizeof(className));
            
            // Secondary check, its not needed but better safe than sorry
            if (StrEqual(className, "weapon_c4"))
            {
                // Open the menu
                Menu_open(client);
            }
        }
    }
    return Plugin_Stop;
}

public Menu_open(client)
{
    // Create the menu and send it
    new Handle:BombMenu = CreateMenu(Menu_Selection);
    SetMenuTitle(BombMenu, "Ou planter la Bombe ?");

    AddMenuItem(BombMenu, "A", "Bombe Site A");
    AddMenuItem(BombMenu, "B", "Bombe Site B");

    DisplayMenu(BombMenu, client, 20);
}

public Menu_Selection(Handle:menu, MenuAction:action, param1, param2)
{
    if (action == MenuAction_End)
    {
        CloseHandle(menu);
    }
    
    if (action == MenuAction_Select)
    {
        new String:info[32];
        GetMenuItem(menu, param2, info, sizeof(info));

        // Send the message to all the terrorists
        for (new i = 1; i <= MaxClients; i ++)
        {
            if (IsClientInGame(i) && IsPlayerAlive(i) && GetClientTeam(i) == CS_TEAM_T)
            {
                PrintToChat(i, "\x05[Bombe Site]\x01: La Bombe doit etre plante sur le Bombe Site \x03[%s]\x01, suivez la Bombe et protegez la.", info);
            }
        }
    }
}
I want, if it's possible, when the bomber choice a bomb site, the other bomb site was disabled. The bomber have 10s to choice (advert the timer in center message) And if he don't choice a bomb site, the plugin choice a random bomb site (timer: 10s)

I want to use this only on De_dust2 map.

example :

If i choice the bomb site A at round start, the bomb site B was been disabled.

And if i don't choice a bomb site, the plugin choice a random bomb site (timer: 10s)

Thx to you & sorry for my bad english.

Last edited by lascage; 04-04-2011 at 08:44.
lascage is offline
lascage
Member
Join Date: Nov 2010
Old 04-05-2011 , 17:13   Re: [REQ] Bomb Site chooser and limiter
Reply With Quote #2

An idea ?

THX.

Always not ?

Last edited by lascage; 04-09-2011 at 06:23.
lascage is offline
lascage
Member
Join Date: Nov 2010
Old 04-09-2011 , 15:22   Re: [REQ] Bomb Site chooser and limiter
Reply With Quote #3

I have already see a bombsite limiter, but i don't know how to make the plugin that i have asked.
lascage is offline
lascage
Member
Join Date: Nov 2010
Old 04-11-2011 , 12:37   Re: [REQ] Bomb Site chooser and limiter
Reply With Quote #4

Any can help me ? plz
lascage is offline
lascage
Member
Join Date: Nov 2010
Old 04-25-2011 , 14:18   Re: [REQ] Bomb Site chooser and limiter
Reply With Quote #5

up
lascage is offline
lascage
Member
Join Date: Nov 2010
Old 04-30-2011 , 07:43   Re: [REQ] Bomb Site chooser and limiter
Reply With Quote #6

UP PLZ :'(
lascage 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 12:23.


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