Raised This Month: $32 Target: $400
 8% 

[REQ] Simple jailbreak fun mod.


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Hermelean
New Member
Join Date: Mar 2020
Old 03-30-2020 , 04:13   [REQ] Simple jailbreak fun mod.
Reply With Quote #1

Hey guys, I think it wouldn´t be hard to do this myself, but I would definitely screw this up.

It is basically One in the Chamber in CoD:BO2

0. 20s countdown to hide
1. T receive one of these (M4, AK, usp, glock) with only one ammo.
2. That one ammo must kill an enemy.
3. if T kills another T, they receive +1 ammo. (T cannot harm CT).

Thanks in advance.

Last edited by Hermelean; 03-30-2020 at 04:15.
Hermelean is offline
Xalus
Veteran Member
Join Date: Dec 2009
Location: Belgium
Old 03-30-2020 , 12:24   Re: [REQ] Simple jailbreak fun mod.
Reply With Quote #2

By reading your post I see you have knowledge about programming,
so here is the code I used for my Funday API system: One in the Chamber

I bet you have to knowledge to use and edit the code to get it working the way you want,

PHP Code:
#include <amxmodx>
#include <fakemeta>
#include <cstrike>
#include <fun>
#include <fakemeta>
#include <hamsandwich>
#include <colorchat>

#include <jb-main>

const XO_CBASEPLAYERITEM 4
const m_pPlayer 41

// Funday defaults
#define FUNDAY_Name "One In The Chamber"
#define FUNDAY_Type TYPE_FFA
#define FUNDAY_Maxplays 2
#define FUNDAY_Startdelay 10
#define FUNDAY_Maxtime 240
#define FUNDAY_Flags (bit(FLAG_FFA) | bit(FLAG_COMBINATETEAMS) | bit(FLAG_FAKECT) | bit(FLAG_WEAPONRESTRICT) | bit(FLAG_STRIPWEAPON) | bit(FLAG_GOD) | bit(FLAG_ANTICAMP) | bit(FLAG_WALLHACK))
#define FUNDAY_Descshort "One person, one deagle with only one bullet"
#define FUNDAY_Description "Everyone got one deagle,^n   with only one bullet.^n   For each kill, you get an extra bullet^n   Who will survive, who will still be standing?"

new FUNDAY_RESTRICTED_WEAPONS[] =
{
    
/* T-Team */ (bit(CSW_DEAGLE)),
    
/* CT-TEAM */(bit(CSW_DEAGLE))
}

// Gameplay
new g_intFundaybool:g_boolFundaybool:g_blockdrop_bool
new g_listClientdeagle[33]

public 
plugin_init()
{
    
register_plugin("JB Funday: Chamber""Xalus""1.1")

    
// Register: Funday
    
g_intFunday jb_funday(FUNDAY_NameFUNDAY_TypeFUNDAY_MaxplaysFUNDAY_StartdelayFUNDAY_MaxtimeFUNDAY_FlagsFUNDAY_DescshortFUNDAY_Description)
        
// Change specific activeflag for FLAG_
    
jb_funday_flagactive(g_intFundayFLAG_GODFLAGACTIVE_PRESTART)
        
// Set a restriction of weapons for certain teams
    
jb_funday_weaponrestrict(g_intFundayFUNDAY_RESTRICTED_WEAPONS)

    
// Register: Ham
    
RegisterHam(Ham_Killed"player""Ham_PlayerKilled_Post"1)
    
RegisterHam(Ham_TakeDamage"player""Ham_PlayerTakeDamage"0)
    
RegisterHam(Ham_Item_Deploy"weapon_deagle""HookDeagle_postDeploy"1)
    
RegisterHam(Ham_CS_Item_CanDrop"weapon_deagle""HookDeagle_preDrop")

    
// Pause the plugin until funday starts.
    
pause("a")
}

