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

Edit Plugins


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Famdl
Junior Member
Join Date: Mar 2017
Old 05-29-2017 , 16:43   Edit Plugins
Reply With Quote #1

hi Can anyone Edit These Plugins To Their Functions Can Only used By Vips?(Flag T)
And Default Mode For jumpmenu Be Regular Jump
Ty
Attached Files
File Type: sma Get Plugin or Get Source (cso_emotion_v23.sma - 499 views - 11.5 KB)
File Type: sma Get Plugin or Get Source (jumpmenu.sma - 418 views - 6.5 KB)

Last edited by Famdl; 05-30-2017 at 00:13.
Famdl is offline
Sanjay Singh
Veteran Member
Join Date: Sep 2016
Old 05-29-2017 , 23:47   Re: Edit Plugins
Reply With Quote #2

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

#define PLUGIN "CSO Emotion"
#define VERSION "2.3"
#define AUTHOR "Dias"

#define MAX_EMOTION 6
#define BUTTON_HOLDTIME 0.5
#define USE_TYPE 1 // 1 = J Button (Cheer); 2 = Hold R Button

#define TASK_EMOTION 1962
#define TASK_HOLDTIME 1963

new const p_model[] = "models/cso_emotion/cso_emotion2.mdl"
new const v_model[] = "models/cso_emotion/v_cso_emotion_v23.mdl"
new const Resource_Sound[MAX_EMOTION][] = 
{
    
"cso_emotion/man_angry.wav",
    
"cso_emotion/man_dance.wav",
    
"cso_emotion/man_hi.wav",
    
"cso_emotion/man_joy.wav",
    
"cso_emotion/man_procoke.wav",
    
"cso_emotion/man_special.wav"        
}

new 
Emotion_Name[MAX_EMOTION][] = 
{
    
"Hi",
    
"Provoke",
    
"Joy",
    
"Angry",
    
"Dance",
    
"Special 1 (Enzo)"
}

new 
Float:Emotion_Time[MAX_EMOTION] = 
{
    
3.0,
    
7.0,
    
4.5,
    
3.8,
    
6.7,
    
6.0
}

enum
{
    
EMO_HI 0,
    
EMO_PROVOKE,
    
EMO_JOY,
    
EMO_ANGRY,
    
EMO_DANCE,
    
EMO_SPECIAL1
}

new 
g_InDoingEmo[33], g_AnimEnt[33], g_AvtEnt[33], g_OldWeapon[33], g_OldKnifeModel[33][128]
new 
g_MaxPlayersg_HoldingButton[33], g_UseType

