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

[Req] Deathrun Freerun ( please read )


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Snake.
Senior Member
Join Date: Jul 2017
Location: Istanbul
Old 05-16-2019 , 09:40   [Req] Deathrun Freerun ( please read )
Reply With Quote #1

I know there are so many free run plugin but none of them is not like i want.

Every round start, a menu choice will pop up to terrorists:

Freerun?

1-Yes
2-No

If yes, terrorists wont be able to open the traps
and cts wont be able to kill terrorist with weapon( only can with knife and bomb ). Also "Terrorist decided to freerun" message will be shown.

If no, nothing happen."Terrorist did not want freeround" will be show.

If terrorist does not choose, menu will close after x seconds.

Last edited by Snake.; 05-16-2019 at 09:50.
Snake. is offline
Send a message via Skype™ to Snake.
Fuck For Fun
Veteran Member
Join Date: Nov 2013
Location: ISR
Old 05-16-2019 , 11:57   Re: [Req] Deathrun Freerun ( please read )
Reply With Quote #2

PHP Code:
/* Plugin generated by AMXX-Studio */

#include < amxmodx >
#include < cstrike >
#include < hamsandwich >
#include < fakemeta_util >

#define PLUGIN "DR: FreeRun VOTE"
#define VERSION "1.0"
#define AUTHOR "CheezPuff aka Fuck For Fun"

#define Counter        FM_TEAM_CT
#define Terrorist    FM_TEAM_T

const m_toggle_state 41;
new 
bool:FreeRound;

enum _:Teams // If there are any comments of why I used FM then I will fix it to CS_
{

    
FM_TEAM_UNASSIGNED,
    
FM_TEAM_T,
    
FM_TEAM_CT,
    
FM_TEAM_SPECTATOR
};

public 
plugin_init() {
    
register_plugin(PLUGINVERSIONAUTHOR)

    
RegisterHam(Ham_Spawn"player""fwdSpawn"1);

    
RegisterHamHam_Touch"armoury_entity""FwdHamPlayerPickup" );
    
RegisterHamHam_Touch"weaponbox""FwdHamPlayerPickup" );
    
    
RegisterHamHam_Use"func_rot_button""FwdHamUse_Button" );
    
RegisterHamHam_Use"func_button",     "FwdHamUse_Button" );
    
RegisterHamHam_Use"button_target",   "FwdHamUse_Button" );
    
    
//register_event( "HLTV",      "EventNewRound",  "a",  "1=0", "2=0" );
}

/*public EventNewRound( )
{
    if( FreeRound )
    {
        FreeRound = false;
        
        return;
    }
    else if( g_bEnableFree )
    {
        FreeRound = true;
        
        set_task( 1.5, "PrintMessage" );
        
        return;
    }
}*/

public PrintMessage( )
{
    
client_printprint_chat "debug: It is a Free round, no guns!" );
}

public 
fwdSpawn client )
{
    if ( 
fm_get_user_team client ) == ( Terrorist )) // If there are any comments of why I used fm_get_user_team then I will fix it to cs_get_user
    
{
        
set_task 1.0"ChooseOption"client )
    }
}

public 
ChooseOptionclient )
{
    
/*if( fm_get_user_team( client ) != FM_TEAM_T ) // i forgot is already check in spawn
    {
        client_print( client , print_chat , "This command is only for terrorists!" );
        
        return PLUGIN_HANDLED;
    }*/
    
if( FreeRound )
    {
        
client_printclient print_chat "It is free round already!" );
        
        return 
PLUGIN_HANDLED;
    }
    
    new 
szMenu64 ];

    
formatex szMenucharsmax szMenu ), "Choose Your Option" )
    
//new szMenu = menu_create("Choose Your Option", "FreeHandler");
    
new Menu menu_createszMenu"FreeHandler" )

    
menu_additemMenu"\wFree Round"""0); 
    
menu_additemMenu"\wNormal Round"""1); 
    
    
menu_displayclientMenu )

    return 
1;    
}

