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

[Solved]


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Suntox
Member
Join Date: Nov 2016
Old 06-03-2017 , 08:54   [Solved]
Reply With Quote #1

Solved

Last edited by Suntox; 06-03-2017 at 23:29.
Suntox is offline
Houssam Benmouna
Senior Member
Join Date: Apr 2016
Old 06-03-2017 , 09:30   Re: [REQ]Multijump
Reply With Quote #2

I Just Adding The Native It's Okay And Simple No Trouble In This Here you go:

PHP Code:
#include <amxmodx>
#include <amxmisc>
#include <nvault>
#include <fun>
#include <cstrike>
#include <fakemeta_util>
#include <hamsandwich>
#include <ColorChat>
#include <engine>

native g_jump(id)
#pragma tabsize 0

#define PLUGIN "dr"
#define VERSION "3.2"
#define AUTHOR "ss"

#define is_valid_player(%1) (1 <= %1 <= 32)

new g_level[32], g_level_datag_frags_levelg_ScreenFade
new g_level_maxg_level_numg_levels[32]
new 
level_exp[32], g_aim_infobuffer[32]
new 
g_level_exp[32], g_Playersnameid[32], g_points[32]
new 
g_trime[32], g_MsgSyncgGrads[32]
new 
sound_level_up[] = { "Level_Up.wav"}
const 
PEV_SPEC_TARGET pev_iuser2
new Invi_time[32]
new 
g_iTarget [33];
new 
g_Lifes[33];
new 
cvar_Invi_time;

public 
plugin_precache()
{
    
precache_soundsound_level_up )
}

public 
plugin_init()
{
    
g_frags_level register_cvar("zp_level_frags""10")
    
g_level_max register_cvar("zp_level_max""150")
    
g_aim_info register_cvar("xp_aim_info""1")
    
g_level_num register_cvar("zp_level_number""1")
    
cvar_Invi_time register_cvar("amxx_cvar_invi_time","10")
    
    
register_clcmd("say /shop""Shop_Items")
    
register_clcmd("say shop""Shop_Items")
    
register_clcmd("say donate""Donate_Menu" );
    
register_clcmd("say /donate""Donate_Menu" );
    
register_clcmd("say /showpoint""ShowPoints" );
    
register_clcmd("say /mypoints""cmd_showgolds" );
    
register_concmd("point_""cmd_set"ADMIN_IMMUNITY"<name> <golds> - set golds to a player" );
    
register_concmd("rs_point_""cmd_reset"ADMIN_IMMUNITY"<name> <golds> - reset player golds" );
    
    
g_level_data nvault_open("Leveling_Save")
    
register_event("HLTV""Round_Start""a""1=0""2=0")
    
register_event("DeathMsg""Frags_Manager""a""1>0"
    
register_event("DeathMsg""eDeath""a")
    
g_ScreenFade get_user_msgid"ScreenFade" )
    
register_event("StatusValue","show_status","b e","1=2","2!0")
    
register_event("StatusValue","hide_status","b e","1=1","2=0")
    
g_Players =get_maxplayers()
    
register_plugin(PLUGINVERSIONAUTHOR)
    
g_MsgSync CreateHudSyncObj()
}

new const 
Grads[][] =
{
"Noob",
"Noob",
"Noob",
"Noob",
"Noob",
"Noob",
"Noob",
"Noob",
"Noob",
"Noob",
"Regular",
"Regular",
"Regular",
"Regular",
"Regular",
"Regular",
"Regular",
"Regular",
"Regular",
"Regular",
"Regular",
"Bhoper",
"Bhoper",
"Bhoper",
"Bhoper",
"Bhoper",
"Bhoper",
"Bhoper",
"Bhoper",
"Bhoper",
"Bhoper",
"Super Bhoper",
"Super Bhoper",
"Super Bhoper",
"Super Bhoper",
"Super Bhoper",
"Super Bhoper",
"Super Bhoper",
"Super Bhoper",
"Super Bhoper",
"Super Bhoper",
"Super Bhoper",
"Super Bhoper",
"Super Bhoper",
"Super Bhoper",
"Super Bhoper",
"Super Bhoper",
"Super Bhoper",
"Super Bhoper",
"Super Bhoper",
"Super Bhoper",
"Super Bhoper",
"Pro DeathRun"
}

public 
Round_Start()
{
for(new 
id=1;id<=g_Players;id++)
    
set_task(3.0"Level"id)
}

public 
Level(id)
{
    if(
is_user_alive(id) )
    {
        
g_trime[id] = false;
        new 
1;
        while( 
g_level[id] )
        {
            
1
        
}
    }
}

public 
client_putinserver(id)
{
    if(!
is_user_bot(id) && is_valid_player(id))
        
Level_Load(id)
    
g_level_exp[id] = get_pcvar_num(g_frags_level)
    new 
name[32]
    
g_trime[id] = false;
    
nameid[id] = get_user_name(idnamesizeof name 1)
    if(
is_user_alive(id))
    {
        
g_trime[id] = false;
        new 
1;
        while( 
!= g_level[id] )
        {
            
1;
        }
    }
    if( 
g_level[id] == 0g_level[id] = 1;
    if( 
level_exp[id] == g_level[id] ) level_exp[id] = 0;
    if(
g_level[id] < get_pcvar_num(g_level_num))
        
g_levels[id] = get_pcvar_num(g_level_num);
    else
    {
        if(
g_level[id] != g_levels[id])
        {
            new 
1;
            while( 
g_level[id] > ( get_pcvar_num(g_level_num)) )
            {
                
1;
                
g_levels[id] = get_pcvar_num(g_level_num);
            }
        }
    }
    new 
1;
    while( 
g_level[id] != )
    {
        
1;
        
g_level_exp[id] = get_pcvar_num(g_frags_level);
    }
}

public 
hide_status(id)
{
    
set_hudmessage(0,0,0,0.0,0.0,00.00.010.00.04)
    
show_hudmessage(id,"")
}

public 
show_status(id)
{
    new 
name[32],pid read_data(2)
    
get_user_name(pid,name,31)
    switch(
get_user_team(pid)) 
    { 
        case 
1copy(buffer31"Terrorist"
            case 
2copy(buffer31"Counter-Terrorist"
        } 
    if(
get_pcvar_num(g_aim_info) == 1)
    {
        
set_hudmessage(random_num(200,150),random_num (100,50),random_num(50,25),-1.0,0.60,10.014.00.010.014)
        
show_hudmessage(id"%s^n[ Health : %d | Team : %s ]^n[ Grade : %s | Level : %i | Exp : %i/%i | Dr.Points : %d ]",nameget_user_health(pid), bufferGrads[gGrads[pid]], g_level[pid], level_exp[pid], g_level_exp[pid], g_points[pid])
    }
}

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)) 
    {
        
g_points[attacker] += 1
    
}
    
    else
    {
        if(
attacker == victim)
        { 
            
g_points[attacker] += 0
        
}
        
        else
        {
            if(!
headshot)
                
g_points[attacker] += 1    
            
else
                
g_points[attacker] += 1
            
        
}
    }
}

