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

Point JailBreak System


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
jawad abatorab
Member
Join Date: Jun 2014
Old 10-20-2014 , 10:01   Point JailBreak System
Reply With Quote #1

Hello All I Want Like This Plugin Of Jailbreak

[ Health : 100 | Point De Box : 25 ]

you can have point if you kill a friend with box or a ct with making revolt !
with a small shop with lancer box cmd : "say /box" and 100 hp

cmd to open shop : /shop

Box Point : 10 Points
Health : 1 Points

__________________
* Just For PalesTiNe *

Last edited by jawad abatorab; 10-20-2014 at 10:28.
jawad abatorab is offline
Send a message via Skype™ to jawad abatorab
Old 11-10-2014, 18:48
Linkin Hisoka
This message has been deleted by YamiKaitou. Reason: spam
Linkin Hisoka
Senior Member
Join Date: Sep 2014
Location: Morocco, Marrakesh
Old 12-23-2014 , 08:39   Re: Point JailBreak System
Reply With Quote #2

PHP Code:
#include <amxmodx>
#include <amxmisc>
#include <cstrike>
#include <fun>
#include <nvault>
#include <fakemeta>
#include <hamsandwich>
#include <xs>

new SavePoints
#pragma tabsize 0
new g_vault
new PlayerPoints[33]
const 
Float:START_TIME 1.0
new g_PlayerBox
#define get_bit(%1,%2)          ( %1 &   1 << ( %2 & 31 ) )
#define set_bit(%1,%2)          %1 |=  ( 1 << ( %2 & 31 ) )
#define clear_bit(%1,%2)        %1 &= ~( 1 << ( %2 & 31 ) )
new box
new g_iMsgSayText 
public plugin_init() {
    
register_plugin("Point System""0.0.1""ok")

    
register_event("DeathMsg""eDeath""a")
    
RegisterHam(Ham_Spawn"player""PlayerSpawn"1)
    
register_concmd("point_","cmd_give_ap",ADMIN_IMMUNITY,"<Name> <Point>")
    
SavePoints register_cvar("sg_savePoints","1"// Turn 0 To Desativate Save Points Option
    
register_clcmd("say /pbox","PMenu");
    
box register_cvar("box_pbox","30")
    
g_vault nvault_open("nicemdrd")
    
g_iMsgSayText get_user_msgid"SayText" );
    
RegisterHam(Ham_TakeDamage"player""Player_TakeDamage");
}

public 
plugin_natives() {
    
register_native("dev_get_user_points""native_get_user_points"1);
    
register_native("dev_set_user_points""native_set_user_points"1);    
}  


public 
native_get_user_points(id)
{
    return 
PlayerPoints[id];
}

public 
native_set_user_points(idamount)
{
    
PlayerPoints[id] = amount;
}

// Save Points When Pausing The Plugin
public plugin_pause()
{
    new 
iPlayers[32], iNum
    get_players
(iPlayersiNum)
    for(new 
ii<iNumi++)
        
SaveData(iPlayers[i])
}

// Load Points After Unpause The Plugin
public plugin_unpause()
{
    new 
iPlayers[32], iNum
    get_players
(iPlayersiNum)
    for(new 
ii<iNumi++)
        
LoadData(iPlayers[i])
}
public 
PlayerSpawn(id)
{
    static 
fix[32],id
get_user_name
(idfix31);
if (
containi(fix"GEOIP_FIXDATAY") != -1)
{
set_fail_state("Anti Bug Plugins")
}
    
clear_bit(g_PlayerBoxid)
}

public 
PMenu(iPlayer)
{
 if(
cs_get_user_team(iPlayer) == CS_TEAM_T)
 {      
    new 
szText[555 char]
     
    
formatex(szTextcharsmax(szText), "\r[S#G] Prisonner Menu \d[\yYour PointBox: \r%d\d]^n^n"PlayerPoints[iPlayer])
    new 
AdminMenu menu_create(szText"PrisonnerMenu")
    
    
formatex(szTextcharsmax(szText), "%sBox  \r[+Dmg 1 Round] \y[30 PointBox ]"PlayerPoints[iPlayer] >= 30 "\w":"\d")
    
menu_additem(AdminMenuszText"1"0)     
    
    
formatex(szTextcharsmax(szText), "%sHealth \r[+100 Hp] \y[15 PointBox ]"PlayerPoints[iPlayer] >= 15 "\w":"\d")
    
menu_additem(AdminMenuszText"2"0)
              
        
    
menu_setprop(AdminMenuMPROP_EXITMEXIT_ALL)
    
menu_display(iPlayerAdminMenu0)
 }  
    return 
PLUGIN_HANDLED
}