public 
jb_funday_start(clientfunday)
{
    if(
g_intFunday == funday)
    {
        
g_boolFunday true

        
new listPlayers[32], intPlayers
        get_players
(listPlayersintPlayers"a")

        for(new 
0intPlayersi++)
        {
            if(
user_has_weapon(listPlayers[i], CSW_DEAGLE))
            {
                
strip_user_weapons(listPlayers[i])
                
give_item(listPlayers[i], "weapon_knife")
            }

            
g_listClientdeagle[listPlayers[i]] = give_item(listPlayers[i], "weapon_deagle")
            if(
pev_valid(g_listClientdeagle[listPlayers[i]]))
            {
                
cs_set_weapon_ammo(g_listClientdeagle[listPlayers[i]], 1)
            }
        }
    }
}

public 
jb_funday_prestart(clientfundaycountdown)
{
    if(
g_intFunday == funday)
    {
        
g_blockdrop_bool true
    
}
}

public 
jb_funday_stop(roundendtypefundayclient)
{
    
g_boolFunday false
    g_blockdrop_bool 
false

    
if(g_intFunday == funday)
    {
        if((
roundendtype == ROUNDEND_Twin || roundendtype == ROUNDEND_CTwin)
        && 
client 0)
        {
            new 
stringName[32]
            
get_user_name(clientstringNamecharsmax(stringName))

            
ColorChat(0, (roundendtype == ROUNDEND_Twin) ? RED BLUE"^4[Funday]^1 Survivor^3 %s^1 proved to be the best with a deagle and knife!"stringName)
        }
    }
}

// Ham: Player take damage
//    - When player is hit by deagle, set damage to 100.0 (Instant kill)
public Ham_PlayerTakeDamage(victimidinflictorattackerFloat:damagedamagebits)
{
    if(
g_boolFunday
    
&& is_user_connected(attacker)
    
//&& damagebits & DMG_BULLET
    
&& get_user_weapon(attacker) == CSW_DEAGLE)
    {
        
// Deagle is deadly
        
SetHamParamFloat(4200.0)
    }
}

// Ham: Killed
//    - Give the killer a bullet!
public Ham_PlayerKilled_Post(clientkillergib)
{
    if(
g_boolFunday
    
&& is_user_alive(killer))
    {
        new 
entityWeaponintClip 0
        
// See if the killer still got his deagle
        
if(pev_valid(g_listClientdeagle[killer])
        && 
user_has_weapon(killerCSW_DEAGLE))
        {
            new 
stringClassname[32]
            
pev(g_listClientdeagle[killer], pev_classnamestringClassnamecharsmax(stringClassname))

            if(
equal(stringClassname"weapon_deagle"))
            {
                
entityWeapon g_listClientdeagle[killer]

                if(
pev_valid(entityWeapon))
                {
                    
intClip cs_get_weapon_ammo(entityWeapon)
                }
            }
        }
        
// Client doesn't have his deagle anymore
        
if(!entityWeapon)
        {
            
entityWeapon give_item(killer"weapon_deagle")
            
g_listClientdeagle[killer] = entityWeapon
            intClip 
0
        
}

        if(
pev_valid(entityWeapon))
        {
            
client_print(killerprint_center"You've been rewarded with an extra bullet!")
            
cs_set_weapon_ammo(entityWeapon, (intClip 1))

            
user_has_weapon(killerCSW_DEAGLE1)
        }
    }
}

public 
HookDeagle_postDeploy(entity)
{
    if(
g_boolFunday)
    {
        static 
client
        client 
get_pdata_cbase(entitym_pPlayerXO_CBASEPLAYERITEM)

        if(
is_user_alive(client))
        {
            
g_listClientdeagle[client] = entity

            
//client_print(0, print_chat, "Pickedup a deagle with %i clip", cs_get_weapon_ammo(entity))

            // If the number of the deagle is higher then 1, reset it back to 1.
            
if(cs_get_weapon_ammo(entity) > 1)
            {
                
cs_set_weapon_ammo(entity1)
            }
            
cs_set_user_bpammo(clientCSW_DEAGLE0)
        }
    }
}