public 
client_disconnect(id)
{
{
    new 
name[32], player_nick[32]
    
player_nick[id] = get_user_name(idnamesizeof name 1)
    if(
player_nick[id] == nameid[id])
        
Level_Save(id)
    }
    
Level_Save(id)    
    
g_trime[id] = false;
}

public 
level_status(id)
{
    new 
Spec
    Spec 
pev(idPEV_SPEC_TARGET)
    new 
PlayerName[32]
    
get_user_name(SpecPlayerName31)
    switch(
get_user_team(id)) 
    { 
        case 
1copy(buffer31"Terrorist"
            case 
2copy(buffer31"Counter-Terrorist"
        } 
    if(
is_user_alive(id))
    {
        
set_hudmessage(1018010, -1.00.8706.01.1)
        
ShowSyncHudMsg(idg_MsgSync"[ Health : %d | Team : %s ]^n[ Grade : %s | Level : %i | Exp : %i/%i | Dr.Points : %d ]",get_user_health(id), bufferGrads[gGrads[id]], g_level[id], level_exp[id], g_level_exp[id], g_points[id])
    }
    else
        switch(
get_user_team(Spec)) 
    { 
        case 
1copy(buffer31"Terrorist"
            case 
2copy(buffer31"Counter-Terrorist"
        } 
    if(
is_user_alive(Spec))
    {
        
set_hudmessage(20030200, -1.00.7906.01.1)
        
ShowSyncHudMsg(idg_MsgSync"Spectating: %s ^n[ Health : %d | Team : %s ]^n[ Grade : %s | Level : %i | Exp : %i/%i | Dr.Points : %d ]",PlayerNameget_user_health(Spec), bufferGrads[gGrads[id]], g_level[Spec], level_exp[Spec], g_level_exp[Spec], g_points[Spec])
    }
}

public 
Level_Save(id)
{
    new 
key[64], data[256]
    new 
name[33]
    
get_user_name(id,name,32)
    
    
format(key63"%s-/"name)
    
format(data255"%i#"g_level[id], level_exp[id], g_points[id], gGrads[id])
    
    
nvault_set(g_level_datakeydata)
    return 
PLUGIN_CONTINUE;
}

public 
Level_Load(id)
{
    new 
key[64], data[256]
    new 
name[33]
    
get_user_name(id,name,32)
    
    
format(key63"%s-/"name)
    
format(data255"%i# %i# %d# %s#"g_level[id], level_exp[id], g_points[id], gGrads[id])
    
    
nvault_get(g_level_datakeydata255)
    
    
replace_all(data255"#"" ")
    
    new 
givelevel[32]
    
parse(datagivelevel31)
    
    
g_level[id] = str_to_num(givelevel)
    
    
set_task(1.0 ,"level_status"id__"b")
    
    return 
PLUGIN_CONTINUE;
}

public 
Frags_Manager()
{
    new 
aname[32], attackerattacker read_data(1)
    new 
y1;
    
get_user_name(attackeranamesizeof aname 1)
    if( ( 
level_exp[attacker] >= (g_level_exp[attacker] - 1) ) && (g_level[attacker] <= get_pcvar_num(g_level_max)) && is_user_alive(attacker) )
    {
        
g_level[attacker] = g_level[attacker] + 1;
        
level_exp[attacker] = 0;
        while( 
g_level[attacker] != )
        {
            
1;
            
g_level_exp[attacker] = get_pcvar_num(g_frags_level);
        }
        
message_begin(MSG_ONE_UNRELIABLEg_ScreenFade_attacker)
        
write_short(1<<12// duration
        
write_short(1// hold time
        
write_short(0x0000// fade type
        
write_byte(1// red
        
write_byte(200// green
        
write_byte(0// blue
        
write_byte(205// alpha
        
message_end()
        
emit_sound(attackerCHAN_STREAMsound_level_up1.0ATTN_NORM0PITCH_HIGH )
        
set_hudmessage(020000.650.500.03.02.01.0, -1)
        
show_hudmessage(0"%s Has Cut Down %i Level"anameg_level[attacker])
        
Level_Save(attacker);
    }
    else
    {
        
        if(
g_level[attacker] == get_pcvar_num(g_level_max))
            
ColorChat(attacker,GREEN,"[MS] ^1You Have Reached A Maximum Level: ^4%i"g_level[attacker])
        
level_exp[attacker] = level_exp[attacker] + 1;
        
Level_Save(attacker);
    }
}

public 
Shop_Items(iPlayer)
{
    new 
szText[555 char]
    
    
formatex(szTextcharsmax(szText), "\r[MS] \yDeathRun Shop \d[\rYour Points : %d\d]^n^n"g_points[iPlayer])
    new 
AdminMenu menu_create(szText"Dr_Shop")
    
    
formatex(szTextcharsmax(szText), "%sRespawn \r[Only Dead] \y[2 Dr-Points]"g_points[iPlayer] >= "\w":"\d")
    
menu_additem(AdminMenuszText"1"0)
    
    
formatex(szTextcharsmax(szText), "%sInvisblity \r[10 Seconds] \y[15 Dr-Points]"g_points[iPlayer] >= 15 "\w":"\d")
    
menu_additem(AdminMenuszText"2"0)    
    
    
formatex(szTextcharsmax(szText), "%sHealth \r[100 HP] \y[5 Dr-Points]"g_points[iPlayer] >= "\w":"\d")
    
menu_additem(AdminMenuszText"3"0)
    
    
formatex(szTextcharsmax(szText), "%sFlash Bang \r[] \y[4 Dr-Points]"g_points[iPlayer] >= "\w":"\d")
    
menu_additem(AdminMenuszText"4"0)
    
    
formatex(szTextcharsmax(szText), "%sSmoke Grenade \r[] \y[4 Dr-Points]"g_points[iPlayer] >= "\w":"\d")
    
menu_additem(AdminMenuszText"5"0)
    
    
formatex(szTextcharsmax(szText), "%sMultiJump \r[+1 Jump] \y[6 Dr-Points]^n"g_points[iPlayer] >= "\w":"\d")
    
menu_additem(AdminMenuszText"6"0)
    
    
menu_setprop(AdminMenuMPROP_EXITMEXIT_ALL)
    
menu_display(iPlayerAdminMenu0)
    
    return 
PLUGIN_HANDLED
}
public 
Set_p(id
{
    
g_points[id] += 6000
    g_Lifes
[id] += 600 
}

public 
Dr_Shop(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)
    
    switch(
key)
    {           
        case 
1:
        {
            if( 
g_points[id] < )
            {
                
ColorChat(id,GREEN,"[MS] ^1You Don't Have ^4[Points]")
                return 
PLUGIN_HANDLED     
            
}
            else 
                if( 
g_points[id] >= )
                
ColorChat(id,GREEN,"[MS] ^1You Bought ^4[Respawn]")  
            
ExecuteHamB(Ham_CS_RoundRespawnid)
        }
        
        case 
2:
        {
            if( 
g_points[id] < 15 )
            {
                
ColorChat(id,GREEN,"[MS] ^1You Don't Have ^4[Points]")
                return 
PLUGIN_HANDLED     
            
}
            else 
                if( 
g_points[id] >= 15 )
                
ColorChat(id,GREEN,"[MS] ^1You Bought ^4[Invisblity 10 Sec]")  
            
g_points[id] -= 15
            set_user_footsteps
(id1)
            
set_user_rendering(idkRenderFxNone000kRenderTransAlpha 0)
            
set_user_maxspeed(id,get_user_maxspeed(id) + 500)
            
            
set_task(10.0"Set_Invi",id);
            
set_task1.0"Invi_Time"id__"a",Invi_time id ] );
            
Invi_time id ] = get_pcvar_numcvar_Invi_time 
        }
        
        case 
3:
        {
            if( 
g_points[id] < )
            {
                
ColorChat(id,GREEN,"[MS] ^1You Don't Have ^4[Points]")
                return 
PLUGIN_HANDLED     
            
}    
            else 
                if( 
g_points[id] >= )
                
ColorChat(id,GREEN,"[MS] ^1You Bought ^4[100 HP]")  
            
g_points[id] -= 5
            set_user_health
(idget_user_health(id) + 100)
        }        
        
        case 
4:
        {
            if( 
g_points[id] < )
            {
                
ColorChat(id,GREEN,"[MS] ^1You Don't Have ^4[Points]")
                return 
PLUGIN_HANDLED     
            
}    
            else 
                if( 
g_points[id] >= )
                
ColorChat(id,GREEN,"[MS] ^1You Bought ^4[Flash Bang]")  
            
g_points[id] -= 4
            give_item 
(id,"weapon_flashbang")
            
cs_set_user_bpammo(idCSW_FLASHBANGcs_get_user_bpammo(idCSW_FLASHBANG) + 1)
        }        
        case 
5:
        {
            if( 
g_points[id] < )
            {
                
ColorChat(id,GREEN,"^4[MS] ^1You Don't Have ^4[Points]")
                return 
PLUGIN_HANDLED     
            
}
            else 
                if( 
g_points[id] >= )
                
ColorChat(id,GREEN,"^4[MS] ^1You Bought ^4[Smoke Grenade]")  
            
g_points[id] -= 4
            give_item 
(id,"weapon_smokegrenade")
            
cs_set_user_bpammo(idCSW_SMOKEGRENADEcs_get_user_bpammo(idCSW_SMOKEGRENADE) + 1)
        }
        case 
6:
        {
            if( 
g_points[id] < )
            {
                
ColorChat(id,GREEN,"[MS] ^1You Don't Have ^4[Points]")
                return 
PLUGIN_HANDLED     
            
}    
            else 
                if( 
g_points[id] >= )
                
ColorChat(id,GREEN,"[MS] ^1You Bought ^4[MultiJump +1]")  
            
g_points[id] -= 6
            g_jump
(id)
        }        
        
    }
    return 
PLUGIN_HANDLED
}
public 
Set_Invi(id)
{
    
ColorChat(id,GREEN,"[MS] ^1Invisblity Is ^4[OFF]")     
    
set_user_footsteps(id0)    
    
set_user_rendering(id0
    return 
PLUGIN_HANDLED


public 
Invi_Time(id
{     
    if(
is_valid_ent(id) && is_user_alive(id))
    {
        
Invi_time id ] = Invi_time id ] - 1;
        
set_hudmessage(025500.750.7501.01.10.00.0, -1)
        
show_hudmessage(id"Invisiblity Time: %d",Invi_timeid ])
        
        }else{
        
remove_task(id)
    }
}


public 
ShowPoints(id)
{
    static 
opcion[64]
    
    
formatex(opcioncharsmax(opcion),"\r[MS] \yShow Players Points :")
    new 
iMenu menu_create(opcion"Handlegolds")
    
    new 
players[32], pnumtempid
    
new szName[32], szTempid[10]
    
    
get_players(playerspnum"ch")
    
    for( new 
ii<pnumi++ )
    {
        
        
tempid players[i]
        
        
get_user_name(tempidszName31)
        
num_to_str(tempidszTempid9)
        
        
formatex(opcion,127,"\w%s y- \d[\r%i Points\d]",szNameg_points[tempid]);
        
menu_additem(iMenuopcionszTempid0)
    }
    
    
menu_display(idiMenu)
    return 
PLUGIN_HANDLED
}

public 
Handlegolds(idmenuitem)
{
    if(
item == MENU_EXIT)
    {
        return 
PLUGIN_HANDLED
    
}
    
    new 
data[6], name[64]
    new 
accesscallback
    
    menu_item_getinfo 
(menuitemaccessdata5name63callback)
    new 
tempid str_to_num (data)
    
    new 
szName[33], szPlayerName[33]
    
    
get_user_name(idszName32)
    
get_user_name(tempidszPlayerName32)
    
    
ColorChat(idRED"^4[MS] ^1User ^4%s ^1Have ^4%i ^3Points ^4!",szPlayerNameg_points[tempid])
    
    
ShowPoints(id);
    
    return 
PLUGIN_CONTINUE
}


public 
Donate_Menu(id)
{
    new 
iMenu menu_create("\r[MS] \yDonate Players Menu""handleDonate");
    
    new 
iPlayers[32], szName[32], szKey[3], iNumiPlayer;
    
get_players(iPlayersiNum,"ch");
    
    for( new 
iiNumi++ )
    {
        
iPlayer iPlayers[i];
        
        
num_to_str(iPlayerszKeycharsmax(szKey));
        
get_user_name(iPlayerszNamecharsmax(szName));
        
        
menu_additem(iMenuszNameszKey);
    }
    
    
menu_setprop(iMenuMPROP_EXITNAME"Back");
    
menu_display(idiMenu0);
    return 
0;
}


public 
handleDonate(idmenuitem)
{
    if( 
item == MENU_EXIT )
    {
        
menu_destroy(menu);
        return 
PLUGIN_HANDLED;
    }
    
    new 
szData[6], iAccessiCallback;
    
menu_item_getinfo(menuitemiAccessszDatacharsmax(szData), __iCallback);
    
    
g_iTarget[id] = str_to_num(szData);
    new 
szName[32];
    
get_user_name(g_iTarget[id], szNamecharsmax(szName));
    
    
client_cmd(id"messagemode Donate");
    return 
PLUGIN_HANDLED;
}


public 
CmdDonate(id)
{
    new 
szArg[5];
    
read_argv(1szArgcharsmax(szArg));
    
    
    new 
iValue str_to_num(szArg);
    
    if( 
iValue g_points[id] )
    {
        
ColorChat(id,GREEN"^4[MS] ^1You Only Have ^4%i ^3Points ^4!",g_points[id]);
        return 
PLUGIN_HANDLED;
    }
    
    new 
iTarget g_iTarget[id];
    
    if( !
iTarget )
    {
        return 
PLUGIN_HANDLED;
    }
    
    if( 
iTarget == id )
    {
        return 
PLUGIN_HANDLED;
    }
    
    
g_points[id] -= iValue;
    
    
g_points[iTarget] += iValue;
    
    new 
szName[2][32];
    
get_user_name(iTargetszName[0], charsmax(szName[]));
    
get_user_name(idszName[1], charsmax(szName[]));
    
    
ColorChat(id,GREEN"^4[MS] ^1You Donated ^4%i^3 Points ^1To ^4%s !"iValueszName[0]);
    
ColorChat(iTarget,GREEN"^4[MS] ^3%s^1 Gaves You ^4%i Points"szName[1], iValue);
    
    
    return 
PLUGIN_HANDLED;
}


public 
cmd_showgolds(id)
{    
    
set_hudmessage(02552550.00.8706.012.0)
    
show_hudmessage(id"You Have %d Points"g_points [id] )
    
    
ColorChatidGREEN"^4[MS] ^1You Have ^4%d ^3Points ^4!"g_pointsid ] );    
}


public 
cmd_set(id,level,cid)
{
    if(!
cmd_access(id,level,cid,3))
        return 
PLUGIN_HANDLED
    
    
else
    {
        new 
target[32], pid
        read_argv
(1,target,31)
        
pid cmd_target(id,target,2)
        
        new 
amountstr[10], amount
        read_argv
(2,amountstr,9)
        
amount str_to_num(amountstr)
        
        new 
name[32], tname[32]
        
get_user_name(id,name,31)
        
get_user_name(pid,tname,31)
        
        
g_points[pid] += amount
        ColorChat
(idGREEN"^4[MS] ^1You Gave ^4%d ^3Points ^1To ^4%s ^1"amounttname)
        
ColorChat(pidGREEN"^4[MS] ^1Owner ^4%s ^1Gave ^4%d ^1Points ^1To ^3You ^4! ^1Now You Have ^4%d ^3Points ^4!"nameamount)
    }    
    return 
PLUGIN_HANDLED
}


public 
cmd_reset(id,level,cid)
{
    if(!
cmd_access(id,level,cid,3))
        return 
PLUGIN_HANDLED
    
    
else
    {
        new 
target[32], pid
        read_argv
(1,target,31)
        
pid cmd_target(id,target,2)
        
        new 
amountstr[10], amount
        read_argv
(2,amountstr,9)
        
amount str_to_num(amountstr)
        
        new 
name[32], tname[32]
        
get_user_name(id,name,31)
        
get_user_name(pid,tname,31)
        
        if((
g_points[pid] -= amount) < 0)
            
        
amount g_points[pid]
        
        
g_points[pid] -= amount
        ColorChat
(idGREEN"^4[MS] ^1You Removed ^4%d ^3Points ^1From ^4%s ^1!"amounttname)
        
ColorChat(pidGREEN"^4[MS] ^1Owner ^4%s ^1Removed From ^3You ^4%d ^3Points ^4! ^1Now You Have ^4%d ^3Points ^4!"nameamount)
    }
    return 
PLUGIN_HANDLED

MULTIJUMP :

PHP Code:
#include <amxmodx>
#include <fakemeta>
#include <hamsandwich>


new jumpnum[33] = 0;
new 
bool:dojump[33] = false;
new 
g_multijumps[33] = 0;
new 
bool:has_jump[33]

public 
plugin_init()
{
    
register_plugin("Jump""1.5""med*");
    
    
RegisterHam(Ham_Spawn"player""jump_off"1)
    
register_forward(FM_PlayerPreThink"FW_PlayerPreThinkz");
    
register_forward(FM_PlayerPostThink"FW_PlayerPostThinkz");
}

public 
client_connect(id
{        
    if(
get_user_flags(id) & ADMIN_KICK || has_jump[id]) 
    {     
        
has_jump[id]=true
    



/*public client_PreThink(id) 

    if(get_user_flags(id) & ADMIN_KICK || has_jump[id])  
    { 
        g_multijumps[id] = true
    }
}*/

public jump_off(id)
{
    for (new 
idid <= 32id++) g_multijumps[id] = false;
}

public 
FW_PlayerPreThinkz(id)
{
    if(!
g_multijumps[id]) return PLUGIN_CONTINUE
    
new nbut pev(id,pev_button);
    new 
obut pev(id,pev_oldbuttons);
    if((
nbut IN_JUMP) && !(pev(id,pev_flags) & FL_ONGROUND) && !(obut IN_JUMP))
    {
        if(
jumpnum[id] < 1)
        {
            
dojump[id] = true;
            
jumpnum[id]++;
            return 
PLUGIN_CONTINUE
        
}
    }
    if((
nbut IN_JUMP) && (pev(id,pev_flags) & FL_ONGROUND))
    {
        
jumpnum[id] = 0;
        return 
PLUGIN_CONTINUE
    
}
    return 
PLUGIN_CONTINUE
}

public 
FW_PlayerPostThinkz(id)
{
    if(!
g_multijumps[id]) return PLUGIN_CONTINUE
    
if(dojump[id] == true)
    {
        new 
Float:velocity[3];
        
pev(id,pev_velocity,velocity);
        
velocity[2] = random_float(265.0,285.0);
        
set_pev(id,pev_velocity,velocity)
        
dojump[id] = false
        
return PLUGIN_CONTINUE
    
}
    return 
PLUGIN_CONTINUE
}    

public 
plugin_natives() {
    
register_native("g_jump""native_jump"1);    
}  

public 
native_jump(id)
{
    
g_multijumps[id] = true;    

Houssam Benmouna is offline
DjSoftero
Veteran Member
Join Date: Nov 2014
Location: Lithuania
Old 06-03-2017 , 09:36   Re: [REQ]Multijump
Reply With Quote #3

lol what is this
PHP Code:
public plugin_init()
{
    
RegisterHam(Ham_Spawn"player""jump_off"1)

}


public 
jump_off(id)
{
    for (new 
idid <= 32id++) g_multijumps[id] = false;


Last edited by DjSoftero; 06-03-2017 at 09:39. Reason: hmm
DjSoftero is offline
Houssam Benmouna
Senior Member
Join Date: Apr 2016
Old 06-03-2017 , 09:38   Re: [REQ]Multijump
Reply With Quote #4

-_- It's for offing the multijump in the spawn only who was buy it in the shop will be enjoy with it if u know what i mean and if the player buy it and he dead it's will be off if u know what i mean

Last edited by Houssam Benmouna; 06-03-2017 at 09:40. Reason: BUG :3
Houssam Benmouna is offline
Suntox
Member
Join Date: Nov 2016
Old 06-03-2017 , 09:44   Re: [REQ]Multijump
Reply With Quote #5

Quote:
Originally Posted by Houssam Benmouna View Post
I Just Adding The Native It's Okay And Simple No Trouble In This Here you go:

PHP Code:
#include <amxmodx>
#include <amxmisc>
#include <nvault>
#include <fun>
#include <cstrike>
#include <fakemeta_util>
#include <hamsandwich>
#include <ColorChat>
#include <engine>

native g_jump(id)
#pragma tabsize 0

#define PLUGIN "dr"
#define VERSION "3.2"
#define AUTHOR "ss"

#define is_valid_player(%1) (1 <= %1 <= 32)

new g_level[32], g_level_datag_frags_levelg_ScreenFade
new g_level_maxg_level_numg_levels[32]
new 
level_exp[32], g_aim_infobuffer[32]
new 
g_level_exp[32], g_Playersnameid[32], g_points[32]
new 
g_trime[32], g_MsgSyncgGrads[32]
new 
sound_level_up[] = { "Level_Up.wav"}
const 
PEV_SPEC_TARGET pev_iuser2
new Invi_time[32]
new 
g_iTarget [33];
new 
g_Lifes[33];
new 
cvar_Invi_time;

public 
plugin_precache()
{
    
precache_soundsound_level_up )
}

public 
plugin_init()
{
    
g_frags_level register_cvar("zp_level_frags""10")
    
g_level_max register_cvar("zp_level_max""150")
    
g_aim_info register_cvar("xp_aim_info""1")
    
g_level_num register_cvar("zp_level_number""1")
    
cvar_Invi_time register_cvar("amxx_cvar_invi_time","10")
    
    
register_clcmd("say /shop""Shop_Items")
    
register_clcmd("say shop""Shop_Items")
    
register_clcmd("say donate""Donate_Menu" );
    
register_clcmd("say /donate""Donate_Menu" );
    
register_clcmd("say /showpoint""ShowPoints" );
    
register_clcmd("say /mypoints""cmd_showgolds" );
    
register_concmd("point_""cmd_set"ADMIN_IMMUNITY"<name> <golds> - set golds to a player" );
    
register_concmd("rs_point_""cmd_reset"ADMIN_IMMUNITY"<name> <golds> - reset player golds" );
    
    
g_level_data nvault_open("Leveling_Save")
    
register_event("HLTV""Round_Start""a""1=0""2=0")
    
register_event("DeathMsg""Frags_Manager""a""1>0"
    
register_event("DeathMsg""eDeath""a")
    
g_ScreenFade get_user_msgid"ScreenFade" )
    
register_event("StatusValue","show_status","b e","1=2","2!0")
    
register_event("StatusValue","hide_status","b e","1=1","2=0")
    
g_Players =get_maxplayers()
    
register_plugin(PLUGINVERSIONAUTHOR)
    
g_MsgSync CreateHudSyncObj()
}

new const 
Grads[][] =
{
"Noob",
"Noob",
"Noob",
"Noob",
"Noob",
"Noob",
"Noob",
"Noob",
"Noob",
"Noob",
"Regular",
"Regular",
"Regular",
"Regular",
"Regular",
"Regular",
"Regular",
"Regular",
"Regular",
"Regular",
"Regular",
"Bhoper",
"Bhoper",
"Bhoper",
"Bhoper",
"Bhoper",
"Bhoper",
"Bhoper",
"Bhoper",
"Bhoper",
"Bhoper",
"Super Bhoper",
"Super Bhoper",
"Super Bhoper",
"Super Bhoper",
"Super Bhoper",
"Super Bhoper",
"Super Bhoper",
"Super Bhoper",
"Super Bhoper",
"Super Bhoper",
"Super Bhoper",
"Super Bhoper",
"Super Bhoper",
"Super Bhoper",
"Super Bhoper",
"Super Bhoper",
"Super Bhoper",
"Super Bhoper",
"Super Bhoper",
"Super Bhoper",
"Super Bhoper",
"Pro DeathRun"
}

public 
Round_Start()
{
for(new 
id=1;id<=g_Players;id++)
    
set_task(3.0"Level"id)
}

public 
Level(id)
{
    if(
is_user_alive(id) )
    {
        
g_trime[id] = false;
        new 
1;
        while( 
g_level[id] )
        {
            
1
        
}
    }
}

public 
client_putinserver(id)
{
    if(!
is_user_bot(id) && is_valid_player(id))
        
Level_Load(id)
    
g_level_exp[id] = get_pcvar_num(g_frags_level)
    new 
name[32]
    
g_trime[id] = false;
    
nameid[id] = get_user_name(idnamesizeof name 1)
    if(
is_user_alive(id))
    {
        
g_trime[id] = false;
        new 
1;
        while( 
!= g_level[id] )
        {
            
1;
        }
    }
    if( 
g_level[id] == 0g_level[id] = 1;
    if( 
level_exp[id] == g_level[id] ) level_exp[id] = 0;
    if(
g_level[id] < get_pcvar_num(g_level_num))
        
g_levels[id] = get_pcvar_num(g_level_num);
    else
    {
        if(
g_level[id] != g_levels[id])
        {
            new 
1;
            while( 
g_level[id] > ( get_pcvar_num(g_level_num)) )
            {
                
1;
                
g_levels[id] = get_pcvar_num(g_level_num);
            }
        }
    }
    new 
1;
    while( 
g_level[id] != )
    {
        
1;
        
g_level_exp[id] = get_pcvar_num(g_frags_level);
    }
}

public 
hide_status(id)
{
    
set_hudmessage(0,0,0,0.0,0.0,00.00.010.00.04)
    
show_hudmessage(id,"")
}

public 
show_status(id)
{
    new 
name[32],pid read_data(2)
    
get_user_name(pid,name,31)
    switch(
get_user_team(pid)) 
    { 
        case 
1copy(buffer31"Terrorist"
            case 
2copy(buffer31"Counter-Terrorist"
        } 
    if(
get_pcvar_num(g_aim_info) == 1)
    {
        
set_hudmessage(random_num(200,150),random_num (100,50),random_num(50,25),-1.0,0.60,10.014.00.010.014)
        
show_hudmessage(id"%s^n[ Health : %d | Team : %s ]^n[ Grade : %s | Level : %i | Exp : %i/%i | Dr.Points : %d ]",nameget_user_health(pid), bufferGrads[gGrads[pid]], g_level[pid], level_exp[pid], g_level_exp[pid], g_points[pid])
    }
}

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)) 
    {
        
g_points[attacker] += 1
    
}
    
    else
    {
        if(
attacker == victim)
        { 
            
g_points[attacker] += 0
        
}
        
        else
        {
            if(!
headshot)
                
g_points[attacker] += 1    
            
else
                
g_points[attacker] += 1
            
        
}
    }
}

public 
client_disconnect(id)
{
{
    new 
name[32], player_nick[32]
    
player_nick[id] = get_user_name(idnamesizeof name 1)
    if(
player_nick[id] == nameid[id])
        
Level_Save(id)
    }
    
Level_Save(id)    
    
g_trime[id] = false;
}

public 
level_status(id)
{
    new 
Spec
    Spec 
pev(idPEV_SPEC_TARGET)
    new 
PlayerName[32]
    
get_user_name(SpecPlayerName31)
    switch(
get_user_team(id)) 
    { 
        case 
1copy(buffer31"Terrorist"
            case 
2copy(buffer31"Counter-Terrorist"
        } 
    if(
is_user_alive(id))
    {
        
set_hudmessage(1018010, -1.00.8706.01.1)
        
ShowSyncHudMsg(idg_MsgSync"[ Health : %d | Team : %s ]^n[ Grade : %s | Level : %i | Exp : %i/%i | Dr.Points : %d ]",get_user_health(id), bufferGrads[gGrads[id]], g_level[id], level_exp[id], g_level_exp[id], g_points[id])
    }
    else
        switch(
get_user_team(Spec)) 
    { 
        case 
1copy(buffer31"Terrorist"
            case 
2copy(buffer31"Counter-Terrorist"
        } 
    if(
is_user_alive(Spec))
    {
        
set_hudmessage(20030200, -1.00.7906.01.1)
        
ShowSyncHudMsg(idg_MsgSync"Spectating: %s ^n[ Health : %d | Team : %s ]^n[ Grade : %s | Level : %i | Exp : %i/%i | Dr.Points : %d ]",PlayerNameget_user_health(Spec), bufferGrads[gGrads[id]], g_level[Spec], level_exp[Spec], g_level_exp[Spec], g_points[Spec])
    }
}

public 
Level_Save(id)
{
    new 
key[64], data[256]
    new 
name[33]
    
get_user_name(id,name,32)
    
    
format(key63"%s-/"name)
    
format(data255"%i#"g_level[id], level_exp[id], g_points[id], gGrads[id])
    
    
nvault_set(g_level_datakeydata)
    return 
PLUGIN_CONTINUE;
}

public 
Level_Load(id)
{
    new 
key[64], data[256]
    new 
name[33]
    
get_user_name(id,name,32)
    
    
format(key63"%s-/"name)
    
format(data255"%i# %i# %d# %s#"g_level[id], level_exp[id], g_points[id], gGrads[id])
    
    
nvault_get(g_level_datakeydata255)
    
    
replace_all(data255"#"" ")
    
    new 
givelevel[32]
    
parse(datagivelevel31)
    
    
g_level[id] = str_to_num(givelevel)
    
    
set_task(1.0 ,"level_status"id__"b")
    
    return 
PLUGIN_CONTINUE;
}

public 
Frags_Manager()
{
    new 
aname[32], attackerattacker read_data(1)
    new 
y1;
    
get_user_name(attackeranamesizeof aname 1)
    if( ( 
level_exp[attacker] >= (g_level_exp[attacker] - 1) ) && (g_level[attacker] <= get_pcvar_num(g_level_max)) && is_user_alive(attacker) )
    {
        
g_level[attacker] = g_level[attacker] + 1;
        
level_exp[attacker] = 0;
        while( 
g_level[attacker] != )
        {
            
1;
            
g_level_exp[attacker] = get_pcvar_num(g_frags_level);
        }
        
message_begin(MSG_ONE_UNRELIABLEg_ScreenFade_attacker)
        
write_short(1<<12// duration
        
write_short(1// hold time
        
write_short(0x0000// fade type
        
write_byte(1// red
        
write_byte(200// green
        
write_byte(0// blue
        
write_byte(205// alpha
        
message_end()
        
emit_sound(attackerCHAN_STREAMsound_level_up1.0ATTN_NORM0PITCH_HIGH )
        
set_hudmessage(020000.650.500.03.02.01.0, -1)
        
show_hudmessage(0"%s Has Cut Down %i Level"anameg_level[attacker])
        
Level_Save(attacker);
    }
    else
    {
        
        if(
g_level[attacker] == get_pcvar_num(g_level_max))
            
ColorChat(attacker,GREEN,"[MS] ^1You Have Reached A Maximum Level: ^4%i"g_level[attacker])
        
level_exp[attacker] = level_exp[attacker] + 1;
        
Level_Save(attacker);
    }
}

public 
Shop_Items(iPlayer)
{
    new 
szText[555 char]
    
    
formatex(szTextcharsmax(szText), "\r[MS] \yDeathRun Shop \d[\rYour Points : %d\d]^n^n"g_points[iPlayer])
    new 
AdminMenu menu_create(szText"Dr_Shop")
    
    
formatex(szTextcharsmax(szText), "%sRespawn \r[Only Dead] \y[2 Dr-Points]"g_points[iPlayer] >= "\w":"\d")
    
menu_additem(AdminMenuszText"1"0)
    
    
formatex(szTextcharsmax(szText), "%sInvisblity \r[10 Seconds] \y[15 Dr-Points]"g_points[iPlayer] >= 15 "\w":"\d")
    
menu_additem(AdminMenuszText"2"0)    
    
    
formatex(szTextcharsmax(szText), "%sHealth \r[100 HP] \y[5 Dr-Points]"g_points[iPlayer] >= "\w":"\d")
    
menu_additem(AdminMenuszText"3"0)
    
    
formatex(szTextcharsmax(szText), "%sFlash Bang \r[] \y[4 Dr-Points]"g_points[iPlayer] >= "\w":"\d")
    
menu_additem(AdminMenuszText"4"0)
    
    
formatex(szTextcharsmax(szText), "%sSmoke Grenade \r[] \y[4 Dr-Points]"g_points[iPlayer] >= "\w":"\d")
    
menu_additem(AdminMenuszText"5"0)
    
    
formatex(szTextcharsmax(szText), "%sMultiJump \r[+1 Jump] \y[6 Dr-Points]^n"g_points[iPlayer] >= "\w":"\d")
    
menu_additem(AdminMenuszText"6"0)
    
    
menu_setprop(AdminMenuMPROP_EXITMEXIT_ALL)
    
menu_display(iPlayerAdminMenu0)
    
    return 
PLUGIN_HANDLED
}
public 
Set_p(id
{
    
g_points[id] += 6000
    g_Lifes
[id] += 600 
}

public 
Dr_Shop(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)
    
    switch(
key)
    {           
        case 
1:
        {
            if( 
g_points[id] < )
            {
                
ColorChat(id,GREEN,"[MS] ^1You Don't Have ^4[Points]")
                return 
PLUGIN_HANDLED     
            
}
            else 
                if( 
g_points[id] >= )
                
ColorChat(id,GREEN,"[MS] ^1You Bought ^4[Respawn]")  
            
ExecuteHamB(Ham_CS_RoundRespawnid)
        }
        
        case 
2:
        {
            if( 
g_points[id] < 15 )
            {
                
ColorChat(id,GREEN,"[MS] ^1You Don't Have ^4[Points]")
                return 
PLUGIN_HANDLED     
            
}
            else 
                if( 
g_points[id] >= 15 )
                
ColorChat(id,GREEN,"[MS] ^1You Bought ^4[Invisblity 10 Sec]")  
            
g_points[id] -= 15
            set_user_footsteps
(id1)
            
set_user_rendering(idkRenderFxNone000kRenderTransAlpha 0)
            
set_user_maxspeed(id,get_user_maxspeed(id) + 500)
            
            
set_task(10.0"Set_Invi",id);
            
set_task1.0"Invi_Time"id__"a",Invi_time id ] );
            
Invi_time id ] = get_pcvar_numcvar_Invi_time 
        }
        
        case 
3:
        {
            if( 
g_points[id] < )
            {
                
ColorChat(id,GREEN,"[MS] ^1You Don't Have ^4[Points]")
                return 
PLUGIN_HANDLED     
            
}    
            else 
                if( 
g_points[id] >= )
                
ColorChat(id,GREEN,"[MS] ^1You Bought ^4[100 HP]")  
            
g_points[id] -= 5
            set_user_health
(idget_user_health(id) + 100)
        }        
        
        case 
4:
        {
            if( 
g_points[id] < )
            {
                
ColorChat(id,GREEN,"[MS] ^1You Don't Have ^4[Points]")
                return 
PLUGIN_HANDLED     
            
}    
            else 
                if( 
g_points[id] >= )
                
ColorChat(id,GREEN,"[MS] ^1You Bought ^4[Flash Bang]")  
            
g_points[id] -= 4
            give_item 
(id,"weapon_flashbang")
            
cs_set_user_bpammo(idCSW_FLASHBANGcs_get_user_bpammo(idCSW_FLASHBANG) + 1)
        }        
        case 
5:
        {
            if( 
g_points[id] < )
            {
                
ColorChat(id,GREEN,"^4[MS] ^1You Don't Have ^4[Points]")
                return 
PLUGIN_HANDLED     
            
}
            else 
                if( 
g_points[id] >= )
                
ColorChat(id,GREEN,"^4[MS] ^1You Bought ^4[Smoke Grenade]")  
            
g_points[id] -= 4
            give_item 
(id,"weapon_smokegrenade")
            
cs_set_user_bpammo(idCSW_SMOKEGRENADEcs_get_user_bpammo(idCSW_SMOKEGRENADE) + 1)
        }
        case 
6:
        {
            if( 
g_points[id] < )
            {
                
ColorChat(id,GREEN,"[MS] ^1You Don't Have ^4[Points]")
                return 
PLUGIN_HANDLED     
            
}    
            else 
                if( 
g_points[id] >= )
                
ColorChat(id,GREEN,"[MS] ^1You Bought ^4[MultiJump +1]")  
            
g_points[id] -= 6
            g_jump
(id)
        }        
        
    }
    return 
PLUGIN_HANDLED
}
public 
Set_Invi(id)
{
    
ColorChat(id,GREEN,"[MS] ^1Invisblity Is ^4[OFF]")     
    
set_user_footsteps(id0)    
    
set_user_rendering(id0
    return 
PLUGIN_HANDLED


public 
Invi_Time(id
{     
    if(
is_valid_ent(id) && is_user_alive(id))
    {
        
Invi_time id ] = Invi_time id ] - 1;
        
set_hudmessage(025500.750.7501.01.10.00.0, -1)
        
show_hudmessage(id"Invisiblity Time: %d",Invi_timeid ])
        
        }else{
        
remove_task(id)
    }
}


public 
ShowPoints(id)
{
    static 
opcion[64]
    
    
formatex(opcioncharsmax(opcion),"\r[MS] \yShow Players Points :")
    new 
iMenu menu_create(opcion"Handlegolds")
    
    new 
players[32], pnumtempid
    
new szName[32], szTempid[10]
    
    
get_players(playerspnum"ch")
    
    for( new 
ii<pnumi++ )
    {
        
        
tempid players[i]
        
        
get_user_name(tempidszName31)
        
num_to_str(tempidszTempid9)
        
        
formatex(opcion,127,"\w%s y- \d[\r%i Points\d]",szNameg_points[tempid]);
        
menu_additem(iMenuopcionszTempid0)
    }
    
    
menu_display(idiMenu)
    return 
PLUGIN_HANDLED
}

public 
Handlegolds(idmenuitem)
{
    if(
item == MENU_EXIT)
    {
        return 
PLUGIN_HANDLED
    
}
    
    new 
data[6], name[64]
    new 
accesscallback
    
    menu_item_getinfo 
(menuitemaccessdata5name63callback)
    new 
tempid str_to_num (data)
    
    new 
szName[33], szPlayerName[33]
    
    
get_user_name(idszName32)
    
get_user_name(tempidszPlayerName32)
    
    
ColorChat(idRED"^4[MS] ^1User ^4%s ^1Have ^4%i ^3Points ^4!",szPlayerNameg_points[tempid])
    
    
ShowPoints(id);
    
    return 
PLUGIN_CONTINUE
}


public 
Donate_Menu(id)
{
    new 
iMenu menu_create("\r[MS] \yDonate Players Menu""handleDonate");
    
    new 
iPlayers[32], szName[32], szKey[3], iNumiPlayer;
    
get_players(iPlayersiNum,"ch");
    
    for( new 
iiNumi++ )
    {
        
iPlayer iPlayers[i];
        
        
num_to_str(iPlayerszKeycharsmax(szKey));
        
get_user_name(iPlayerszNamecharsmax(szName));
        
        
menu_additem(iMenuszNameszKey);
    }
    
    
menu_setprop(iMenuMPROP_EXITNAME"Back");
    
menu_display(idiMenu0);
    return 
0;
}


public 
handleDonate(idmenuitem)
{
    if( 
item == MENU_EXIT )
    {
        
menu_destroy(menu);
        return 
PLUGIN_HANDLED;
    }
    
    new 
szData[6], iAccessiCallback;
    
menu_item_getinfo(menuitemiAccessszDatacharsmax(szData), __iCallback);
    
    
g_iTarget[id] = str_to_num(szData);
    new 
szName[32];
    
get_user_name(g_iTarget[id], szNamecharsmax(szName));
    
    
client_cmd(id"messagemode Donate");
    return 
PLUGIN_HANDLED;
}


public 
CmdDonate(id)
{
    new 
szArg[5];
    
read_argv(1szArgcharsmax(szArg));
    
    
    new 
iValue str_to_num(szArg);
    
    if( 
iValue g_points[id] )
    {
        
ColorChat(id,GREEN"^4[MS] ^1You Only Have ^4%i ^3Points ^4!",g_points[id]);
        return 
PLUGIN_HANDLED;
    }
    
    new 
iTarget g_iTarget[id];
    
    if( !
iTarget )
    {
        return 
PLUGIN_HANDLED;
    }
    
    if( 
iTarget == id )
    {
        return 
PLUGIN_HANDLED;
    }
    
    
g_points[id] -= iValue;
    
    
g_points[iTarget] += iValue;
    
    new 
szName[2][32];
    
get_user_name(iTargetszName[0], charsmax(szName[]));
    
get_user_name(idszName[1], charsmax(szName[]));
    
    
ColorChat(id,GREEN"^4[MS] ^1You Donated ^4%i^3 Points ^1To ^4%s !"iValueszName[0]);
    
ColorChat(iTarget,GREEN"^4[MS] ^3%s^1 Gaves You ^4%i Points"szName[1], iValue);
    
    
    return 
PLUGIN_HANDLED;
}


public 
cmd_showgolds(id)
{    
    
set_hudmessage(02552550.00.8706.012.0)
    
show_hudmessage(id"You Have %d Points"g_points [id] )
    
    
ColorChatidGREEN"^4[MS] ^1You Have ^4%d ^3Points ^4!"g_pointsid ] );    
}


public 
cmd_set(id,level,cid)
{
    if(!
cmd_access(id,level,cid,3))
        return 
PLUGIN_HANDLED
    
    
else
    {
        new 
target[32], pid
        read_argv
(1,target,31)
        
pid cmd_target(id,target,2)
        
        new 
amountstr[10], amount
        read_argv
(2,amountstr,9)
        
amount str_to_num(amountstr)
        
        new 
name[32], tname[32]
        
get_user_name(id,name,31)
        
get_user_name(pid,tname,31)
        
        
g_points[pid] += amount
        ColorChat
(idGREEN"^4[MS] ^1You Gave ^4%d ^3Points ^1To ^4%s ^1"amounttname)
        
ColorChat(pidGREEN"^4[MS] ^1Owner ^4%s ^1Gave ^4%d ^1Points ^1To ^3You ^4! ^1Now You Have ^4%d ^3Points ^4!"nameamount)
    }    
    return 
PLUGIN_HANDLED
}


public 
cmd_reset(id,level,cid)
{
    if(!
cmd_access(id,level,cid,3))
        return 
PLUGIN_HANDLED
    
    
else
    {
        new 
target[32], pid
        read_argv
(1,target,31)
        
pid cmd_target(id,target,2)
        
        new 
amountstr[10], amount
        read_argv
(2,amountstr,9)
        
amount str_to_num(amountstr)
        
        new 
name[32], tname[32]
        
get_user_name(id,name,31)
        
get_user_name(pid,tname,31)
        
        if((
g_points[pid] -= amount) < 0)
            
        
amount g_points[pid]
        
        
g_points[pid] -= amount
        ColorChat
(idGREEN"^4[MS] ^1You Removed ^4%d ^3Points ^1From ^4%s ^1!"amounttname)
        
ColorChat(pidGREEN"^4[MS] ^1Owner ^4%s ^1Removed From ^3You ^4%d ^3Points ^4! ^1Now You Have ^4%d ^3Points ^4!"nameamount)
    }
    return 
PLUGIN_HANDLED

MULTIJUMP :

PHP Code:
#include <amxmodx>
#include <fakemeta>
#include <hamsandwich>


new jumpnum[33] = 0;
new 
bool:dojump[33] = false;
new 
g_multijumps[33] = 0;
new 
bool:has_jump[33]

public 
plugin_init()
{
    
register_plugin("Jump""1.5""med*");
    
    
RegisterHam(Ham_Spawn"player""jump_off"1)
    
register_forward(FM_PlayerPreThink"FW_PlayerPreThinkz");
    
register_forward(FM_PlayerPostThink"FW_PlayerPostThinkz");
}

public 
client_connect(id
{        
    if(
get_user_flags(id) & ADMIN_KICK || has_jump[id]) 
    {     
        
has_jump[id]=true
    



/*public client_PreThink(id) 

    if(get_user_flags(id) & ADMIN_KICK || has_jump[id])  
    { 
        g_multijumps[id] = true
    }
}*/

public jump_off(id)
{
    for (new 
idid <= 32id++) g_multijumps[id] = false;
}

public 
FW_PlayerPreThinkz(id)
{
    if(!
g_multijumps[id]) return PLUGIN_CONTINUE
    
new nbut pev(id,pev_button);
    new 
obut pev(id,pev_oldbuttons);
    if((
nbut IN_JUMP) && !(pev(id,pev_flags) & FL_ONGROUND) && !(obut IN_JUMP))
    {
        if(
jumpnum[id] < 1)
        {
            
dojump[id] = true;
            
jumpnum[id]++;
            return 
PLUGIN_CONTINUE
        
}
    }
    if((
nbut IN_JUMP) && (pev(id,pev_flags) & FL_ONGROUND))
    {
        
jumpnum[id] = 0;
        return 
PLUGIN_CONTINUE
    
}
    return 
PLUGIN_CONTINUE
}

public 
FW_PlayerPostThinkz(id)
{
    if(!
g_multijumps[id]) return PLUGIN_CONTINUE
    
if(dojump[id] == true)
    {
        new 
Float:velocity[3];
        
pev(id,pev_velocity,velocity);
        
velocity[2] = random_float(265.0,285.0);
        
set_pev(id,pev_velocity,velocity)
        
dojump[id] = false
        
return PLUGIN_CONTINUE
    
}
    return 
PLUGIN_CONTINUE
}    

public 
plugin_natives() {
    
register_native("g_jump""native_jump"1);    
}  

public 
native_jump(id)
{
    
g_multijumps[id] = true;    

Thanks! perfectly works
Suntox is offline
Houssam Benmouna
Senior Member
Join Date: Apr 2016
Old 06-03-2017 , 09:46   Re: [REQ]Multijump
Reply With Quote #6

No Problem ;) It's nothing
Houssam Benmouna is offline
DjSoftero
Veteran Member
Join Date: Nov 2014
Location: Lithuania
Old 06-03-2017 , 12:42   Re: [REQ]Multijump
Reply With Quote #7

Quote:
Originally Posted by DjSoftero View Post
lol what is this
PHP Code:
public plugin_init()
{
    
RegisterHam(Ham_Spawn"player""jump_off"1)

}


public 
jump_off(id)
{
    for (new 
idid <= 32id++) g_multijumps[id] = false;

Quote:
-_- It's for offing the multijump in the spawn only who was buy it in the shop will be enjoy with it if u know what i mean and if the player buy it and he dead it's will be off if u know what i mean
i know it`s for disabling the jump, but you did it wrong.
PHP Code:
      RegisterHam(Ham_Spawn"player""jump_off"1)//this is called for every player individualy.


//so this:
public jump_off(id)
{
    for (new 
idid <= 32id++) g_multijumps[id] = false;
}

//should be like this:
public jump_off(id)
   
g_multijumps[id] = false 
you were basicly doing a loop inside of another loop for no reason at all

Last edited by DjSoftero; 06-03-2017 at 12:46. Reason: forgot [php] tags
DjSoftero is offline
Houssam Benmouna
Senior Member
Join Date: Apr 2016
Old 06-03-2017 , 13:19   Re: [REQ]Multijump
Reply With Quote #8

ah yes sorry but the plugin still working that's has no matter
Houssam Benmouna is offline
OciXCrom
Veteran Member
Join Date: Oct 2013
Location: Macedonia
Old 06-03-2017 , 18:45   Re: [REQ]Multijump
Reply With Quote #9

Of course it matters. You made it so when a player respawns, it will reset it for all players.
__________________
OciXCrom is offline
Send a message via Skype™ to OciXCrom
Houssam Benmouna
Senior Member
Join Date: Apr 2016
Old 06-03-2017 , 20:13   Re: [REQ]Multijump
Reply With Quote #10

I do not care... Leave me do what I want I do not low any one tell my what I should I do
Houssam Benmouna 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 16:54.


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