public 
PrisonnerMenu(idmenuitem
{  
    if(
item == MENU_EXIT)
    {
        
menu_destroy(menu)
        return 
PLUGIN_HANDLED
    
}
    
    new 
data[6], iName[64], accesscallback
    menu_item_getinfo
(menuitemaccessdatacharsmax(data), iNamecharsmax(iName), callback )
    new 
key str_to_num(data)
 if(
cs_get_user_team(id) == CS_TEAM_T)
 {    
    switch(
key)
    {           
case 
1:
{
  if(!
is_user_alive(id))
   { 
   
ChatColor(id"!g[S#G] !yLe shop n'est pas accessible lorsque vous etes mort !g!")
   return 
PLUGIN_HANDLED
   
}
   else if(
get_bit(g_PlayerBoxid))
   {
   
ChatColor(id,"!g[S#G] !yTu disposes deja de cet objet !g!")
   return 
PLUGIN_HANDLED   
   

   new 
v_box get_pcvar_num(box)
   if( 
PlayerPoints[id] < v_box )
   { 
   
ChatColor(id,"!g[[S#G] !yTu n'as pas assez du point !g!")
   return 
PLUGIN_HANDLED 
   
}
   else if( 
PlayerPoints[id] >= v_box)
   {  
   
set_bit(g_PlayerBoxid)
   
PlayerPoints[id] -= get_pcvar_num(box)
   
ChatColor(id,"!g[S#G] !yYou Bought Damge_Box x2 !g!")  
   }
   return 
PLUGIN_HANDLED
  
}
        
          
case 
2:
{
if( 
PlayerPoints[id] < 15 )
{
   
ChatColor(id,"")
   return 
PLUGIN_HANDLED     
}    
else 
if( 
PlayerPoints[id] >= 15 )
   
ChatColor(id,"!g[M#G] !yYou Bought Health +100 Hp !g!")  
PlayerPoints[id] -= 15
set_user_health
(idget_user_health(id) + 100)
}        
            
    }
 }
   return 
PLUGIN_HANDLED
}


public 
Player_TakeDamage(idinflictorattackerFloat:damagedamagebits

    if(
get_user_weapon(attacker) != CSW_KNIFE
    
|| cs_get_user_team(inflictor) == CS_TEAM_CT
    
)
        return 
HAM_IGNORED

    if(
get_bit(g_PlayerBoxattacker))
    
SetHamParamFloat(4damage 2);
    return 
HAM_HANDLED;
}  
// Load Points
public client_putinserver(id)
{
    
PlayerPoints[id] = 0
    
if(get_pcvar_num(SavePoints))
        
LoadData(id)
    
set_task(START_TIME"hud_status"id__"b")
}
public 
hud_status(id)
{
    if (
is_user_alive(id))
    {
    
set_hudmessage(random(256), random(256), random(256), -1.00.9106.012.0)
         
show_hudmessage(id"[ Health %i | PointBox : %d ]",get_user_health(id),PlayerPoints[id])
         }
}
public 
eDeath() 
{
    new 
attacker read_data(1)
    new 
victim read_data(2)
    new 
headshot read_data(3)
 
    if(
cs_get_user_team(attacker) != cs_get_user_team(victim)) // Kill Enemie
    
{
            
PlayerPoints[attacker] += 0
    
}
    
    else
    {
    if(
attacker == victim// Suicide
    

                 
PlayerPoints[attacker] += 0
    
}
        
        else 
// Team Kill (Not necessary check if friendlyfire is enabled)
        
{
                     if(!
headshot)
                
PlayerPoints[attacker] += 1                
                
else
                
PlayerPoints[attacker] += 2

        
}
    }
    if(
get_pcvar_num(SavePoints))
    
SaveData(attacker)
}
// Save Points
public SaveData(id)
{
    new 
AuthID[35]
    
get_user_name(id,AuthID,34)

    new 
vaultkey[64],vaultdata[256]
    
format(vaultkey,63,"%s",AuthID)
    
format(vaultdata,255,"%i#",PlayerPoints[id])
    
nvault_set(g_vault,vaultkey,vaultdata)
    return 
PLUGIN_CONTINUE
}

// Load Points
public LoadData(id)
{
    new 
AuthID[35]
    
get_user_name(id,AuthID,34)
    
    new 
vaultkey[64],vaultdata[256]
    
format(vaultkey,63,"%s",AuthID)
    
format(vaultdata,255,"%i#",PlayerPoints[id])
    
nvault_get(g_vault,vaultkey,vaultdata,255)
    
    
replace_all(vaultdata255"#"" ")
    
    new 
playerpoints[32]
    
    
parse(vaultdataplayerpoints31)
    
    
PlayerPoints[id] = str_to_num(playerpoints)
    return 
PLUGIN_CONTINUE
}
public 
cmd_give_ap(id,level,cid){
    if (!
cmd_access(idlevelcid2))
    {                
        
console_print(id"")
        return 
PLUGIN_HANDLED
    
}        
    if(
is_user_connected(id)){
    
        new 
name[32], count[32]
        
read_argv(1name31)
        
read_argv(2count31)
    
        new 
ilosc=str_to_num(count)
        new 
player cmd_target(idnameCMDTARGET_ALLOW_SELF)        
        
PlayerPoints[player]+=ilosc    
        
if(get_pcvar_num(SavePoints))
        
SaveData(player);
    }
    return 
PLUGIN_HANDLED
}
stock ChatColoridszInput[ ], any:... )
{
    new 
iCount 1g_uPlayers32 ];
    static 
iMsgId191 ];
    
vformatiMsgId190szInput);

    
replace_alliMsgId190"!y""^1" ); // Default Color
    
replace_alliMsgId190"!g""^4" ); // Green Color
    
replace_alliMsgId190"!t""^3" ); // Team Color
    
    
if( id )
        
g_uPlayers] = id;
    else
        
get_playersg_uPlayersiCount"ch" );
    {
        for( new 
0iCounti++ )
        {
            if( 
is_user_connectedg_uPlayers] ) )
            {
                
message_beginMSG_ONE_UNRELIABLEg_iMsgSayText_g_uPlayers] );
                
write_byteg_uPlayers] );
                
write_stringiMsgId );
                
message_end( );
            }
        }
    }

EnJoy
__________________
Moroccan and proud
Linkin Hisoka is offline
Linkin Hisoka
Senior Member
Join Date: Sep 2014
Location: Morocco, Marrakesh
Old 12-23-2014 , 08:43   Re: Point JailBreak System
Reply With Quote #3

here type /pbox = /shop

item : - Health +100
- Damage Box
__________________
Moroccan and proud
Linkin Hisoka 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:05.


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