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

Jailbreak MOD v2.7.0 (API SUPPORT) STABLE


Post New Thread Reply   
 
Thread Tools Display Modes
Ayman Khaled
Senior Member
Join Date: Mar 2017
Location: Palestine
Old 08-15-2017 , 11:23   Re: Jailbreak MODE v2.2 (API SUPPORT)
Reply With Quote #61

Now works well
A small req...
Can you make a Gambling system ?
like /gamble 500, if you won you will get double.
else you will lose them.
EDIT :
i made a small plugin with this feature...
if you like the ideea you can optimize it.
PHP Code:
#include <amxmodx>
#include <amxmisc>
#include <jailbreak_core>

#define PLUGIN "New Plug-In"
#define VERSION "0.1"
#define AUTHOR "Author"

#define MINAMMOUNT 300
#define MAXAMMOUNT 10000

public plugin_init() 
{
    
register_plugin(PLUGINVERSIONAUTHOR)
    
register_clcmd("say""cmd_Say")
}

public 
cmd_Say(iPlayer

    new 
sString[32];
    
read_args(sStringcharsmax(sString)) 
    
remove_quotes(sString
     
    new 
cmd[16], szValue[16]
    
strtok(sStringcmd,charsmax(cmd), szValue,charsmax(szValue), ' ')
     
    if(
equali(cmd"/gamble")) 
    { 
        new 
iAmmount str_to_num(szValue);
         
        if(!
iAmmount
        { 
            
cprint_chat(iPlayer_"Usage: /gamble < ammount >"
            return 
1
        

         new 
jbcash jb_get_user_cash(iPlayer);
        if( 
jbcash <= MINAMMOUNT
        { 
            
cprint_chat(iPlayer_"You should have at least %i before gamble."MINAMMOUNT
            return 
1
        

         
        if( 
iAmmount <= MINAMMOUNT
        { 
            
cprint_chat(iPlayer_"You have reached minumum ammount ( %i )."MINAMMOUNT
            return 
1
        

         
        if( 
iAmmount >= MAXAMMOUNT 
        { 
            
cprint_chat(iPlayer_"You have reached maxiumum ammount ( %i )"MAXAMMOUNT
            return 
1
        

         
        if ( 
jbcash iAmmount 
        { 
            
cprint_chat(iPlayer_"You have only %i"jbcash
            return  
1
        


        new 
woncash iAmmount 2szName[32]; 
         
get_user_name(iPlayerszNamecharsmax(szName))
        switch( 
random(4) ) 
        { 
            case 
0,3:  
            { 
                
jb_set_user_cash(iPlayer, (jbcash woncash))
                
cprint_chat(iPlayer_"Congratulations!, You have won $%i!"woncash)  
                
cprint_chat(0_"%s gambled %i, and won $%i!"szNameiAmmountwoncash
            } 
             
            case 
1,2
            { 
                
jb_set_user_cash(iPlayer,( jbcash iAmount ))
                
cprint_chat(iPlayer_"Oh no... You lost %i."iAmmount)  
        
        
cprint_chat(0_"%s gambled $%i, and lost them."szNameiAmmount
            } 
        } 
        return 
1
    
}
     
    if(
equali(cmd"/gambleall") || equali(cmd"/allin")) 
    { 
        new 
jbcash jb_get_user_cash(iPlayer) , szName[32]
         
        if ( 
jbcash <= MINAMMOUNT 
        { 
            
cprint_chat(iPlayer_"You should have at least %i to gamble your cash."MINAMMOUNT
            return 
1
        

        
get_user_name(iPlayerszNamecharsmax(szName)) 
         
        switch( 
random_num(12) ) 
        { 
            case 
1:  
            { 
                
jb_set_user_cash(iPlayerjbcash += jbcash
                
cprint_chat(iPlayer_"Congratulations!, You got doubles your cash !")  
                
cprint_chat(0_"%s gambled all his cash, and got doubles!"szName
            } 
             
            case 
2
            { 
                
jb_set_user_cash(iPlayer, (jbcash jbcash)) 
                
cprint_chat(iPlayer_"Oh no... You lost all your money.")  
                
cprint_chat(0_"%s gambled all his cash, and lost them all..."szName
            } 
        }
        return 
1
    
}
    return 
0

__________________

Last edited by Ayman Khaled; 08-16-2017 at 04:25. Reason: updated .
Ayman Khaled is offline
Natsheh
Veteran Member
Join Date: Sep 2012
Old 08-15-2017 , 17:26   Re: Jailbreak MODE v2.2 (API SUPPORT)
Reply With Quote #62

Good job, wonder ful.
__________________
@Jailbreak Main Mod v2.7.0 100%
@User Tag Prefix 100% done !
@Mystery Box 100% done !
@VIP System 100% done !


Last edited by Natsheh; 08-15-2017 at 18:12.
Natsheh is offline
Send a message via MSN to Natsheh Send a message via Skype™ to Natsheh
Ayman Khaled
Senior Member
Join Date: Mar 2017
Location: Palestine
Old 08-15-2017 , 18:08   Re: Jailbreak MODE v2.2 (API SUPPORT)
Reply With Quote #63

check again
__________________
Ayman Khaled is offline
Natsheh
Veteran Member
Join Date: Sep 2012
Old 08-15-2017 , 18:17   Re: Jailbreak MODE v2.2 (API SUPPORT)
Reply With Quote #64

You have bugs when youre going to gamble specified amount of money

PHP Code:
public cmd_Say(iPlayer

    new 
sString[32];
    
read_args(sStringcharsmax(sString)) 
    
remove_quotes(sString
     
    new 
cmd[16], szValue[16]
    
strtok(sStringcmd,charsmax(cmd), szValue,charsmax(szValue), ' ')
     
    if(
equali(cmd"/gamble")) 
    { 
        new 
iAmmount str_to_num(szValue);
         
        if(!
iAmmount
        { 
            
cprint_chat(iPlayer_"Usage: /gamble < ammount >"
            return 
1
        

         new 
jbcash jb_get_user_cash(iPlayer);
        if( 
jbcash <= MINAMMOUNT
        { 
            
cprint_chat(iPlayer_"You should have at least %i before gamble."MINAMMOUNT
            return 
1
        

         
        if( 
iAmmount <= MINAMMOUNT
        { 
            
cprint_chat(iPlayer_"You have reached minumum ammount ( %i )."MINAMMOUNT
            return 
1
        

         
        if( 
iAmmount >= MAXAMMOUNT 
        { 
            
cprint_chat(iPlayer_"You have reached maxiumum ammount ( %i )"MAXAMMOUNT
            return 
1
        

         
        if ( 
jbcash iAmmount 
        { 
            
cprint_chat(iPlayer_"You have only %i"jbcash
            return  
1
        


        new 
woncash iAmmount 2szName[32]; 
         
get_user_name(iPlayerszNamecharsmax(szName))
        switch( 
random(4) ) 
        { 
            case 
0,3:  
            { 
                
jb_set_user_cash(iPlayer, (jbcash woncash))
                
cprint_chat(iPlayer_"Congratulations!, You have won $%i!"woncash)  
                
cprint_chat(0_"%s gambled %i, and won $%i!"szNameiAmmountwoncash
            } 
             
            case 
1,2
            { 
                
jb_set_user_cash(iPlayer,( jbcash iAmount ))
                
cprint_chat(iPlayer_"Oh no... You lost %i."iAmmount)  
        
        
cprint_chat(0_"%s gambled $%i, and lost them."szNameiAmmount
            } 
        } 
        return 
1
    
}
     
    if(
equali(cmd"/gambleall") || equali(cmd"/allin")) 
    { 
        new 
jbcash jb_get_user_cash(iPlayer) , szName[32]
         
        if ( 
jbcash <= MINAMMOUNT 
        { 
            
cprint_chat(iPlayer_"You should have at least %i to gamble your cash."MINAMMOUNT
            return 
1
        

        
get_user_name(iPlayerszNamecharsmax(szName)) 
         
        switch( 
random_num(12) ) 
        { 
            case 
1:  
            { 
                
jb_set_user_cash(iPlayerjbcash += jbcash
                
cprint_chat(iPlayer_"Congratulations!, You got doubles your cash !")  
                
cprint_chat(0_"%s gambled all his cash, and got doubles!"szName
            } 
             
            case 
2
            { 
                
jb_set_user_cash(iPlayer, (jbcash jbcash)) 
                
cprint_chat(iPlayer_"Oh no... You lost all your money.")  
                
cprint_chat(0_"%s gambled all his cash, and lost them all..."szName
            } 
        }
        return 
1
    
}
    return 
0


No need to use the stock explode_string...
__________________
@Jailbreak Main Mod v2.7.0 100%
@User Tag Prefix 100% done !
@Mystery Box 100% done !
@VIP System 100% done !


Last edited by Natsheh; 08-15-2017 at 18:54.
Natsheh is offline
Send a message via MSN to Natsheh Send a message via Skype™ to Natsheh
Ayman Khaled
Senior Member
Join Date: Mar 2017
Location: Palestine
Old 08-15-2017 , 18:21   Re: Jailbreak MODE v2.2 (API SUPPORT)
Reply With Quote #65

i tested it many times ...
but if there are really, can you tell me where ?
edit: ah found it,
i just copied pasted from /gambleall to /gamble ( switch part ) and forget to change jb_set_user_cash
__________________

Last edited by Ayman Khaled; 08-15-2017 at 18:24.
Ayman Khaled is offline
Natsheh
Veteran Member
Join Date: Sep 2012
Old 08-15-2017 , 18:48   Re: Jailbreak MODE v2.2 (API SUPPORT)
Reply With Quote #66

Edited.

I attached the function code above fixed and optimized
__________________
@Jailbreak Main Mod v2.7.0 100%
@User Tag Prefix 100% done !
@Mystery Box 100% done !
@VIP System 100% done !


Last edited by Natsheh; 08-15-2017 at 18:48.
Natsheh is offline
Send a message via MSN to Natsheh Send a message via Skype™ to Natsheh
Ayman Khaled
Senior Member
Join Date: Mar 2017
Location: Palestine
Old 08-15-2017 , 19:03   Re: Jailbreak MODE v2.2 (API SUPPORT)
Reply With Quote #67

Oh thx very much .
__________________
Ayman Khaled is offline
Old 08-16-2017, 09:08
Ayman Khaled
This message has been deleted by Ayman Khaled. Reason: nvm
Natsheh
Veteran Member
Join Date: Sep 2012
Old 08-20-2017 , 08:16   Re: Jailbreak MODE v2.2 (API SUPPORT)
Reply With Quote #68

Few Changes been made....
( listed in Change logs ).
__________________
@Jailbreak Main Mod v2.7.0 100%
@User Tag Prefix 100% done !
@Mystery Box 100% done !
@VIP System 100% done !

Natsheh is offline
Send a message via MSN to Natsheh Send a message via Skype™ to Natsheh
DevilBoy.eXe
Member
Join Date: Mar 2017
Location: Romania
Old 08-20-2017 , 09:29   Re: Jailbreak MODE v2.2 (API SUPPORT)
Reply With Quote #69

Natsheh can you add a cvar for droping money with G?
__________________


Last edited by DevilBoy.eXe; 08-20-2017 at 09:29.
DevilBoy.eXe is offline
Send a message via Yahoo to DevilBoy.eXe Send a message via Skype™ to DevilBoy.eXe
eryk172
Member
Join Date: Aug 2013
Old 08-20-2017 , 18:52   Re: Jailbreak MODE v2.2 (API SUPPORT)
Reply With Quote #70

Why?

PHP Code:
L 08/21/2017 00:52:04: -------- Mapchange to de_dust2 --------
L 08/21/2017 00:52:04: [CSTRIKEBuyGunAmmo is not available
L 08
/21/2017 00:52:04: [CSTRIKEAddAccount is not available
L 08
/21/2017 00:52:04: [CSTRIKESome functions are not available forwards CS_OnBuy[Attempthave been disabled
L 08
/21/2017 00:52:04: [CSTRIKEg_pGameRules is not available Forward CS_OnBuy has been disabled
L 08
/21/2017 00:52:04: [FAKEMETAget/set_gamerules_natives have been disabled because g_pGameRules address could not be found
eryk172 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 10:26.


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