public 
HookDeagle_preDrop(entity)
{
    if(
g_blockdrop_bool)
    {
        
SetHamReturnInteger(0)
        return 
HAM_SUPERCEDE
    
}
    return 
HAM_IGNORED

__________________
Retired.
Xalus is offline
Fuck For Fun
Veteran Member
Join Date: Nov 2013
Old 03-31-2020 , 08:50   Re: [REQ] Simple jailbreak fun mod.
Reply With Quote #3

Quote:
Originally Posted by Xalus View Post
By reading your post I see you have knowledge about programming,
so here is the code I used for my Funday API system: One in the Chamber

I bet you have to knowledge to use and edit the code to get it working the way you want,

PHP Code:
#include <amxmodx>
#include <fakemeta>
#include <cstrike>
#include <fun>
#include <fakemeta>
#include <hamsandwich>
#include <colorchat>

#include <jb-main>

const XO_CBASEPLAYERITEM 4
const m_pPlayer 41

// Funday defaults
#define FUNDAY_Name "One In The Chamber"
#define FUNDAY_Type TYPE_FFA
#define FUNDAY_Maxplays 2
#define FUNDAY_Startdelay 10
#define FUNDAY_Maxtime 240
#define FUNDAY_Flags (bit(FLAG_FFA) | bit(FLAG_COMBINATETEAMS) | bit(FLAG_FAKECT) | bit(FLAG_WEAPONRESTRICT) | bit(FLAG_STRIPWEAPON) | bit(FLAG_GOD) | bit(FLAG_ANTICAMP) | bit(FLAG_WALLHACK))
#define FUNDAY_Descshort "One person, one deagle with only one bullet"
#define FUNDAY_Description "Everyone got one deagle,^n   with only one bullet.^n   For each kill, you get an extra bullet^n   Who will survive, who will still be standing?"

new FUNDAY_RESTRICTED_WEAPONS[] =
{
    
/* T-Team */ (bit(CSW_DEAGLE)),
    
/* CT-TEAM */(bit(CSW_DEAGLE))
}

// Gameplay
new g_intFundaybool:g_boolFundaybool:g_blockdrop_bool
new g_listClientdeagle[33]

public 
plugin_init()
{
    
register_plugin("JB Funday: Chamber""Xalus""1.1")

    
// Register: Funday
    
g_intFunday jb_funday(FUNDAY_NameFUNDAY_TypeFUNDAY_MaxplaysFUNDAY_StartdelayFUNDAY_MaxtimeFUNDAY_FlagsFUNDAY_DescshortFUNDAY_Description)
        
// Change specific activeflag for FLAG_
    
jb_funday_flagactive(g_intFundayFLAG_GODFLAGACTIVE_PRESTART)
        
// Set a restriction of weapons for certain teams
    
jb_funday_weaponrestrict(g_intFundayFUNDAY_RESTRICTED_WEAPONS)

    
// Register: Ham
    
RegisterHam(Ham_Killed"player""Ham_PlayerKilled_Post"1)
    
RegisterHam(Ham_TakeDamage"player""Ham_PlayerTakeDamage"0)
    
RegisterHam(Ham_Item_Deploy"weapon_deagle""HookDeagle_postDeploy"1)
    
RegisterHam(Ham_CS_Item_CanDrop"weapon_deagle""HookDeagle_preDrop")

    
// Pause the plugin until funday starts.
    
pause("a")
}

public 
jb_funday_start(clientfunday)
{
    if(
g_intFunday == funday)
    {
        
g_boolFunday true

        
new listPlayers[32], intPlayers
        get_players
(listPlayersintPlayers"a")

        for(new 
0intPlayersi++)
        {
            if(
user_has_weapon(listPlayers[i], CSW_DEAGLE))
            {
                
strip_user_weapons(listPlayers[i])
                
give_item(listPlayers[i], "weapon_knife")
            }

            
g_listClientdeagle[listPlayers[i]] = give_item(listPlayers[i], "weapon_deagle")
            if(
pev_valid(g_listClientdeagle[listPlayers[i]]))
            {
                
cs_set_weapon_ammo(g_listClientdeagle[listPlayers[i]], 1)
            }
        }
    }
}

public 
jb_funday_prestart(clientfundaycountdown)
{
    if(
g_intFunday == funday)
    {
        
g_blockdrop_bool true
    
}
}

public 
jb_funday_stop(roundendtypefundayclient)
{
    
g_boolFunday false
    g_blockdrop_bool 
false

    
if(g_intFunday == funday)
    {
        if((
roundendtype == ROUNDEND_Twin || roundendtype == ROUNDEND_CTwin)
        && 
client 0)
        {
            new 
stringName[32]
            
get_user_name(clientstringNamecharsmax(stringName))

            
ColorChat(0, (roundendtype == ROUNDEND_Twin) ? RED BLUE"^4[Funday]^1 Survivor^3 %s^1 proved to be the best with a deagle and knife!"stringName)
        }
    }
}

// Ham: Player take damage
//    - When player is hit by deagle, set damage to 100.0 (Instant kill)
public Ham_PlayerTakeDamage(victimidinflictorattackerFloat:damagedamagebits)
{
    if(
g_boolFunday
    
&& is_user_connected(attacker)
    
//&& damagebits & DMG_BULLET
    
&& get_user_weapon(attacker) == CSW_DEAGLE)
    {
        
// Deagle is deadly
        
SetHamParamFloat(4200.0)
    }
}

// Ham: Killed
//    - Give the killer a bullet!
public Ham_PlayerKilled_Post(clientkillergib)
{
    if(
g_boolFunday
    
&& is_user_alive(killer))
    {
        new 
entityWeaponintClip 0
        
// See if the killer still got his deagle
        
if(pev_valid(g_listClientdeagle[killer])
        && 
user_has_weapon(killerCSW_DEAGLE))
        {
            new 
stringClassname[32]
            
pev(g_listClientdeagle[killer], pev_classnamestringClassnamecharsmax(stringClassname))

            if(
equal(stringClassname"weapon_deagle"))
            {
                
entityWeapon g_listClientdeagle[killer]

                if(
pev_valid(entityWeapon))
                {
                    
intClip cs_get_weapon_ammo(entityWeapon)
                }
            }
        }
        
// Client doesn't have his deagle anymore
        
if(!entityWeapon)
        {
            
entityWeapon give_item(killer"weapon_deagle")
            
g_listClientdeagle[killer] = entityWeapon
            intClip 
0
        
}

        if(
pev_valid(entityWeapon))
        {
            
client_print(killerprint_center"You've been rewarded with an extra bullet!")
            
cs_set_weapon_ammo(entityWeapon, (intClip 1))

            
user_has_weapon(killerCSW_DEAGLE1)
        }
    }
}

public 
HookDeagle_postDeploy(entity)
{
    if(
g_boolFunday)
    {
        static 
client
        client 
get_pdata_cbase(entitym_pPlayerXO_CBASEPLAYERITEM)

        if(
is_user_alive(client))
        {
            
g_listClientdeagle[client] = entity

            
//client_print(0, print_chat, "Pickedup a deagle with %i clip", cs_get_weapon_ammo(entity))

            // If the number of the deagle is higher then 1, reset it back to 1.
            
if(cs_get_weapon_ammo(entity) > 1)
            {
                
cs_set_weapon_ammo(entity1)
            }
            
cs_set_user_bpammo(clientCSW_DEAGLE0)
        }
    }
}

public 
HookDeagle_preDrop(entity)
{
    if(
g_blockdrop_bool)
    {
        
SetHamReturnInteger(0)
        return 
HAM_SUPERCEDE
    
}
    return 
HAM_IGNORED

Code:
#include <jb-main>
Fuck For Fun is offline
Send a message via Skype™ to Fuck For Fun
Xalus
Veteran Member
Join Date: Dec 2009
Location: Belgium
Old 03-31-2020 , 11:48   Re: [REQ] Simple jailbreak fun mod.
Reply With Quote #4

Please read the description I gave with posting it,
instead of uselessly bumping thread.
__________________
Retired.
Xalus is offline
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 11:38.


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