Raised This Month: $51 Target: $400
 12% 

[CS:GO] Furien Bomb Plant


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
valio_skull
Senior Member
Join Date: Jan 2013
Location: at home
Old 12-07-2015 , 08:58   [CS:GO] Furien Bomb Plant
Reply With Quote #1

Hello, I need a plugin that lets the terrorist plant the bomb only in the last minute of the round.
Thanks
__________________
valio_skull is offline
lingzhidiyu
Senior Member
Join Date: Mar 2014
Old 12-08-2015 , 00:56   Re: [CS:GO] Furien Bomb Plant
Reply With Quote #2

You can change time by edit LAST_C4_TIME

PHP Code:
#define LAST_C4_TIME 60
float g_flNextC4PlantTime;

public 
void OnPluginStart() {
    
HookEvent("round_start"OnRoundStartEventHookMode_Post);
}

public 
void OnRoundStart(Event event, const char[] namebool dontBroadcast) {
    
g_flNextC4PlantTime GetGameTime() + float(GameRules_GetProp("m_iRoundTime") - LAST_C4_TIME);
}

public 
Action OnPlayerRunCmd(client, &buttons, &impulseFloat:vel[3], Float:angles[3], &weapon, &subtype, &cmdnum, &tickcount, &seedmouse[2]) {
    if (
IsPlayerAlive(client) && buttons IN_ATTACK) {
        if (
GetEntPropEnt(clientProp_Data"m_hActiveWeapon") == GetPlayerWeaponSlot(clientCS_SLOT_C4) && GetGameTime() < g_flNextC4PlantTime) {
            
buttons &= ~IN_ATTACK;
        }
    }


Last edited by lingzhidiyu; 12-08-2015 at 09:26.
lingzhidiyu is offline
valio_skull
Senior Member
Join Date: Jan 2013
Location: at home
Old 12-08-2015 , 06:35   Re: [CS:GO] Furien Bomb Plant
Reply With Quote #3

Quote:
Originally Posted by lingzhidiyu View Post
You can change time by edit LAST_C4_TIME

PHP Code:
#define LAST_C4_TIME 60
float g_flNextC4PlantTime;

public 
void OnPluginStart() {
    
HookEvent("round_start"OnRoundStartEventHookMode_Post);
}

public 
void OnRoundStart(Event event, const char[] namebool dontBroadcast) {
    
g_flNextC4PlantTime GetGameTime() + float(GameRules_GetProp("m_iRoundTime") - LAST_C4_TIME);
}

public 
Action OnPlayerRunCmd(client, &buttons, &impulseFloat:vel[3], Float:angles[3], &weapon, &subtype, &cmdnum, &tickcount, &seedmouse[2]) {
    if (
IsPlayerAlive(client) && GetClientTeam(client) == CS_TEAM_T && buttons IN_ATTACK) {
        if (
GetEntProp(clientProp_Send"m_hActiveWeapon") == GetPlayerWeaponSlot(clientCS_SLOT_C4) && GetGameTime() < g_flNextC4PlantTime) {
            
buttons &= ~IN_ATTACK;
        }
    }

Thank you very much, I will try it after I fix some things in my base plugin
__________________
valio_skull is offline
valio_skull
Senior Member
Join Date: Jan 2013
Location: at home
Old 12-08-2015 , 06:45   Re: [CS:GO] Furien Bomb Plant
Reply With Quote #4

Doesn't work
I get the bomb when I spawn, and I can to plant it at any time..
__________________
valio_skull is offline
lingzhidiyu
Senior Member
Join Date: Mar 2014
Old 12-08-2015 , 09:27   Re: [CS:GO] Furien Bomb Plant
Reply With Quote #5

Quote:
Originally Posted by valio_skull View Post
Doesn't work
I get the bomb when I spawn, and I can to plant it at any time..
fixed
lingzhidiyu is offline
valio_skull
Senior Member
Join Date: Jan 2013
Location: at home
Old 12-08-2015 , 10:09   Re: [CS:GO] Furien Bomb Plant
Reply With Quote #6

Quote:
Originally Posted by lingzhidiyu View Post
fixed
What's fixed ? You didn't give me any fix...
__________________
valio_skull is offline
Mitchell
~lick~
Join Date: Mar 2010
Old 12-08-2015 , 10:52   Re: [CS:GO] Furien Bomb Plant
Reply With Quote #7

You should make it so it doesn't block attack1 but it sets the next fire time to the 1 minute mark. As you can still plant with E.
Mitchell is offline
lingzhidiyu
Senior Member
Join Date: Mar 2014
Old 12-08-2015 , 11:14   Re: [CS:GO] Furien Bomb Plant
Reply With Quote #8

Quote:
Originally Posted by Mitchell View Post
You should make it so it doesn't block attack1 but it sets the next fire time to the 1 minute mark. As you can still plant with E.
whitch netprop? m_flNextPrimaryAttack does't work.



fixed player can press e planting bomb.
PHP Code:
#define LAST_C4_TIME 60
float g_flNextC4PlantTime;

public 
void OnPluginStart() {
    
HookEvent("round_start"OnRoundStartEventHookMode_Post);
}

public 
void OnRoundStart(Event event, const char[] namebool dontBroadcast) {
    
g_flNextC4PlantTime GetGameTime() + float(GameRules_GetProp("m_iRoundTime") - LAST_C4_TIME);
}

public 
Action OnPlayerRunCmd(client, &buttons, &impulseFloat:vel[3], Float:angles[3], &weapon, &subtype, &cmdnum, &tickcount, &seedmouse[2]) {
    if (
IsPlayerAlive(client)) {
        if (
GetEntPropEnt(clientProp_Data"m_hActiveWeapon") == GetPlayerWeaponSlot(clientCS_SLOT_C4) && GetGameTime() < g_flNextC4PlantTime) {
            if (
buttons IN_ATTACK) {
                
buttons &= ~IN_ATTACK;
            }
            if (
buttons IN_USE) {
                
buttons &= ~IN_USE;
            }
        }
    } 

Last edited by lingzhidiyu; 12-08-2015 at 11:15.
lingzhidiyu is offline
Mitchell
~lick~
Join Date: Mar 2010
Old 12-08-2015 , 11:27   Re: [CS:GO] Furien Bomb Plant
Reply With Quote #9

I used to use:
SetEntPropFloat(weapon, Prop_Send, "m_flNextPrimaryAttack", 3600.0 + gameTime);
SetEntPropFloat(weapon, Prop_Send, "m_flNextSecondaryAttack", 3600.0 + gameTime);
SetEntPropFloat(client, Prop_Send, "m_flNextAttack", 3600000.0 + gameTime);
but it was for a certain gamemode i was working on. I believe you can also force the net prop that tells the user they are in a bombsite to false.
Mitchell is offline
lingzhidiyu
Senior Member
Join Date: Mar 2014
Old 12-08-2015 , 12:11   Re: [CS:GO] Furien Bomb Plant
Reply With Quote #10

https://forums.alliedmods.net/showthread.php?t=275771
lingzhidiyu 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 23:09.


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