public 
FreeHandlerclientMenuitem )
{
    if ( 
item == MENU_EXIT )
    {
        
menu_destroy Menu );
        return 
1;
    }

    if( 
FreeRound )
    {
        
client_printclient print_chat "It is free round already!" );
        
        return 
PLUGIN_HANDLED;
    }
    
    switch ( 
item )
    {
        case 
0:    
        {
            new 
szName32 ];
            
get_user_nameclientszNamecharsmax szName ));
        
            
set_hudmessage2103050.030.2706.05.0 );
        
            
show_hudmessage0"%s Choosed Free Round !!"szName);
        
            
client_printprint_chat "%s Started Free Round"szName );
        
            
CmdFreeclient );
        }
    
        case 
1:    
        {
            new 
szName32 ];
            
get_user_nameclientszNamecharsmax szName ));
        
            
set_hudmessage2103050.030.2706.05.0 );
        
            
show_hudmessage0"%s choosed normal round !!"szName );
        
            
client_printprint_chat "%s started normal round"szName );
            
            
CmdNormalclient );
        }
    }

    return 
PLUGIN_HANDLED;
}

public 
CmdFreeclient )
{
    
fm_strip_user_weaponsclient );
    
fm_give_itemclient"weapon_knife" );

    
FreeRound true;
}

public 
CmdNormalclient )
{
    
FreeRound false;
}

public 
FwdHamUse_ButtoniEntityclientiActivatoriUseTypeFloat:flValue 
{
    if( 
FreeRound && iUseType == && flValue == 1.0 && is_user_aliveclient )
    &&  
fm_get_user_teamclient ) == && get_pdata_intiEntitym_toggle_state) == )
    {
        
set_hudmessagerandom(255), random(255), random(255), -1.00.2502.02.00.20.2);
        
show_hudmessageclient"It is free round!^nYou can't use buttons!" );
        
        return 
HAM_SUPERCEDE;
    }
    
    return 
HAM_IGNORED;
}

public 
FwdHamPlayerPickupiEntityclient )
{
    if ( 
is_user_connectedclient ) && FreeRound )
        return 
HAM_SUPERCEDE;
    
    return 
HAM_IGNORED;
}

stock fm_get_user_teamclient )
{
    return 
get_pdata_intclient114 );
}

stock fm_set_user_team(clientteam)
{
    
set_pdata_intclient114team );
    static const 
TeamInfoTeams ][] =
    {
        
"UNASSIGNED",
        
"TERRORIST",
        
"CT",
        
"SPECTATOR"
    
};

    
message_beginMSG_ALLget_user_msgid"TeamInfo" ) ) ;
    
write_byteclient );
    
write_stringTeamInfoteam ] );
    
message_end( );

__________________
Youtube Channel:
https://youtube.com/moongr9

Last edited by Fuck For Fun; 05-17-2019 at 15:10.
Fuck For Fun is offline
Send a message via Skype™ to Fuck For Fun
iceeedr
Veteran Member
Join Date: Apr 2017
Location: Brazil
Old 05-16-2019 , 13:20   Re: [Req] Deathrun Freerun ( please read )
Reply With Quote #3

PHP Code:
set_task 1.0"ChooseOption" 


PHP Code:
set_task 1.0"ChooseOption"client
__________________
iceeedr is offline
Send a message via Skype™ to iceeedr
Snake.
Senior Member
Join Date: Jul 2017
Location: Istanbul
Old 05-16-2019 , 13:39   Re: [Req] Deathrun Freerun ( please read )
Reply With Quote #4

I test it but does not work. Menu comes but items does not work. And menu does not close after a while.

Last edited by Snake.; 05-16-2019 at 13:45.
Snake. is offline
Send a message via Skype™ to Snake.
JocAnis
Senior Member
Join Date: Jun 2010
Old 05-16-2019 , 17:56   Re: [Req] Deathrun Freerun ( please read )
Reply With Quote #5

also @Fuck For Fun where is the code to block using buttons if free round enabled?
__________________
KZ Public Autocup

Private (selling) works:

KZ Melee & 1v1 Cup plugin & MapPool (like for XJ)
PrimeKZ Plugin (MySql) - 86% (pointsystem, sv_aa and /slowmo per client, Record Bot[Leet] ect...)
Checkpoin zones for KZ (& DR)
Deathrun Timer
JocAnis is online now
Fuck For Fun
Veteran Member
Join Date: Nov 2013
Location: ISR
Old 05-17-2019 , 14:16   Re: [Req] Deathrun Freerun ( please read )
Reply With Quote #6

Quote:
Originally Posted by iceeedr View Post
PHP Code:
set_task 1.0"ChooseOption" 


PHP Code:
set_task 1.0"ChooseOption"client
Oh I did not notice, thank you very much !! fixed.
Quote:
Originally Posted by Snake. View Post
I test it but does not work. Menu comes but items does not work. And menu does not close after a while.
Check it now
Quote:
Originally Posted by JocAnis View Post
also @Fuck For Fun where is the code to block using buttons if free round enabled?
forgot, hope is work now.
__________________
Youtube Channel:
https://youtube.com/moongr9
Fuck For Fun is offline
Send a message via Skype™ to Fuck For Fun
Snake.
Senior Member
Join Date: Jul 2017
Location: Istanbul
Old 05-17-2019 , 14:51   Re: [Req] Deathrun Freerun ( please read )
Reply With Quote #7

Quote:
Originally Posted by Fuck For Fun View Post
Oh I did not notice, thank you very much !! fixed.

Check it now

forgot, hope is work now.
Terrorists are still being shot by ct with weapons.Also, first round the vote came, but other rounds did not come and became full freerun.
Snake. is offline
Send a message via Skype™ to Snake.
Snake.
Senior Member
Join Date: Jul 2017
Location: Istanbul
Old Today , 01:57   Re: [Req] Deathrun Freerun ( please read )
Reply With Quote #8

Can someone edit this?

♡ I want both teams to pickup weapon.
♡ The choice menu comes first round. After that if free round is choosen, menu does not come again and all after rounds being free. I want menu to come every round.
♡If terrorist does not make choice in 10 secs, round will be free.( can you show the secs in menu ?)
♡In free round, both teams wont be able to damage each other with weapons.(They will only with knife and hegrenade
)
♡In normal round, both teams will be able to damage with every weapons.

Thank you all in advance.
PHP Code:
/* Plugin generated by AMXX-Studio */

#include < amxmodx >
#include < cstrike >
#include < hamsandwich >
#include < fakemeta_util >

#define PLUGIN "DR: FreeRun VOTE"
#define VERSION "1.0"
#define AUTHOR "CheezPuff aka Fuck For Fun"

#define Counter        FM_TEAM_CT
#define Terrorist    FM_TEAM_T

const m_toggle_state 41;
new 
bool:FreeRound;

enum _:Teams // If there are any comments of why I used FM then I will fix it to CS_
{

    
FM_TEAM_UNASSIGNED,
    
FM_TEAM_T,
    
FM_TEAM_CT,
    
FM_TEAM_SPECTATOR
};

public 
plugin_init() {
    
register_plugin(PLUGINVERSIONAUTHOR)

    
RegisterHam(Ham_Spawn"player""fwdSpawn"1);

    
RegisterHamHam_Touch"armoury_entity""FwdHamPlayerPickup" );
    
RegisterHamHam_Touch"weaponbox""FwdHamPlayerPickup" );
    
    
RegisterHamHam_Use"func_rot_button""FwdHamUse_Button" );
    
RegisterHamHam_Use"func_button",     "FwdHamUse_Button" );
    
RegisterHamHam_Use"button_target",   "FwdHamUse_Button" );
    
    
//register_event( "HLTV",      "EventNewRound",  "a",  "1=0", "2=0" );
}

/*public EventNewRound( )
{
    if( FreeRound )
    {
        FreeRound = false;
        
        return;
    }
    else if( g_bEnableFree )
    {
        FreeRound = true;
        
        set_task( 1.5, "PrintMessage" );
        
        return;
    }
}*/