public plugin_init()
{
    
register_plugin(PLUGINVERSIONAUTHOR)
    
    
register_event("HLTV""Event_NewRound""a""1=0""2=0")
    
register_event("DeathMsg""Event_DeathMsg""a")
    
    
register_forward(FM_CmdStart"fw_CmdStart")
    
register_forward(FM_AddToFullPack"fw_AddToFullPack_Post"1)
    
register_forward(FM_Think"fw_Think")
    
    
RegisterHam(Ham_Spawn"player""fw_PlayerSpawn_Post"1)
    
    
g_UseType USE_TYPE
    
if(g_UseType == 1register_clcmd("cheer""Open_EmoMenu")
    
    
g_MaxPlayers get_maxplayers()
}

public 
plugin_precache()
{
    
engfunc(EngFunc_PrecacheModelp_model)
    
engfunc(EngFunc_PrecacheModelv_model)
    
    for(new 
0sizeof(Resource_Sound); i++)
        
engfunc(EngFunc_PrecacheSoundResource_Sound[i])
}

public 
Event_NewRound()
{
    for(new 
0g_MaxPlayersi++)
    {
        if(!
is_user_connected(i))
            continue
            
        
Reset_Var(i)
    }
}

public 
Event_DeathMsg()
{
    static 
VictimVictim read_data(2)
    
Do_Reset_Emotion(Victim)
}

public 
fw_PlayerSpawn_Post(id)
{
    if(
g_UseType == 1)
        
client_printc(id"!g[CSO Emotion]!n Press !g[J]!n to use !tEmotion!n")
    else if(
g_UseType == 2)
        
client_printc(id"!g[CSO Emotion]!n Hold !g[R]!n to use !tEmotion!n")
}

public 
Reset_Var(id)
{
    if(!
is_user_connected(id))
        return
        
    if(
g_InDoingEmo[id])
    {
        if(
get_user_weapon(id) == CSW_KNIFE)
            
set_pev(idpev_viewmodel2g_OldKnifeModel[id])
    }
        
    if(
task_exists(id+TASK_EMOTION)) remove_task(id+TASK_EMOTION)    
        
    
Set_Entity_Invisible(id0)
    
    if(
pev_valid(g_AnimEnt[id])) engfunc(EngFunc_RemoveEntityg_AnimEnt[id])
    if(
pev_valid(g_AvtEnt[id])) engfunc(EngFunc_RemoveEntityg_AvtEnt[id])
    
    
g_InDoingEmo[id] = 0
    g_AnimEnt
[id] = g_AvtEnt[id] = 0    
    g_HoldingButton
[id] = 0
}

public 
Open_EmoMenu2(id)
{
    
id -= TASK_HOLDTIME
    Open_EmoMenu
(id)
}

public 
Open_EmoMenu(id)
{
if(
get_user_flags(id) & ADMIN_LEVEL_H)  
   {
    if(!
is_user_alive(id))
        return
    if(
g_InDoingEmo[id])
        return
        
    static 
menuNumberId[6]
    
menu menu_create("CSO Emotion""MenuHandle_Emo")
    
    for(new 
0MAX_EMOTIONi++)
    {
        
num_to_str(iNumberIdsizeof(NumberId))
        
menu_additem(menuEmotion_Name[i], NumberId)
    }
    
    
menu_setprop(menuMPROP_EXITMEXIT_ALL)
    
menu_display(idmenu0)    
}
return
}

public 
MenuHandle_Emo(idmenuitem)
{
    if(
item == MENU_EXIT)
    {
        
menu_destroy(menu)
        return
    }
    if(!
is_user_alive(id))
        return
    if(
g_InDoingEmo[id])
        return
        
    static 
Data[6], Name[64], AccessCallback
    menu_item_getinfo
(menuitemAccessDatacharsmax(Data), Namecharsmax(Name), Callback)
    
    static 
EmoIdEmoId str_to_num(Data)
    
    if(
EmoId >= MAX_EMOTION)
        return
        
    
Set_Emotion_Start(idEmoId)
}

public 
Set_Emotion_Start(idEmoId)
{
    
g_InDoingEmo[id] = 1
    Set_Entity_Invisible
(id1)
    
    
Create_AvtEnt(id)
    
Create_AnimEnt(id)
    
    if(!
Check_Avalible(id)) return
    
    
Do_Set_Emotion(idEmoId)
}

public 
Create_AvtEnt(id)
{
    if(
pev_valid(g_AvtEnt[id]))
        return
    
    
g_AvtEnt[id] = engfunc(EngFunc_CreateNamedEntityengfunc(EngFunc_AllocString"info_target"))

    if(!
pev_valid(g_AvtEnt[id])) 
        return    
    
    static 
entent g_AvtEnt[id]
    
set_pev(entpev_classname"avatar")
    
set_pev(entpev_ownerid)
    
set_pev(entpev_movetypeMOVETYPE_FOLLOW)
    
set_pev(entpev_solidSOLID_NOT)

    
// Set Model
    
static PlayerModel[64]
    
fm_cs_get_user_model(idPlayerModelsizeof(PlayerModel))
    
    
format(PlayerModelsizeof(PlayerModel), "models/player/%s/%s.mdl"PlayerModelPlayerModel)
    
engfunc(EngFunc_SetModelg_AvtEnt[id], PlayerModel)    
    
    
// Set Avatar
    
set_pev(entpev_bodypev(idpev_body))
    
set_pev(entpev_skinpev(idpev_skin))
    
    
set_pev(entpev_renderamtpev(idpev_renderamt))
    static 
Float:Color[3]; pev(idpev_rendercolorColor)
    
set_pev(entpev_rendercolorColor)
    
set_pev(entpev_renderfxpev(idpev_renderfx))
    
set_pev(entpev_rendermodepev(idpev_rendermode))
    
    
Set_Entity_Invisible(ent0)
}

public 
Create_AnimEnt(id)
{
    if(
pev_valid(g_AnimEnt[id]))
        return
            
    
g_AnimEnt[id] = engfunc(EngFunc_CreateNamedEntityengfunc(EngFunc_AllocString"info_target"))
    
    if(!
pev_valid(g_AnimEnt[id])) 
        return
        
    static 
entent g_AnimEnt[id]
    
set_pev(entpev_classname"AnimEnt")
    
set_pev(entpev_ownerid)
    
set_pev(entpev_movetypeMOVETYPE_TOSS)
    
    
engfunc(EngFunc_SetModelentp_model)
    
engfunc(EngFunc_SetSizeent, {-16.0, -16.00.0}, {16.016.072.0})
    
set_pev(entpev_solidSOLID_BBOX)
    
    
engfunc(EngFunc_DropToFloorent)
    
Set_Entity_Invisible(ent0)
    
    
set_pev(entpev_nextthinkget_gametime() + 0.1)
}

public 
Check_Avalible(id)
{
    if(!
pev_valid(g_AnimEnt[id]) || !pev_valid(g_AvtEnt[id]))
    {
        
Do_Reset_Emotion(id)
        return 
0
    
}
        
    return 
1
}

public 
Do_Set_Emotion(idEmoId)
{
    
// Set Player Emotion
    
static Float:Origin[3], Float:Angles[3], Float:Velocity[3]
        
    
pev(idpev_originOrigin); pev(idpev_anglesAngles); pev(idpev_velocityVelocity)
        
    
Origin[2] -= 36.0
    set_pev
(g_AnimEnt[id], pev_originOrigin)
        
    
Angles[0] = 0.0Angles[2] = 0.0
    set_pev
(g_AnimEnt[id], pev_anglesAngles)
    
set_pev(g_AnimEnt[id], pev_velocityVelocity)
        
    
set_pev(g_AvtEnt[id], pev_aimentg_AnimEnt[id])
    
Set_Entity_Anim(g_AnimEnt[id], EmoId1)
    
    
// Set Hand Emotion
    
g_OldWeapon[id] = get_user_weapon(id)
    
fm_give_item(id"weapon_knife")
    
engclient_cmd(id"weapon_knife")
    
    
pev(idpev_viewmodel2g_OldKnifeModel[id], 127)
    
set_pev(idpev_viewmodel2v_model)
    
Set_Weapon_Anim(idEmoId)
    
    static 
KnifeEntKnifeEnt fm_get_user_weapon_entity(idCSW_KNIFE)
    if(
pev_valid(KnifeEnt)) set_pdata_float(KnifeEnt48Emotion_Time[EmoId], 4)
    
    if(
task_exists(id+TASK_EMOTION)) remove_task(id+TASK_EMOTION)
    
set_task(Emotion_Time[EmoId], "Reset_Emotion"id+TASK_EMOTION)
}

public 
Reset_Emotion(id)
{
    
id -= TASK_EMOTION
    
    
if(!is_user_connected(id))
        return
    if(!
g_InDoingEmo[id])
        return
        
    
Do_Reset_Emotion(id)
}

public 
Do_Reset_Emotion(id)
{
    if(!
is_user_connected(id))
        return
    if(!
g_InDoingEmo[id])
        return
        
    if(
task_exists(id+TASK_EMOTION)) remove_task(id+TASK_EMOTION)
    
Set_Entity_Invisible(id0)
    
    if(
pev_valid(g_AnimEnt[id])) engfunc(EngFunc_RemoveEntityg_AnimEnt[id])
    if(
pev_valid(g_AvtEnt[id])) engfunc(EngFunc_RemoveEntityg_AvtEnt[id])
    
    
g_AnimEnt[id] = g_AvtEnt[id] = 0
    
    
if(is_user_alive(id))
    {
        if(
get_user_weapon(id) == CSW_KNIFE)
            
set_pev(idpev_viewmodel2g_OldKnifeModel[id])
        
        static 
MyOldWeaponMyOldWeapon g_OldWeapon[id]
        static 
Classname[64]; get_weaponname(MyOldWeaponClassnamesizeof(Classname))
        
engclient_cmd(idClassname)
    }
    
    
g_InDoingEmo[id] = 0
}

public 
fw_CmdStart(iduc_handleseed)
{
    if(!
is_user_alive(id))
        return

    
    if(!
g_InDoingEmo[id] && g_UseType == 2)
    {
        static 
UseButtonUseOldButton
        UseButton 
= (get_uc(uc_handleUC_Buttons) & IN_RELOAD)
        
UseOldButton = (pev(idpev_oldbuttons) & IN_RELOAD)
        
        if(
UseButton)
        {
            if(!
UseOldButton && !g_InDoingEmo[id])
            {
                
g_HoldingButton[id] = 1
                set_task
(BUTTON_HOLDTIME"Open_EmoMenu2"id+TASK_HOLDTIME)
            }
        } else {
            if(
UseOldButton && g_HoldingButton[id])
            {
                if(
task_exists(id+TASK_HOLDTIME)) 
                {
                    
remove_task(id+TASK_HOLDTIME)
                    
g_HoldingButton[id] = 0
                
}
            }
        }    
        
        return
    }
        
    static 
CurButtonCurButton get_uc(uc_handleUC_Buttons)
    
    if((
CurButton IN_ATTACK) || (CurButton IN_ATTACK2) || (CurButton IN_DUCK) || (CurButton IN_JUMP))
    {
        
Do_Reset_Emotion(id)
        return
    }
    
    static 
Float:Velocity[3], Float:Vector
    pev
(idpev_velocityVelocity); Vector vector_length(Velocity)
    
    if(
Vector != 0.0)
    {
        
Do_Reset_Emotion(id)
        return
    }
    
    
/*
    if(get_user_weapon(id) != CSW_KNIFE)
    {
        Do_Reset_Emotion(id)
        return
    }*/
}

public 
fw_AddToFullPack_Post(es_handleenthosthostflagsplayerpSet)
{
    if(!
is_user_alive(host) && !pev_valid(ent))
        return 
FMRES_IGNORED
    
if(g_AnimEnt[host] != ent)
        return 
FMRES_IGNORED
            
    set_es
(es_handleES_Effectsget_es(es_handleES_Effects) | EF_NODRAW)
    return 
FMRES_IGNORED
}

public 
fw_Think(ent)
{
    if(!
pev_valid(ent))
        return
        
    static 
Classname[64]
    
pev(entpev_classnameClassnamesizeof(Classname))
    
    if(
equal(Classname"AnimEnt"))
    {
        static 
idid pev(entpev_owner)
        if(!
is_user_alive(id))
            return
            
        
// Set Player Emotion
        
static Float:Angles[3], Float:Angles2[3]
        
        
pev(idpev_anglesAngles)
        
pev(entpev_anglesAngles2)
        
        
Angles[0] = 0.0Angles[2] = 0.0
        
        
if(Angles[1] != Angles2[1]) set_pev(entpev_anglesAngles)
        
set_pev(entpev_nextthinkget_gametime() + 0.05)
        
        if(
pev(entpev_effects) == (pev(entpev_effects) | EF_NODRAW)) Set_Entity_Invisible(ent0)
    }
}

stock fm_cs_get_user_model(idModel[], Len)
{
    if(!
is_user_connected(id))
        return
        
    
engfunc(EngFunc_InfoKeyValueengfunc(EngFunc_GetInfoKeyBufferid), "model"ModelLen)
}

stock Set_Entity_Invisible(entInvisible 1)
{
    if(!
pev_valid(ent))
        return
        
    
set_pev(entpev_effectsInvisible == pev(entpev_effects) & ~EF_NODRAW pev(entpev_effects) | EF_NODRAW)
}

stock Set_Entity_Anim(entAnimResetFrame)
{
    if(!
pev_valid(ent))
        return
        
    
set_pev(entpev_animtimeget_gametime())
    
set_pev(entpev_framerate1.0)
    
set_pev(entpev_sequenceAnim)
    if(
ResetFrameset_pev(entpev_frame0)
}


stock Set_Weapon_Anim(idAnim)
{
    if(!
is_user_alive(id))
        return
        
    
set_pev(idpev_weaponanimAnim)

    
message_begin(MSG_ONE_UNRELIABLESVC_WEAPONANIM_id)
    
write_byte(Anim)
    
write_byte(pev(idpev_body))
    
message_end()
}

stock client_printc(index, const text[], any:...)
{
    new 
szMsg[128];
    
vformat(szMsgsizeof(szMsg) - 1text3);

    
replace_all(szMsgsizeof(szMsg) - 1"!g""^x04");
    
replace_all(szMsgsizeof(szMsg) - 1"!n""^x01");
    
replace_all(szMsgsizeof(szMsg) - 1"!t""^x03");

    if(
index == 0)
    {
        for(new 
0g_MaxPlayersi++)
        {
            if(!
is_user_connected(i))
                continue
            
            
message_begin(MSG_ONE_UNRELIABLEget_user_msgid("SayText"), _i)
            
write_byte(i)
            
write_string(szMsg)
            
message_end()
        }        
    } else {
        
message_begin(MSG_ONE_UNRELIABLEget_user_msgid("SayText"), _index);
        
write_byte(index);
        
write_string(szMsg);
        
message_end();
    }
}
/* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
*{\\ rtf1\\ ansi\\ deff0{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ lang1033\\ f0\\ fs16 \n\\ par }
*/ 
__________________
Sanjay Singh is offline
Send a message via AIM to Sanjay Singh
Sanjay Singh
Veteran Member
Join Date: Sep 2016
Old 05-29-2017 , 23:50   Re: Edit Plugins
Reply With Quote #3

PHP Code:
#include <amxmodx>
#include <engine>

#define PLUGIN    "Jump Menu"
#define VERSION "2.0"
#define AUTHOR    "v3x"

#define MAX_PLAYERS    33

static const CVAR_MAX_JUMPS[]     = "amx_maxjumps";
static const 
CVAR_WJ_STRENGTH[]    = "walljump_strength";
static const 
CVAR_WJ_NUM[]    = "walljump_num";
static const 
CVAR_WJ_TEAM[]    = "walljump_team"

new 
PCVAR_MAX_JUMPS;
new 
PCVAR_WJ_STRENGTH;
new 
PCVAR_WJ_NUM;
new 
PCVAR_WJ_TEAM;

new 
bool:caughtJump[MAX_PLAYERS];
new 
bool:doWJump[MAX_PLAYERS];
new 
Float:jumpVeloc[MAX_PLAYERS][3];
new 
newButton[MAX_PLAYERS];
new 
numJumps[MAX_PLAYERS];
new 
team[MAX_PLAYERS];
new 
wallteam;

public 
plugin_init() 
{
    
register_plugin(PLUGIN VERSION AUTHOR);

    
register_clcmd("say /jumpmenu"    "ClCmd_JumpMenu");
    
register_clcmd("jumpmenu"    "ClCmd_JumpMenu");

    if(!
cvar_exists(CVAR_MAX_JUMPS))
        
PCVAR_MAX_JUMPS    register_cvar(CVAR_MAX_JUMPS "2");
    else
        
PCVAR_MAX_JUMPS = -1;

    
PCVAR_WJ_STRENGTH    register_cvar(CVAR_WJ_STRENGTH    "300.0");
    
PCVAR_WJ_NUM         register_cvar(CVAR_WJ_NUM        "3");
    
PCVAR_WJ_TEAM        register_cvar(CVAR_WJ_TEAM        "0");

    
register_touch("player" "worldspawn"        "Touch_World");
    
register_touch("player" "func_wall"        "Touch_World");
    
register_touch("player" "func_breakable"    "Touch_World");
}

enum 
{
    
JUMP_REGULAR 0,
    
JUMP_MULTI,
    
JUMP_BUNNY,
    
JUMP_WALL
}

new 
g_iJumpType[33];
new 
jumpnum[33];
new 
bool:dojump[33];

public 
client_putinserver(id
{
    
g_iJumpType[id] = JUMP_REGULAR;
    
jumpnum[id] = 0;
    
dojump[id] = false;
}

public 
client_disconnect(id
{
    
jumpnum[id] = 0;
    
dojump[id] = false;

    
caughtJump[id] = false;
    
doWJump[id] = false;
    for(new 
03x++)
        
jumpVeloc[id][x] = 0.0;
    
newButton[id] = 0;
    
numJumps[id] = 0;
}

public 
ClCmd_JumpMenu(id
{
    new 
menu menu_create("Select your jump type:" "menuHandler_Jump");

    
menu_additem(menu "Multi-jump"    "" 0);
    
menu_additem(menu "Bunnyhop"        "" 0);
    
menu_additem(menu "Wall Jump^n"    "" 0);
    
menu_additem(menu "Regular"        "" 0);

    
menu_setprop(menu MPROP_EXIT MEXIT_ALL);
    
    
menu_display(id menu 0);

    new 
arg[21];
    
read_argv(arg 20);
    if(!
contain(arg "say"))
        return 
PLUGIN_CONTINUE;

    return 
PLUGIN_HANDLED;
}

public 
menuHandler_Jump(id menu item
{
    if(
item == MENU_EXIT
    {
        
menu_destroy(menu);
        return 
PLUGIN_HANDLED;
    }
    
    new 
szCommand[6] , szName[64];
    new 
access callback;
    
    
menu_item_getinfo(menu item access szCommand szName 63 callback);
    
    if(
equal(szName "Multi-jump")) 
    {
        
client_print(id print_chat "[AMXX] Multi-jump enabled");
        
g_iJumpType[id] = JUMP_MULTI;

        
menu_destroy(menu); return PLUGIN_CONTINUE;
    }
    else if(
equal(szName "Bunnyhop")) 
    {
        
client_print(id print_chat "[AMXX] Bunnyhop enabled");
        
g_iJumpType[id] = JUMP_BUNNY;

        
menu_destroy(menu); return PLUGIN_CONTINUE;
    }
    else if(
equal(szName "Wall Jump^n"))
    {
        
client_print(id print_chat "[AMXX] Walljump enabled");
        
g_iJumpType[id] = JUMP_WALL;

        
menu_destroy(menu); return PLUGIN_CONTINUE;
    }
    else 
    {
        
client_print(id print_chat "[AMXX] Regular jumping enabled");
        
g_iJumpType[id] = JUMP_REGULAR;

        
menu_destroy(menu); return PLUGIN_CONTINUE;
    }
    
    
menu_destroy(menu);
    
    return 
PLUGIN_HANDLED;
}

public 
client_PreThink(id
{
    if(!
is_user_alive(id) || !g_iJumpType[id])
        return 
PLUGIN_CONTINUE;
        
    if(
g_iJumpType[id] == JUMP_BUNNY
    {
        
entity_set_float(idEV_FL_fuser20.0)     // Disable slow down after jumping

        // Code from CBasePlayer::Jump (player.cpp)     Make a player jump automatically
        
if (entity_get_int(idEV_INT_button) & 2) {    // If holding jump
            
new flags entity_get_int(idEV_INT_flags)

            if (
flags FL_WATERJUMP)
                return 
PLUGIN_CONTINUE
            
if ( entity_get_int(idEV_INT_waterlevel) >= )
                return 
PLUGIN_CONTINUE
            
if ( !(flags FL_ONGROUND) )
                return 
PLUGIN_CONTINUE

            
new Float:velocity[3]
            
entity_get_vector(idEV_VEC_velocityvelocity)
            
velocity[2] += 250.0
            entity_set_vector
(idEV_VEC_velocityvelocity)

            
entity_set_int(idEV_INT_gaitsequence6)    // Play the Jump Animation
            
            
return PLUGIN_CONTINUE;
        }
    }
    else if(
g_iJumpType[id] == JUMP_MULTI
    {
        if((
get_user_button(id) & IN_JUMP) && !(get_entity_flags(id) & FL_ONGROUND) && !(get_user_oldbutton(id) & IN_JUMP)) 
        {
            if(
jumpnum[id] < get_pcvar_num(PCVAR_MAX_JUMPS)) 
            {
                
dojump[id] = true
                jumpnum
[id]++
                return 
PLUGIN_CONTINUE
            
}
        }
        if((
get_user_button(id) & IN_JUMP) && (get_entity_flags(id) & FL_ONGROUND)) 
        {
            
jumpnum[id] = 0
            
return PLUGIN_CONTINUE
        
}
    }
    else if(
g_iJumpType[id] == JUMP_WALL)
    {
        
wallteam get_pcvar_num(PCVAR_WJ_TEAM)
        
team[id] = get_user_team(id)
        if(!
wallteam || wallteam == team[id]) 
        {
            
newButton[id] = get_user_button(id)
            new 
oldButton get_user_oldbutton(id)
            new 
flags get_entity_flags(id)
        
            
//reset if we are on ground
            
if(caughtJump[id] && (flags FL_ONGROUND)) 
            {
                
numJumps[id] = 0
                caughtJump
[id] = false
            
}    
        
            
//begin when we jump
            
if((newButton[id] & IN_JUMP) && (flags FL_ONGROUND) && !caughtJump[id] && !(oldButton IN_JUMP) && !numJumps[id]) 
            {
                
caughtJump[id] = true
                entity_get_vector
(id,EV_VEC_velocity,jumpVeloc[id])
                
jumpVeloc[id][2] = get_pcvar_float(PCVAR_WJ_STRENGTH)
            }
        }
    }
    return 
PLUGIN_CONTINUE;
}

public 
client_PostThink(id
{
    if((
g_iJumpType[id] != JUMP_MULTI && g_iJumpType[id] != JUMP_WALL) || !is_user_alive(id)) 
        return 
PLUGIN_CONTINUE

    
if(dojump[id]) 
    {
        new 
Float:velocity[3]    
        
entity_get_vector(id,EV_VEC_velocity,velocity)
        
velocity[2] = random_float(265.0,285.0)
        
entity_set_vector(id,EV_VEC_velocity,velocity)
        
dojump[id] = false

        
return PLUGIN_CONTINUE
    
}
    
//do velocity if we walljumped
    
else if(doWJump[id]) 
    {
        
entity_set_vector(id,EV_VEC_velocity,jumpVeloc[id])
            
        
doWJump[id] = false
            
        
if(numJumps[id] >= get_pcvar_num(PCVAR_WJ_NUM)) //reset if we ran out of jumps
        
{
            
numJumps[id] = 0
            caughtJump
[id] = false
        
}
    }
    return 
PLUGIN_CONTINUE
}

public 
Touch_World(idworld
{
    if(
is_user_alive(id) && g_iJumpType[id] == JUMP_WALL
    {
        
//if we touch wall and have jump pressed, setup for jump
        
if(caughtJump[id] && (newButton[id] & IN_JUMP) && !(get_entity_flags(id) & FL_ONGROUND)) 
        {
            
//reverse velocity
            
for(new x=0;x<2;x++)
                
jumpVeloc[id][x] *= -1.0
                
            numJumps
[id]++
            
doWJump[id] = true
        
}    
    }

__________________
Sanjay Singh is offline
Send a message via AIM to Sanjay Singh
Old 05-29-2017, 23:54
Famdl
This message has been deleted by Famdl.
Famdl
Junior Member
Join Date: Mar 2017
Old 05-30-2017 , 00:00   Re: Edit Plugins
Reply With Quote #4

Emotion Now Works great
but jumpmenu Is not edited @sanjay singh can you fix it? i want this menu just for vips too And (Default regular jump That You made it)
Thanks

Last edited by Famdl; 05-30-2017 at 00:03.
Famdl is offline
Sanjay Singh
Veteran Member
Join Date: Sep 2016
Old 05-30-2017 , 21:12   Re: Edit Plugins
Reply With Quote #5

You forget to mention that u want only VIP jump menu , so that's y I didn't added
__________________
Sanjay Singh is offline
Send a message via AIM to Sanjay Singh
Sanjay Singh
Veteran Member
Join Date: Sep 2016
Old 05-30-2017 , 21:13   Re: Edit Plugins
Reply With Quote #6

Nvm I will post edited codes when m on pc
__________________
Sanjay Singh is offline
Send a message via AIM to Sanjay Singh
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 10:27.


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