public PrintMessage( )
{
    
client_printprint_chat "debug: It is a Free round, no guns!" );
}

public 
fwdSpawn client )
{
    if ( 
fm_get_user_team client ) == ( Terrorist )) // If there are any comments of why I used fm_get_user_team then I will fix it to cs_get_user
    
{
        
set_task 1.0"ChooseOption"client )
    }
}

public 
ChooseOptionclient )
{
    
/*if( fm_get_user_team( client ) != FM_TEAM_T ) // i forgot is already check in spawn
    {
        client_print( client , print_chat , "This command is only for terrorists!" );
        
        return PLUGIN_HANDLED;
    }*/
    
if( FreeRound )
    {
        
client_printclient print_chat "It is free round already!" );
        
        return 
PLUGIN_HANDLED;
    }
    
    new 
szMenu64 ];

    
formatex szMenucharsmax szMenu ), "Choose Your Option" )
    
//new szMenu = menu_create("Choose Your Option", "FreeHandler");
    
new Menu menu_createszMenu"FreeHandler" )

    
menu_additemMenu"\wFree Round"""0); 
    
menu_additemMenu"\wNormal Round"""1); 
    
    
menu_displayclientMenu )

    return 
1;    
}

public 
FreeHandlerclientMenuitem )
{
    if ( 
item == MENU_EXIT )
    {
        
menu_destroy Menu );
        return 
1;
    }

    if( 
FreeRound )
    {
        
client_printclient print_chat "It is free round already!" );
        
        return 
PLUGIN_HANDLED;
    }
    
    switch ( 
item )
    {
        case 
0:    
        {
            new 
szName32 ];
            
get_user_nameclientszNamecharsmax szName ));
        
            
set_hudmessage2103050.030.2706.05.0 );
        
            
show_hudmessage0"%s Choosed Free Round !!"szName);
        
            
client_printprint_chat "%s Started Free Round"szName );
        
            
CmdFreeclient );
        }
    
        case 
1:    
        {
            new 
szName32 ];
            
get_user_nameclientszNamecharsmax szName ));
        
            
set_hudmessage2103050.030.2706.05.0 );
        
            
show_hudmessage0"%s choosed normal round !!"szName );
        
            
client_printprint_chat "%s started normal round"szName );
            
            
CmdNormalclient );
        }
    }

    return 
PLUGIN_HANDLED;
}

public 
CmdFreeclient )
{
    
fm_strip_user_weaponsclient );
    
fm_give_itemclient"weapon_knife" );

    
FreeRound true;
}

public 
CmdNormalclient )
{
    
FreeRound false;
}

public 
FwdHamUse_ButtoniEntityclientiActivatoriUseTypeFloat:flValue 
{
    if( 
FreeRound && iUseType == && flValue == 1.0 && is_user_aliveclient )
    &&  
fm_get_user_teamclient ) == && get_pdata_intiEntitym_toggle_state) == )
    {
        
set_hudmessagerandom(255), random(255), random(255), -1.00.2502.02.00.20.2);
        
show_hudmessageclient"It is free round!^nYou can't use buttons!" );
        
        return 
HAM_SUPERCEDE;
    }
    
    return 
HAM_IGNORED;
}

public 
FwdHamPlayerPickupiEntityclient )
{
    if ( 
is_user_connectedclient ) && FreeRound )
        return 
HAM_SUPERCEDE;
    
    return 
HAM_IGNORED;
}

stock fm_get_user_teamclient )
{
    return 
get_pdata_intclient114 );
}

stock fm_set_user_team(clientteam)
{
    
set_pdata_intclient114team );
    static const 
TeamInfoTeams ][] =
    {
        
"UNASSIGNED",
        
"TERRORIST",
        
"CT",
        
"SPECTATOR"
    
};

    
message_beginMSG_ALLget_user_msgid"TeamInfo" ) ) ;
    
write_byteclient );
    
write_stringTeamInfoteam ] );
    
message_end( );

Snake. is offline
Send a message via Skype™ to Snake.
Reply


Thread Tools
Display Modes

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:41.


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