Raised This Month: $ Target: $400
 0% 

Need Help


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Qifi
Junior Member
Join Date: Feb 2011
Old 10-25-2011 , 17:12   Need Help
Reply With Quote #1

Hi! I want to compile this sma, but i have some problems
When i compiling sma i have this:
//// deathrun_alls.sma
//C:\Users\elving\Desktop\scripting\deathrun_al ls.sma(1) : error(1): invalid function or declaration
//
// 1 Error
// Could not locate output file C:\Users\elving\Desktop\scripting\compiled\de athrun_alls.amx (compile failed).

Here is code
PHP Code:
#include <amxmisc>
#include <amxmodx>
#include <engine>
#include <fun>
#include <cstrike>
#include <deathrun_assist>
#include <fakemeta_util>
#include <hamsandwich>




#define    FL_WATERJUMP    (1<<11)    
#define    FL_ONGROUND    (1<<9)    


#define TITLE                    "[Deathrun Assist]"
#define MAXPLAYERS                32 + 1


#define ASSIST_MENU_ID                101204
#define SPAWN_TASK                101205


#define CANT_RELOAD_BITSUM    ((1<<CSW_HEGRENADE)|(1<<CSW_SMOKEGRENADE)|(1<<CSW_FLASHBANG)|(1<<CSW_KNIFE)|(1<<CSW_C4))


new teamInfo
new CONFIG_HP 100CONFIG_ARMOR 200CONFIG_HPARMOR_COST 5200CONFIG_GRAVITY_COST 6000CONFIG_RUN_COST 6000CONFIG_STEALTH_COST 11488CONFIG_DEAGLE_COST 12460CONFIG_LIVE_COST 16000;
new 
Activated_HPARMOR[MAXPLAYERS];
new 
Activated_Gravity[MAXPLAYERS];
new 
Activated_Run[MAXPLAYERS];
new 
Activated_Stealth[MAXPLAYERS];
new 
Activated_Deagle[MAXPLAYERS];


new 
bool:Mode_ONMODE_Num;
new 
bool:timer[33] = false  

new Ticksi_Menu;
#include "colors.inl"

#define ZOMBIE_PAIN 2
new pain_zombie[ZOMBIE_PAIN][] = 
{
    
"la2zombie_source/zombie_pain1.wav",
    
"la2zombie_source/zombie_pain2.wav" 
}


#define ZOMBIE_DEATH 2
new death_zombie[ZOMBIE_DEATH][] = 
{
    
"la2zombie_source/zombie_die1.wav",
    
"la2zombie_source/zombie_die2.wav"
}


new 
MODE[][100] =
{
    
"FreeRound!",
    
"Neviditelnost",
    
"Zombie",
    
"Rembo",
    
"Klasicky"
}

new 
FloatOrigin[MAXPLAYERS][3];



public 
plugin_init() 
{
    
register_plugin("Death Run Assistant""1.0""Good Hash")
    
register_dictionary("deathrun_assist.txt"
    
    
register_clcmd("say /menu""Deathrun_Assist_Menu"ADMIN_ALL)
    
register_clcmd("say menu""Deathrun_Assist_Menu"ADMIN_ALL)
    
register_clcmd("say_team menu""Deathrun_Assist_Menu"ADMIN_ALL)
    
register_clcmd("say_team /menu""Deathrun_Assist_Menu"ADMIN_ALL)
    
register_clcmd("menu""Deathrun_Assist_Menu")
    
    
    
register_clcmd("say""CMD_modes"ADMIN_ALL)
    
    
    
register_event("HLTV""eventRoundStart""a""1=0""2=0"
    
register_event("DeathMsg","death_msg","a"
    
register_event("CurWeapon","switchweapon","be","1=1","2!29")
    
    
    
// Deathrun FreeRun
    
RegisterHam(Ham_Use"func_button""fwdUse")
    
RegisterHam(Ham_Touch"weaponbox""fwdTouch"
    
RegisterHam(Ham_Touch"armoury_entity""fwdTouch")
    
// Deathrun FreeRun
    
    
    
register_clcmd("jointeam""cmdJoinTeam");
    
register_clcmd("chooseteam""cmdJoinTeam");
    
server_cmd "sv_maxspeed 999" );
    
teamInfo get_user_msgid ("TeamInfo")
    
Mode_ON false;
    
Ticks 25
    
//register_clcmd("say drplus" , "SetLivesNative", ADMIN_ALL)
}

public 
plugin_precache() 
{
    
precache_model("models/player/zombie_source/zombie_source.mdl")
    
precache_sound("la2zombie_source/zombie_infec.wav")
    
    new 
i;
    
    for (
0ZOMBIE_PAINi++)
        
precache_sound(pain_zombie[i])
        
    for (
0ZOMBIE_DEATHi++)
        
precache_sound(death_zombie[i])
        
        
    return 
PLUGIN_CONTINUE
}



public 
HamTakeDamage(victiminflictorattackerid)
{
    if(
cs_get_user_team(attacker)==CS_TEAM_T && Mode_ON )
    {
        if (
is_user_alive(attacker) && MODE_Num == 2)
        {
            if( 
cs_get_user_team(victim)==CS_TEAM_T )
            {
                return 
1
            
}

            
entity_get_vector(victimEV_VEC_originOrigin[victim]);
            
Origin[victim][2] += 0.0;
            
set_task0.1"Respawn", ( victim SPAWN_TASK ) );
            
            
emit_sound(idCHAN_VOICE"la2zombie_source/zombie_infec.wav"1.0ATTN_NORM0PITCH_NORM)
            
            
user_kill(victim)
            
cs_set_user_model(victim"zombie_source")
            
cs_set_user_teamvictimCS_TEAM_T )
             
            static 
name[32]
            
get_user_name(victimnamesizeof name -1)
            
            
ChatColor(0"%L",0,"CT_ZOMBI_CHAT"name)
            
set_hudmessage(225025, -1.00.2510.02.01.01.0, -1)
            
show_hudmessage(0"%L",0,"CT_ZOMBI_HUD"name)
        }
    }
    
    if(
cs_get_user_team(attacker)==CS_TEAM_CT && Mode_ON )
    {
        if (
is_user_alive(victim) && MODE_Num == 2)
        {
            
emit_sound(idCHAN_VOICEpain_zombie[random_num(0ZOMBIE_PAIN 1)], 1.0ATTN_NORM0PITCH_NORM)
        }
    }
    
    return 
PLUGIN_CONTINUE
}


public 
switchweapon(id)
{
    if ( !
Mode_ON  )
        return 
PLUGIN_CONTINUE

    
if(cs_get_user_team(id)==CS_TEAM_T && MODE_Num == 2)
    {    
        
engclient_cmd(id,"weapon_knife")
    }
    
    if(
cs_get_user_team(id)==CS_TEAM_T && MODE_Num == 3)
    {
        if( 
CANT_RELOAD_BITSUM & (1<<read_data(2)) || read_data(3) > )
            return 
PLUGIN_CONTINUE

        set_pdata_int
(get_pdata_cbase(id373), 511004)
    }
    
    
    return 
PLUGIN_CONTINUE
}


public 
Respawn(id)
{
    if ( 
id SPAWN_TASK )
        
id -= SPAWN_TASK
    
    
    
if(is_user_connected(id) && Mode_ON && MODE_Num == )
    {
        
ExecuteHamB(Ham_CS_RoundRespawnid);
        
set_user_healthid1000 )
        
entity_set_origin(idOrigin[id]);
    }



public 
fwdUse(entidcalleridactivatoruse_typeFloat:value
{     
    if (
is_user_alive(idactivator) && Mode_ON && get_user_team(idactivator) == 
    {     
        switch ( 
MODE_Num )
        {
            case 
0:
            {
                
client_print(idactivatorprint_center"Vybrali jste %s!"MODE[MODE_Num] )     
                return 
HAM_SUPERCEDE     
            
}
            case 
1:
            {
                
client_print(idactivatorprint_center"Vybrali jste %s"MODE[MODE_Num])     
                return 
HAM_SUPERCEDE     
            
}
            case 
2:
            {
                
client_print(idactivatorprint_center"Vybrali jste %s"MODE[MODE_Num])     
                return 
HAM_SUPERCEDE     
            
}
            case 
3:
            {
                
client_print(idactivatorprint_center"Vybrali jste %s"MODE[MODE_Num])     
                return 
HAM_SUPERCEDE     
            
}
        }
          
    }

    return 
HAM_IGNORED     



public 
fwdTouch(entid
{     
    if ( 
is_user_alive(id) && MODE_Num == &&  Mode_ON )     
        return 
HAM_SUPERCEDE     

    
return HAM_IGNORED     
}   

public 
CMD_modes(idlevelcid)
{

    if(  !
timer[id] ) 
    {
        if (  
get_user_team(id) != || Mode_ON 
        {     
            
client_print(idprint_center"")     
            return 
PLUGIN_CONTINUE     
        
}
        
        
        new 
message[192];
        
read_args(message191)
        
remove_quotes(message)
        
        
        if (  
containimessage"/free" ) != -||  contain(message"free") != -)
        {
            
MODE_Num 0;
            
Mode_ON true   
            timer
[id] = false;
            
            
set_hudmessage025500.02, -1.006.012.00.10.2, -)     
            
show_hudmessage(0"%L",0,"FREE_GO")                
            
            
set_user_healthid100 )
            
            new 
i
            
for ( 133i++ ) 
            {     
                if ( 
is_user_alive ) )
                {
                    
strip_user_weapons i)     
                    
give_itemi"weapon_knife" )   
                }
            }     
        }
        
        if (  
containimessage"/invis" ) != -||  contain(message"invis" ) != -)
        {
            
MODE_Num 1;
            
Mode_ON true   
            timer
[id] = false;
            
            
set_hudmessage025500.02, -1.006.012.00.10.2, -)     
            
show_hudmessage(0"%L",0,"INVISE_GO")        
            
            
set_user_healthid250 )
            
            
set_user_renderingidkRenderFxNone000kRenderTransAlpha)
            
        }
        
        if (  
containimessage"/zombie" ) != -||  contain(message"zombie") != -||  contain(message"/zm") != -1  )
        {
            
MODE_Num 2;
            
Mode_ON true   
            timer
[id] = false;
            
            
cs_set_user_model(id"zombie_source")
            
            
set_user_healthid1000 )
            
            
set_hudmessage025500.02, -1.006.012.00.10.2, -)     
            
show_hudmessage(0"%L",0,"ZOMBI_GO")
            
        }
        
        if (  
containimessage"/rembo" ) != -1  ||  contain(message"rembo") != -1  )
        {
            
MODE_Num 3;
            
Mode_ON true   
            timer
[id] = false;
            
            
set_hudmessage0025550.02, -1.006.012.00.10.2, -)     
            
show_hudmessage(0"%L",0,"REMBO_GO")
            
            new 
i;
            
            for (
133i++) 
            { 
                if ( 
is_user_alive ) )
                {
                    
strip_user_weapons );
                    
set_user_healthget_user_health) + 50 )
                    
set_user_renderingikRenderFxNone000kRenderTransAlpha)
                    
give_itemi"weapon_knife")
                    
give_itemi"weapon_shield")
                    
give_itemi"weapon_glock18")
                    
cs_set_user_bpammoiCSW_GLOCK18220)   
                }
            }
            
            
            
set_user_healthid get_user_healthid ) + 200 )
                
            
strip_user_weapons id );
            
set_user_renderingid );
            
give_item(id"weapon_knife")
            
give_item(id"weapon_m249")
            
cs_set_user_bpammo(idCSW_M249250)
            
set_user_gravity(id0.9)
            
set_user_maxspeed(id500.0
             
            
        }
        
        if (  
containimessage"/class1c" ) != -1  )
        {
            
MODE_Num = -1;
            
Mode_ON true   
            timer
[id] = false;
            
            
            
set_hudmessage025500.02, -1.006.012.00.10.2, -)     
            
show_hudmessage(0"%L",0,"CLASSIC_GO")
            
        }
    }
    else 
    {    
        
client_printid,print_chat"%s Время выбора раунда прошло!"TITLE )
        
client_print(0,print_chat"%L",0,"CLASSIC_GO")
    }    
    
    return 
PLUGIN_CONTINUE
}


public 
eventRoundStart(id
{     
    new 
i  
    
    Mode_ON 
false    
    MODE_Num 
= -1;
    
Ticks 25
    
    
    
for(i=1;i<= 33;i++) 
    {
        if(
is_user_connected(i)) 
        {
            
timer[i] = false  
            cs_reset_user_model
(i)
            
set_user_rendering)
            
            if ( 
cs_get_user_team(i)==CS_TEAM_T && !is_user_bot ) )
                
set_task 1.0"T_Menu_Try"41292__"a"Ticks );
        }
    }  
    
     
}  

public 
T_Menu_Try id )
{
    if ( 
id 41292 )
        
id -= 41292
    
    Ticks 
-= 1;
    
    if ( 
Ticks )
    {
        if ( 
task_exists id 41292 ) )
        {
            
remove_task id 41292 );
        }
        
        
timer[id] = true
    
}
        
    if ( 
is_user_connected id ) )
        if ( !
Mode_ON  )
            
T_Menu id )
        else
            
menu_destroyi_Menu )
}


public 
death_msg()  
{     
    new 
id read_data(2)  
    
    if ( 
Mode_ON && MODE_Num == )
        if ( 
cs_get_user_team(id)==CS_TEAM_T )
            
emit_sound(idCHAN_VOICEdeath_zombie[random_num(0ZOMBIE_PAIN 1)], 1.0ATTN_NORM0PITCH_NORM)
    
Activated_HPARMOR[id] = 0;
    
Activated_Gravity[id] = 0;
    
Activated_Run[id] = 0;
    
Activated_Stealth[id] = 0;
    
Activated_Deagle[id] = 0;
}


public 
client_putinserver id )
    
client_cmd(id"bind F3 menu")
    
public 
cmdJoinTeam(id
{
    
Deathrun_Assist_Menu id );
    
set_task 0.1"Deathrun_Assist_Menu"id ASSIST_MENU_ID );
}


public 
Deathrun_Assist_Menu id )
{
    
    if ( 
id ASSIST_MENU_ID )
        
id -= ASSIST_MENU_ID
        
    
new menuTitle[127], main1[127], main2[127], main3[127], NEXT[20], BACK[20], EXIT[20];
    
    
formatex(menuTitlecharsmax(menuTitle), "%L"id"MENU_TITLE_MAIN");
    
formatex(main1charsmax(main1), "%L"id"MENU_MAIN_FREE");
    
formatex(main2charsmax(main2), "%L"id"MENU_MAIN_OPERATIONS");
    
formatex(main3charsmax(main3), "%L"id"MENU_MAIN_BLACK");
    
formatex(NEXTcharsmax(NEXT), "%L"id"NEXT");
    
formatex(BACKcharsmax(BACK), "%L"id"BACK");
    
formatex(EXIT, charsmax(EXIT), "%L"id"EXIT");
    
i_Menu menu_create(menuTitle"__Deathrun_Assist_Menu")
    
menu_additem(i_Menumain1"1"0)
    
menu_additem(i_Menumain2"2"0)
    
menu_additem(i_Menumain3"3"0)
    
menu_addblank(i_Menu7)
    
menu_addblank(i_Menu8)
    
menu_addblank(i_Menu9)
    
menu_setprop(i_MenuMPROP_NEXTNAMENEXT)
    
menu_setprop(i_MenuMPROP_BACKNAMEBACK)
    
menu_setprop(i_MenuMPROP_EXITNAME, EXIT)
    
menu_setprop(i_MenuMPROP_EXITMEXIT_ALL)
    
menu_display(idi_Menu0)
}

public 
resetspeed(who
    
entity_set_floatwhoEV_FL_maxspeedfloat(250) )
    
public 
set_stealth id )
{
    if ( 
is_user_aliveid ) && Activated_Stealth[id] )
    {
        
set_user_rendering(id,kRenderFxNone0,0,0kRenderTransTexture)
    }
    
}
public 
TestLivesNative id )
{
    new 
lives get_user_lives id );
    
client_printidprint_chat"%s lives are %i"TITLElives )
    
}

public 
SetLivesNative id )
{
    new 
lives get_user_lives id );
    
set_user_lives idlives );
    
lives get_user_lives id );
    
client_printidprint_chat"%s lives are %i"TITLElives )
    
}


public 
client_PreThink(id
{
    
    
/*
                [ Bunny Hop Production ]
    */
    
    
entity_set_float(idEV_FL_fuser20.0)    
    

    if (
entity_get_int(idEV_INT_button) & 2
    {    
        

        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)
        
        
//new Float:speed = get_user_maxspeed(id) + 5.0; 
        //set_user_maxspeed(id , speed);
        
set_user_maxspeed(id float 999) );
    }
    else
        
resetspeed id );
    
    if (
is_user_alive(id))
    {
        
set_stealth(id);
        if ( 
Activated_Run[id] )
        {
            
set_user_maxspeed(idfloat(400))
        }
    }
    
/*
                [ Bunny Hop Production ]
    */
    
    
    
return PLUGIN_CONTINUE
}

public 
T_Menu id )
{
        
        
    new 
menuTitle[127], main1[127], main2[127], main3[127], main4[127], main5[127], NEXT[20], BACK[20], EXIT[20];
    
    
formatex(menuTitlecharsmax(menuTitle), "%L"id"MENU_TITLE_T"Ticks );
    
formatex(main1charsmax(main1), "%s"MODE[0] )     
    
formatex(main2charsmax(main2), "%s"MODE[1] )   
    
formatex(main3charsmax(main3), "%s"MODE[2] )     
    
formatex(main4charsmax(main4), "%s"MODE[3] )   
    
formatex(main5charsmax(main5), "%s"MODE[4] )   
    
formatex(NEXTcharsmax(NEXT), "%L"id"NEXT");
    
formatex(BACKcharsmax(BACK), "%L"id"BACK");
    
formatex(EXIT, charsmax(EXIT), "%L"id"EXIT");
    
i_Menu menu_create(menuTitle"__T_Menu")
    
menu_additem(i_Menumain1"1"0)
    
menu_additem(i_Menumain2"2"0)
    
menu_additem(i_Menumain3"3"0)
    
menu_additem(i_Menumain4"4"0)
    
menu_additem(i_Menumain5"5"0)
    
menu_addblank(i_Menu7)
    
menu_addblank(i_Menu8)
    
menu_addblank(i_Menu9)
    
menu_setprop(i_MenuMPROP_NEXTNAMENEXT)
    
menu_setprop(i_MenuMPROP_BACKNAMEBACK)
    
menu_setprop(i_MenuMPROP_EXITNAME, EXIT)
    
menu_setprop(i_MenuMPROP_EXITMEXIT_ALL)
    
menu_display(idi_Menu0)
    
    return;
}

public 
__T_Menu(idmenuitem)
{
    if (
item == MENU_EXIT)
    {
        
menu_destroy(menu)
        return 
PLUGIN_HANDLED
    
}
    
    
    if ( 
Mode_ON  || timer[id] == true )
    {
        
menu_destroy(menu)
        return 
PLUGIN_HANDLED
    
}
    
    new 
s_Data[6], s_Name[64], i_Accessi_Callback
    menu_item_getinfo
(menuitemi_Accesss_Datacharsmax(s_Data), s_Namecharsmax(s_Name), i_Callback)
    
    new 
i_Key str_to_num(s_Data)

    
    if ( 
task_exists id 41292 ) )
    {
        
remove_task id 41292 );
    }
        
        
    switch(
i_Key)
    {
        case 
1:
        {
            
client_cmd id"say /free" );
        }
        case 
2:
        {
            
client_cmd id"say /invise" );
        }
        case 
3:
        {
            
client_cmd id"say /zm" );
        }
        case 
4:
        {
            
client_cmd id"say /rembo" );
        }
        case 
5:
        {
            
client_cmd id"say /class1c" );
        }
    }

    
menu_destroy(menu)
    return 
PLUGIN_HANDLED
}


public 
__Deathrun_Assist_Menu(idmenuitem)
{
    if (
item == MENU_EXIT)
    {
        
menu_destroy(menu)
        return 
PLUGIN_HANDLED
    
}

    new 
s_Data[6], s_Name[64], i_Accessi_Callback
    menu_item_getinfo
(menuitemi_Accesss_Datacharsmax(s_Data), s_Namecharsmax(s_Name), i_Callback)
    
    new 
i_Key str_to_num(s_Data)

    switch(
i_Key)
    {
        case 
1:
        {
            
Free_Menu(id)
        }
        case 
2:
        {
            
PayMent_Menu(id)
        }
        case 
3:
        {
            
Black_Fun_Menu(id)
        }
    }

    
menu_destroy(menu)
    return 
PLUGIN_HANDLED
}


public 
Black_Fun_Menu id )
{
    new 
menuTitle[127], main1[127], main2[127],  NEXT[20], BACK[20], EXIT[20];
    
    
formatex(menuTitlecharsmax(menuTitle), "%L"id"MENU_TITLE_BLACK");
    
formatex(main1charsmax(main1), "%L"id"MENU_BLACK_LIVE_BUY");
    
formatex(main2charsmax(main2), "%L"id"MENU_BLACK_LIVE_SELL"CONFIG_GRAVITY_COST );
    
formatex(NEXTcharsmax(NEXT), "%L"id"NEXT");
    
formatex(BACKcharsmax(BACK), "%L"id"BACK");
    
formatex(EXIT, charsmax(EXIT), "%L"id"EXIT");
    
i_Menu menu_create(menuTitle"__Black_Fun_Menu")
    
menu_additem(i_Menumain1"100"0)
    
menu_additem(i_Menumain2"101"0)
    
menu_addblank(i_Menu7)
    
menu_addblank(i_Menu8)
    
menu_addblank(i_Menu9)
    
menu_setprop(i_MenuMPROP_NEXTNAMENEXT)
    
menu_setprop(i_MenuMPROP_BACKNAMEBACK)
    
menu_setprop(i_MenuMPROP_EXITNAME, EXIT)
    
menu_setprop(i_MenuMPROP_EXITMEXIT_ALL)
    
menu_display(idi_Menu0)
}


public 
PayMent_Menu id )
{
    new 
menuTitle[127], main1[127], main2[127], main3[127], main4[127], main5[127], NEXT[20], BACK[20], EXIT[20];
    
    
formatex(menuTitlecharsmax(menuTitle), "%L"id"MENU_TITLE_PAY");
    
formatex(main1charsmax(main1), "%L"id"MENU_PAY_HPARMOR"CONFIG_HPCONFIG_ARMORCONFIG_HPARMOR_COST );
    
formatex(main2charsmax(main2), "%L"id"MENU_PAY_GRAVITY"CONFIG_GRAVITY_COST );
    
formatex(main3charsmax(main3), "%L"id"MENU_PAY_RUN"CONFIG_RUN_COST );
    
formatex(main4charsmax(main4), "%L"id"MENU_PAY_STEALTH"CONFIG_STEALTH_COST );
    
formatex(main5charsmax(main5), "%L"id"MENU_PAY_DEAGLE"CONFIG_DEAGLE_COST );
    
formatex(NEXTcharsmax(NEXT), "%L"id"NEXT");
    
formatex(BACKcharsmax(BACK), "%L"id"BACK");
    
formatex(EXIT, charsmax(EXIT), "%L"id"EXIT");
    
i_Menu menu_create(menuTitle"__PayMent_Menu")
    
menu_additem(i_Menumain1"1"0)
    
menu_additem(i_Menumain2"2"0)
    
menu_additem(i_Menumain3"3"0)
    
menu_additem(i_Menumain4"4"0)
    
menu_additem(i_Menumain5"5"0)
    
menu_addblank(i_Menu7)
    
menu_addblank(i_Menu8)
    
menu_addblank(i_Menu9)
    
menu_setprop(i_MenuMPROP_NEXTNAMENEXT)
    
menu_setprop(i_MenuMPROP_BACKNAMEBACK)
    
menu_setprop(i_MenuMPROP_EXITNAME, EXIT)
    
menu_setprop(i_MenuMPROP_EXITMEXIT_ALL)
    
menu_display(idi_Menu0)
}



public 
Free_Menu id )
{
    new 
menuTitle[127], main1[127], main2[127], NEXT[20], BACK[20], EXIT[20];
    
    
formatex(menuTitlecharsmax(menuTitle), "%L"id"MENU_TITLE_MAIN");
    
formatex(main1charsmax(main1), "%L"id"MENU_FREE_TRAIL");
    
formatex(main2charsmax(main2), "%L"id"MENU_TRAIL_OFF");
    
formatex(NEXTcharsmax(NEXT), "%L"id"NEXT");
    
formatex(BACKcharsmax(BACK), "%L"id"BACK");
    
formatex(EXIT, charsmax(EXIT), "%L"id"EXIT");
    
i_Menu menu_create(menuTitle"__Free_Menu")
    
menu_additem(i_Menumain1"1"0)
    
menu_additem(i_Menumain2"2"0)
    
menu_addblank(i_Menu7)
    
menu_addblank(i_Menu8)
    
menu_addblank(i_Menu9)
    
menu_setprop(i_MenuMPROP_NEXTNAMENEXT)
    
menu_setprop(i_MenuMPROP_BACKNAMEBACK)
    
menu_setprop(i_MenuMPROP_EXITNAME, EXIT)
    
menu_setprop(i_MenuMPROP_EXITMEXIT_ALL)
    
menu_display(idi_Menu0)
}


public 
__Black_Fun_Menu(idmenuitem)
{
    if (
item == MENU_EXIT)
    {
        
menu_destroy(menu)
        return 
PLUGIN_HANDLED
    
}

    new 
s_Data[6], s_Name[64], i_Accessi_Callback
    menu_item_getinfo
(menuitemi_Accesss_Datacharsmax(s_Data), s_Namecharsmax(s_Name), i_Callback)
    
    new 
i_Key str_to_num(s_Data)

    
Buy_Something idi_Key )

    
menu_destroy(menu)
    return 
PLUGIN_HANDLED
}



public 
__Free_Menu(idmenuitem)
{
    if (
item == MENU_EXIT)
    {
        
menu_destroy(menu)
        return 
PLUGIN_HANDLED
    
}

    new 
s_Data[6], s_Name[64], i_Accessi_Callback
    menu_item_getinfo
(menuitemi_Accesss_Datacharsmax(s_Data), s_Namecharsmax(s_Name), i_Callback)
    
    new 
i_Key str_to_num(s_Data)

    switch(
i_Key)
    {
        case 
1:
        {
            
client_cmd id"say trail random" );
            
client_print(idprint_chat"%L"id"MENU_FREE_TRAIL"TITLE );    
        }
        case 
2:
        {
            
client_cmd id"say trail off" );
        }
    }

    
menu_destroy(menu)
    return 
PLUGIN_HANDLED
}


public 
__PayMent_Menu(idmenuitem)
{
    if (
item == MENU_EXIT)
    {
        
menu_destroy(menu)
        return 
PLUGIN_HANDLED
    
}

    new 
s_Data[6], s_Name[64], i_Accessi_Callback
    menu_item_getinfo
(menuitemi_Accesss_Datacharsmax(s_Data), s_Namecharsmax(s_Name), i_Callback)
    
    new 
i_Key str_to_num(s_Data)

    
Buy_Something idi_Key )

    
menu_destroy(menu)
    return 
PLUGIN_HANDLED
}

public 
Buy_Something idItemID )
{
    new 
returntext[147];
    
    if ( !
is_user_alive(id) )
    {
        
formatex(returntextcharsmax(returntext), "%L"id"DEAD_TRY_BUY"TITLE);
        
colored_messageidreturntext,)
        return 
PLUGIN_HANDLED
    
}
   
    new 
money cs_get_user_money(id)
    
    switch(
ItemID)
    {
        case 
1:
        {
            if (
Activated_HPARMOR[id]  >= 1)
            {
                return 
PLUGIN_HANDLED;
            }
            if ( 
money >= CONFIG_HPARMOR_COST )
            {
                
cs_set_user_money(idmoney CONFIG_HPARMOR_COST0)
                
Activated_HPARMOR[id] += 1;
                
cs_set_user_armor(id200CS_ARMOR_VESTHELM);
                
set_user_health(idget_user_health id ) + 100 );
                
                
formatex(returntextcharsmax(returntext), "%L"id"BOUGHT_HP_ARMOR"TITLE);
                
colored_messageidreturntext,)
            }
            else
            {
                
formatex(returntextcharsmax(returntext), "%L"id"NOT_ENOUGH_MONEY"TITLE);
                
colored_messageidreturntext,)
            }
        
        }
        case 
2:
        {
            if (
Activated_Gravity[id]  >= 1)
            {
                return 
PLUGIN_HANDLED;
            }
            if (
money >= CONFIG_GRAVITY_COST)
            {
                
cs_set_user_money(idmoney CONFIG_GRAVITY_COST0)
                
Activated_Gravity[id] += 1;
                
SetGravityid )
                
                
formatex(returntextcharsmax(returntext), "%L"id"BOUGHT_GRAVITY"TITLE);
                
colored_messageidreturntext,)
            }
            else
            {
                
formatex(returntextcharsmax(returntext), "%L"id"NOT_ENOUGH_MONEY"TITLE);
                
colored_messageidreturntext,)
            }
        
        }
        case 
3:
        {
            if (
Activated_Run[id]  >= 1)
            {
                return 
PLUGIN_HANDLED;
            }
            if (
money >= CONFIG_RUN_COST)
            {
                
cs_set_user_money(idmoney CONFIG_RUN_COST0)
                
Activated_Run[id] += 1;
                
                
formatex(returntextcharsmax(returntext), "%L"id"BOUGHT_RUN"TITLE);
                
colored_messageidreturntext,)
            }
            else
            {
                
formatex(returntextcharsmax(returntext), "%L"id"NOT_ENOUGH_MONEY"TITLE);
                
colored_messageidreturntext,)
            }
        
        }
        case 
4:
        {
            if (
Activated_Stealth[id]  >= 1)
            {
                return 
PLUGIN_HANDLED;
            }
            if (
money >= CONFIG_STEALTH_COST)
            {
                
cs_set_user_money(idmoney CONFIG_STEALTH_COST0)
                
Activated_Stealth[id] += 1;
                
                
formatex(returntextcharsmax(returntext), "%L"id"BOUGHT_STEALTH"TITLE);
                
colored_messageidreturntext,)
            }
            else
            {
                
formatex(returntextcharsmax(returntext), "%L"id"NOT_ENOUGH_MONEY"TITLE);
                
colored_messageidreturntext,)
            }
        
        }
        case 
5:
        {
            if ( 
Mode_ON && MODE_Num == )
            {
                
formatex(returntextcharsmax(returntext), "%L"id"ZOMBI_NO_WEAPON"TITLE);
                
colored_messageidreturntext,)
                
                return 
PLUGIN_HANDLED;
            }
            
            if (
Activated_Deagle[id]  >= 1)
            {
                return 
PLUGIN_HANDLED;
            }
            if (
money >= CONFIG_DEAGLE_COST)
            {
                
cs_set_user_money(idmoney CONFIG_DEAGLE_COST0)
                
strip_user_weapons id );
                
give_item id"weapon_deagle" );
                
give_item id"weapon_knife" );
                
                
formatex(returntextcharsmax(returntext), "%L"id"BOUGHT_DEAGLE"TITLE);
                
colored_messageidreturntext,)
                
                
Activated_Deagle[id] += 1;
            }
            else
            {
                
formatex(returntextcharsmax(returntext), "%L"id"NOT_ENOUGH_MONEY"TITLE);
                
colored_messageidreturntext,)
            }
        
        }
        case 
100:
        {
            if (
money >= CONFIG_LIVE_COST)
            {
                
cs_set_user_money(idmoney CONFIG_LIVE_COST0)
                
                new 
lives get_user_lives id );
                
                
set_user_lives idlives );
                
    
                
formatex(returntextcharsmax(returntext), "%L"id"BOUGHT_LIVE"TITLElives );
                
colored_messageidreturntext,)
                
            }
            else
            {
                
formatex(returntextcharsmax(returntext), "%L"id"NOT_ENOUGH_MONEY"TITLE);
                
colored_messageidreturntext,)
            }
        
        }
        case 
101:
        {
            new 
lives get_user_lives id );
            
            if ( 
lives >= )
            {    
                
set_user_lives idlives );
                
cs_set_user_money(idmoney CONFIG_LIVE_COST-25001)
                
    
                
formatex(returntextcharsmax(returntext), "%L"id"SELL_LIVE"TITLElives );
                
colored_messageidreturntext,)
                
            }
            else
            {
                
formatex(returntextcharsmax(returntext), "%L"id"NOT_ENOUGH_SOULS"TITLE);
                
colored_messageidreturntext,)
            }
        
        }
    }
    
    return 
PLUGIN_CONTINUE;
}

public 
SetGravityid )
{

    if ( !
is_user_alive(id) )
    {
        return;
    }


    if ( 
Activated_Gravity[id] )
    {
        
set_user_gravityid0.4)//get_cvar_float ("jump_high"));
    
}
    else
        
set_user_gravityid1.0)

    return;

Anybody can fix this, please or what is problem?
Sorry for my bad English

Last edited by Qifi; 10-25-2011 at 17:14.
Qifi is offline
kramesa
Veteran Member
Join Date: Feb 2011
Location: Brazil
Old 10-25-2011 , 19:32   Re: Need Help
Reply With Quote #2

Test:
PHP Code:
#include <amxmodx>
#include <amxmisc>
#include <engine>
#include <fun>
#include <cstrike>
#include <deathrun_assist>
#include <fakemeta_util>
#include <hamsandwich>




#define    FL_WATERJUMP    (1<<11)    
#define    FL_ONGROUND    (1<<9)    


#define TITLE                    "[Deathrun Assist]"
#define MAXPLAYERS                32 + 1


#define ASSIST_MENU_ID                101204
#define SPAWN_TASK                101205


#define CANT_RELOAD_BITSUM    ((1<<CSW_HEGRENADE)|(1<<CSW_SMOKEGRENADE)|(1<<CSW_FLASHBANG)|(1<<CSW_KNIFE)|(1<<CSW_C4))


new teamInfo
new CONFIG_HP 100CONFIG_ARMOR 200CONFIG_HPARMOR_COST 5200CONFIG_GRAVITY_COST 6000CONFIG_RUN_COST 6000CONFIG_STEALTH_COST 11488CONFIG_DEAGLE_COST 12460CONFIG_LIVE_COST 16000;
new 
Activated_HPARMOR[MAXPLAYERS];
new 
Activated_Gravity[MAXPLAYERS];
new 
Activated_Run[MAXPLAYERS];
new 
Activated_Stealth[MAXPLAYERS];
new 
Activated_Deagle[MAXPLAYERS];


new 
bool:Mode_ONMODE_Num;
new 
bool:timer[33] = false  

new Ticksi_Menu;
#include "colors.inl"

#define ZOMBIE_PAIN 2
new pain_zombie[ZOMBIE_PAIN][] = 
{
    
"la2zombie_source/zombie_pain1.wav",
    
"la2zombie_source/zombie_pain2.wav" 
}


#define ZOMBIE_DEATH 2
new death_zombie[ZOMBIE_DEATH][] = 
{
    
"la2zombie_source/zombie_die1.wav",
    
"la2zombie_source/zombie_die2.wav"
}


new 
MODE[][100] =
{
    
"FreeRound!",
    
"Neviditelnost",
    
"Zombie",
    
"Rembo",
    
"Klasicky"
}

new 
FloatOrigin[MAXPLAYERS][3];



public 
plugin_init() 
{
    
register_plugin("Death Run Assistant""1.0""Good Hash")
    
register_dictionary("deathrun_assist.txt"
    
    
register_clcmd("say /menu""Deathrun_Assist_Menu"ADMIN_ALL)
    
register_clcmd("say menu""Deathrun_Assist_Menu"ADMIN_ALL)
    
register_clcmd("say_team menu""Deathrun_Assist_Menu"ADMIN_ALL)
    
register_clcmd("say_team /menu""Deathrun_Assist_Menu"ADMIN_ALL)
    
register_clcmd("menu""Deathrun_Assist_Menu")
    
    
    
register_clcmd("say""CMD_modes"ADMIN_ALL)
    
    
    
register_event("HLTV""eventRoundStart""a""1=0""2=0"
    
register_event("DeathMsg","death_msg","a"
    
register_event("CurWeapon","switchweapon","be","1=1","2!29")
    
    
    
// Deathrun FreeRun
    
RegisterHam(Ham_Use"func_button""fwdUse")
    
RegisterHam(Ham_Touch"weaponbox""fwdTouch"
    
RegisterHam(Ham_Touch"armoury_entity""fwdTouch")
    
// Deathrun FreeRun
    
    
    
register_clcmd("jointeam""cmdJoinTeam");
    
register_clcmd("chooseteam""cmdJoinTeam");
    
server_cmd "sv_maxspeed 999" );
    
teamInfo get_user_msgid ("TeamInfo")
    
Mode_ON false;
    
Ticks 25
    
//register_clcmd("say drplus" , "SetLivesNative", ADMIN_ALL)
}

public 
plugin_precache() 
{
    
precache_model("models/player/zombie_source/zombie_source.mdl")
    
precache_sound("la2zombie_source/zombie_infec.wav")
    
    new 
i;
    
    for (
0ZOMBIE_PAINi++)
        
precache_sound(pain_zombie[i])
        
    for (
0ZOMBIE_DEATHi++)
        
precache_sound(death_zombie[i])
        
        
    return 
PLUGIN_CONTINUE
}



public 
HamTakeDamage(victiminflictorattackerid)
{
    if(
cs_get_user_team(attacker)==CS_TEAM_T && Mode_ON )
    {
        if (
is_user_alive(attacker) && MODE_Num == 2)
        {
            if( 
cs_get_user_team(victim)==CS_TEAM_T )
            {
                return 
1
            
}

            
entity_get_vector(victimEV_VEC_originOrigin[victim]);
            
Origin[victim][2] += 0.0;
            
set_task0.1"Respawn", ( victim SPAWN_TASK ) );
            
            
emit_sound(idCHAN_VOICE"la2zombie_source/zombie_infec.wav"1.0ATTN_NORM0PITCH_NORM)
            
            
user_kill(victim)
            
cs_set_user_model(victim"zombie_source")
            
cs_set_user_teamvictimCS_TEAM_T )
             
            static 
name[32]
            
get_user_name(victimnamesizeof name -1)
            
            
ChatColor(0"%L",0,"CT_ZOMBI_CHAT"name)
            
set_hudmessage(225025, -1.00.2510.02.01.01.0, -1)
            
show_hudmessage(0"%L",0,"CT_ZOMBI_HUD"name)
        }
    }
    
    if(
cs_get_user_team(attacker)==CS_TEAM_CT && Mode_ON )
    {
        if (
is_user_alive(victim) && MODE_Num == 2)
        {
            
emit_sound(idCHAN_VOICEpain_zombie[random_num(0ZOMBIE_PAIN 1)], 1.0ATTN_NORM0PITCH_NORM)
        }
    }
    
    return 
PLUGIN_CONTINUE
}


public 
switchweapon(id)
{
    if ( !
Mode_ON  )
        return 
PLUGIN_CONTINUE

    
if(cs_get_user_team(id)==CS_TEAM_T && MODE_Num == 2)
    {    
        
engclient_cmd(id,"weapon_knife")
    }
    
    if(
cs_get_user_team(id)==CS_TEAM_T && MODE_Num == 3)
    {
        if( 
CANT_RELOAD_BITSUM & (1<<read_data(2)) || read_data(3) > )
            return 
PLUGIN_CONTINUE

        set_pdata_int
(get_pdata_cbase(id373), 511004)
    }
    
    
    return 
PLUGIN_CONTINUE
}


public 
Respawn(id)
{
    if ( 
id SPAWN_TASK )
        
id -= SPAWN_TASK
    
    
    
if(is_user_connected(id) && Mode_ON && MODE_Num == )
    {
        
ExecuteHamB(Ham_CS_RoundRespawnid);
        
set_user_healthid1000 )
        
entity_set_origin(idOrigin[id]);
    }



public 
fwdUse(entidcalleridactivatoruse_typeFloat:value
{     
    if (
is_user_alive(idactivator) && Mode_ON && get_user_team(idactivator) == 
    {     
        switch ( 
MODE_Num )
        {
            case 
0:
            {
                
client_print(idactivatorprint_center"Vybrali jste %s!"MODE[MODE_Num] )     
                return 
HAM_SUPERCEDE     
            
}
            case 
1:
            {
                
client_print(idactivatorprint_center"Vybrali jste %s"MODE[MODE_Num])     
                return 
HAM_SUPERCEDE     
            
}
            case 
2:
            {
                
client_print(idactivatorprint_center"Vybrali jste %s"MODE[MODE_Num])     
                return 
HAM_SUPERCEDE     
            
}
            case 
3:
            {
                
client_print(idactivatorprint_center"Vybrali jste %s"MODE[MODE_Num])     
                return 
HAM_SUPERCEDE     
            
}
        }
          
    }

    return 
HAM_IGNORED     



public 
fwdTouch(entid
{     
    if ( 
is_user_alive(id) && MODE_Num == &&  Mode_ON )     
        return 
HAM_SUPERCEDE     

    
return HAM_IGNORED     
}   

public 
CMD_modes(idlevelcid)
{

    if(  !
timer[id] ) 
    {
        if (  
get_user_team(id) != || Mode_ON 
        {     
            
client_print(idprint_center"")     
            return 
PLUGIN_CONTINUE     
        
}
        
        
        new 
message[192];
        
read_args(message191)
        
remove_quotes(message)
        
        
        if (  
containimessage"/free" ) != -||  contain(message"free") != -)
        {
            
MODE_Num 0;
            
Mode_ON true   
            timer
[id] = false;
            
            
set_hudmessage025500.02, -1.006.012.00.10.2, -)     
            
show_hudmessage(0"%L",0,"FREE_GO")                
            
            
set_user_healthid100 )
            
            new 
i
            
for ( 133i++ ) 
            {     
                if ( 
is_user_alive ) )
                {
                    
strip_user_weapons i)     
                    
give_itemi"weapon_knife" )   
                }
            }     
        }
        
        if (  
containimessage"/invis" ) != -||  contain(message"invis" ) != -)
        {
            
MODE_Num 1;
            
Mode_ON true   
            timer
[id] = false;
            
            
set_hudmessage025500.02, -1.006.012.00.10.2, -)     
            
show_hudmessage(0"%L",0,"INVISE_GO")        
            
            
set_user_healthid250 )
            
            
set_user_renderingidkRenderFxNone000kRenderTransAlpha)
            
        }
        
        if (  
containimessage"/zombie" ) != -||  contain(message"zombie") != -||  contain(message"/zm") != -1  )
        {
            
MODE_Num 2;
            
Mode_ON true   
            timer
[id] = false;
            
            
cs_set_user_model(id"zombie_source")
            
            
set_user_healthid1000 )
            
            
set_hudmessage025500.02, -1.006.012.00.10.2, -)     
            
show_hudmessage(0"%L",0,"ZOMBI_GO")
            
        }
        
        if (  
containimessage"/rembo" ) != -1  ||  contain(message"rembo") != -1  )
        {
            
MODE_Num 3;
            
Mode_ON true   
            timer
[id] = false;
            
            
set_hudmessage0025550.02, -1.006.012.00.10.2, -)     
            
show_hudmessage(0"%L",0,"REMBO_GO")
            
            new 
i;
            
            for (
133i++) 
            { 
                if ( 
is_user_alive ) )
                {
                    
strip_user_weapons );
                    
set_user_healthget_user_health) + 50 )
                    
set_user_renderingikRenderFxNone000kRenderTransAlpha)
                    
give_itemi"weapon_knife")
                    
give_itemi"weapon_shield")
                    
give_itemi"weapon_glock18")
                    
cs_set_user_bpammoiCSW_GLOCK18220)   
                }
            }
            
            
            
set_user_healthid get_user_healthid ) + 200 )
                
            
strip_user_weapons id );
            
set_user_renderingid );
            
give_item(id"weapon_knife")
            
give_item(id"weapon_m249")
            
cs_set_user_bpammo(idCSW_M249250)
            
set_user_gravity(id0.9)
            
set_user_maxspeed(id500.0
             
            
        }
        
        if (  
containimessage"/class1c" ) != -1  )
        {
            
MODE_Num = -1;
            
Mode_ON true   
            timer
[id] = false;
            
            
            
set_hudmessage025500.02, -1.006.012.00.10.2, -)     
            
show_hudmessage(0"%L",0,"CLASSIC_GO")
            
        }
    }
    else 
    {    
        
client_printid,print_chat"%s ????? ?????? ?????? ??????!"TITLE )
        
client_print(0,print_chat"%L",0,"CLASSIC_GO")
    }    
    
    return 
PLUGIN_CONTINUE
}


public 
eventRoundStart(id
{     
    new 
i  
    
    Mode_ON 
false    
    MODE_Num 
= -1;
    
Ticks 25
    
    
    
for(i=1;i<= 33;i++) 
    {
        if(
is_user_connected(i)) 
        {
            
timer[i] = false  
            cs_reset_user_model
(i)
            
set_user_rendering)
            
            if ( 
cs_get_user_team(i)==CS_TEAM_T && !is_user_bot ) )
                
set_task 1.0"T_Menu_Try"41292__"a"Ticks );
        }
    }  
    
     
}  

public 
T_Menu_Try id )
{
    if ( 
id 41292 )
        
id -= 41292
    
    Ticks 
-= 1;
    
    if ( 
Ticks )
    {
        if ( 
task_exists id 41292 ) )
        {
            
remove_task id 41292 );
        }
        
        
timer[id] = true
    
}
        
    if ( 
is_user_connected id ) )
        if ( !
Mode_ON  )
            
T_Menu id )
        else
            
menu_destroyi_Menu )
}


public 
death_msg()  
{     
    new 
id read_data(2)  
    
    if ( 
Mode_ON && MODE_Num == )
        if ( 
cs_get_user_team(id)==CS_TEAM_T )
            
emit_sound(idCHAN_VOICEdeath_zombie[random_num(0ZOMBIE_PAIN 1)], 1.0ATTN_NORM0PITCH_NORM)
    
Activated_HPARMOR[id] = 0;
    
Activated_Gravity[id] = 0;
    
Activated_Run[id] = 0;
    
Activated_Stealth[id] = 0;
    
Activated_Deagle[id] = 0;
}


public 
client_putinserver id )
    
client_cmd(id"bind F3 menu")
    
public 
cmdJoinTeam(id
{
    
Deathrun_Assist_Menu id );
    
set_task 0.1"Deathrun_Assist_Menu"id ASSIST_MENU_ID );
}


public 
Deathrun_Assist_Menu id )
{
    
    if ( 
id ASSIST_MENU_ID )
        
id -= ASSIST_MENU_ID
        
    
new menuTitle[127], main1[127], main2[127], main3[127], NEXT[20], BACK[20], EXIT[20];
    
    
formatex(menuTitlecharsmax(menuTitle), "%L"id"MENU_TITLE_MAIN");
    
formatex(main1charsmax(main1), "%L"id"MENU_MAIN_FREE");
    
formatex(main2charsmax(main2), "%L"id"MENU_MAIN_OPERATIONS");
    
formatex(main3charsmax(main3), "%L"id"MENU_MAIN_BLACK");
    
formatex(NEXTcharsmax(NEXT), "%L"id"NEXT");
    
formatex(BACKcharsmax(BACK), "%L"id"BACK");
    
formatex(EXIT, charsmax(EXIT), "%L"id"EXIT");
    
i_Menu menu_create(menuTitle"__Deathrun_Assist_Menu")
    
menu_additem(i_Menumain1"1"0)
    
menu_additem(i_Menumain2"2"0)
    
menu_additem(i_Menumain3"3"0)
    
menu_addblank(i_Menu7)
    
menu_addblank(i_Menu8)
    
menu_addblank(i_Menu9)
    
menu_setprop(i_MenuMPROP_NEXTNAMENEXT)
    
menu_setprop(i_MenuMPROP_BACKNAMEBACK)
    
menu_setprop(i_MenuMPROP_EXITNAME, EXIT)
    
menu_setprop(i_MenuMPROP_EXITMEXIT_ALL)
    
menu_display(idi_Menu0)
}

public 
resetspeed(who
    
entity_set_floatwhoEV_FL_maxspeedfloat(250) )
    
public 
set_stealth id )
{
    if ( 
is_user_aliveid ) && Activated_Stealth[id] )
    {
        
set_user_rendering(id,kRenderFxNone0,0,0kRenderTransTexture)
    }
    
}
public 
TestLivesNative id )
{
    new 
lives get_user_lives id );
    
client_printidprint_chat"%s lives are %i"TITLElives )
    
}

public 
SetLivesNative id )
{
    new 
lives get_user_lives id );
    
set_user_lives idlives );
    
lives get_user_lives id );
    
client_printidprint_chat"%s lives are %i"TITLElives )
    
}


public 
client_PreThink(id
{
    
    
/*
                [ Bunny Hop Production ]
    */
    
    
entity_set_float(idEV_FL_fuser20.0)    
    

    if (
entity_get_int(idEV_INT_button) & 2
    {    
        

        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)
        
        
//new Float:speed = get_user_maxspeed(id) + 5.0; 
        //set_user_maxspeed(id , speed);
        
set_user_maxspeed(id float 999) );
    }
    else
        
resetspeed id );
    
    if (
is_user_alive(id))
    {
        
set_stealth(id);
        if ( 
Activated_Run[id] )
        {
            
set_user_maxspeed(idfloat(400))
        }
    }
    
/*
                [ Bunny Hop Production ]
    */
    
    
    
return PLUGIN_CONTINUE
}

public 
T_Menu id )
{
        
        
    new 
menuTitle[127], main1[127], main2[127], main3[127], main4[127], main5[127], NEXT[20], BACK[20], EXIT[20];
    
    
formatex(menuTitlecharsmax(menuTitle), "%L"id"MENU_TITLE_T"Ticks );
    
formatex(main1charsmax(main1), "%s"MODE[0] )     
    
formatex(main2charsmax(main2), "%s"MODE[1] )   
    
formatex(main3charsmax(main3), "%s"MODE[2] )     
    
formatex(main4charsmax(main4), "%s"MODE[3] )   
    
formatex(main5charsmax(main5), "%s"MODE[4] )   
    
formatex(NEXTcharsmax(NEXT), "%L"id"NEXT");
    
formatex(BACKcharsmax(BACK), "%L"id"BACK");
    
formatex(EXIT, charsmax(EXIT), "%L"id"EXIT");
    
i_Menu menu_create(menuTitle"__T_Menu")
    
menu_additem(i_Menumain1"1"0)
    
menu_additem(i_Menumain2"2"0)
    
menu_additem(i_Menumain3"3"0)
    
menu_additem(i_Menumain4"4"0)
    
menu_additem(i_Menumain5"5"0)
    
menu_addblank(i_Menu7)
    
menu_addblank(i_Menu8)
    
menu_addblank(i_Menu9)
    
menu_setprop(i_MenuMPROP_NEXTNAMENEXT)
    
menu_setprop(i_MenuMPROP_BACKNAMEBACK)
    
menu_setprop(i_MenuMPROP_EXITNAME, EXIT)
    
menu_setprop(i_MenuMPROP_EXITMEXIT_ALL)
    
menu_display(idi_Menu0)
    
    return;
}

public 
__T_Menu(idmenuitem)
{
    if (
item == MENU_EXIT)
    {
        
menu_destroy(menu)
        return 
PLUGIN_HANDLED
    
}
    
    
    if ( 
Mode_ON  || timer[id] == true )
    {
        
menu_destroy(menu)
        return 
PLUGIN_HANDLED
    
}
    
    new 
s_Data[6], s_Name[64], i_Accessi_Callback
    menu_item_getinfo
(menuitemi_Accesss_Datacharsmax(s_Data), s_Namecharsmax(s_Name), i_Callback)
    
    new 
i_Key str_to_num(s_Data)

    
    if ( 
task_exists id 41292 ) )
    {
        
remove_task id 41292 );
    }
        
        
    switch(
i_Key)
    {
        case 
1:
        {
            
client_cmd id"say /free" );
        }
        case 
2:
        {
            
client_cmd id"say /invise" );
        }
        case 
3:
        {
            
client_cmd id"say /zm" );
        }
        case 
4:
        {
            
client_cmd id"say /rembo" );
        }
        case 
5:
        {
            
client_cmd id"say /class1c" );
        }
    }

    
menu_destroy(menu)
    return 
PLUGIN_HANDLED
}


public 
__Deathrun_Assist_Menu(idmenuitem)
{
    if (
item == MENU_EXIT)
    {
        
menu_destroy(menu)
        return 
PLUGIN_HANDLED
    
}

    new 
s_Data[6], s_Name[64], i_Accessi_Callback
    menu_item_getinfo
(menuitemi_Accesss_Datacharsmax(s_Data), s_Namecharsmax(s_Name), i_Callback)
    
    new 
i_Key str_to_num(s_Data)

    switch(
i_Key)
    {
        case 
1:
        {
            
Free_Menu(id)
        }
        case 
2:
        {
            
PayMent_Menu(id)
        }
        case 
3:
        {
            
Black_Fun_Menu(id)
        }
    }

    
menu_destroy(menu)
    return 
PLUGIN_HANDLED
}


public 
Black_Fun_Menu id )
{
    new 
menuTitle[127], main1[127], main2[127],  NEXT[20], BACK[20], EXIT[20];
    
    
formatex(menuTitlecharsmax(menuTitle), "%L"id"MENU_TITLE_BLACK");
    
formatex(main1charsmax(main1), "%L"id"MENU_BLACK_LIVE_BUY");
    
formatex(main2charsmax(main2), "%L"id"MENU_BLACK_LIVE_SELL"CONFIG_GRAVITY_COST );
    
formatex(NEXTcharsmax(NEXT), "%L"id"NEXT");
    
formatex(BACKcharsmax(BACK), "%L"id"BACK");
    
formatex(EXIT, charsmax(EXIT), "%L"id"EXIT");
    
i_Menu menu_create(menuTitle"__Black_Fun_Menu")
    
menu_additem(i_Menumain1"100"0)
    
menu_additem(i_Menumain2"101"0)
    
menu_addblank(i_Menu7)
    
menu_addblank(i_Menu8)
    
menu_addblank(i_Menu9)
    
menu_setprop(i_MenuMPROP_NEXTNAMENEXT)
    
menu_setprop(i_MenuMPROP_BACKNAMEBACK)
    
menu_setprop(i_MenuMPROP_EXITNAME, EXIT)
    
menu_setprop(i_MenuMPROP_EXITMEXIT_ALL)
    
menu_display(idi_Menu0)
}


public 
PayMent_Menu id )
{
    new 
menuTitle[127], main1[127], main2[127], main3[127], main4[127], main5[127], NEXT[20], BACK[20], EXIT[20];
    
    
formatex(menuTitlecharsmax(menuTitle), "%L"id"MENU_TITLE_PAY");
    
formatex(main1charsmax(main1), "%L"id"MENU_PAY_HPARMOR"CONFIG_HPCONFIG_ARMORCONFIG_HPARMOR_COST );
    
formatex(main2charsmax(main2), "%L"id"MENU_PAY_GRAVITY"CONFIG_GRAVITY_COST );
    
formatex(main3charsmax(main3), "%L"id"MENU_PAY_RUN"CONFIG_RUN_COST );
    
formatex(main4charsmax(main4), "%L"id"MENU_PAY_STEALTH"CONFIG_STEALTH_COST );
    
formatex(main5charsmax(main5), "%L"id"MENU_PAY_DEAGLE"CONFIG_DEAGLE_COST );
    
formatex(NEXTcharsmax(NEXT), "%L"id"NEXT");
    
formatex(BACKcharsmax(BACK), "%L"id"BACK");
    
formatex(EXIT, charsmax(EXIT), "%L"id"EXIT");
    
i_Menu menu_create(menuTitle"__PayMent_Menu")
    
menu_additem(i_Menumain1"1"0)
    
menu_additem(i_Menumain2"2"0)
    
menu_additem(i_Menumain3"3"0)
    
menu_additem(i_Menumain4"4"0)
    
menu_additem(i_Menumain5"5"0)
    
menu_addblank(i_Menu7)
    
menu_addblank(i_Menu8)
    
menu_addblank(i_Menu9)
    
menu_setprop(i_MenuMPROP_NEXTNAMENEXT)
    
menu_setprop(i_MenuMPROP_BACKNAMEBACK)
    
menu_setprop(i_MenuMPROP_EXITNAME, EXIT)
    
menu_setprop(i_MenuMPROP_EXITMEXIT_ALL)
    
menu_display(idi_Menu0)
}



public 
Free_Menu id )
{
    new 
menuTitle[127], main1[127], main2[127], NEXT[20], BACK[20], EXIT[20];
    
    
formatex(menuTitlecharsmax(menuTitle), "%L"id"MENU_TITLE_MAIN");
    
formatex(main1charsmax(main1), "%L"id"MENU_FREE_TRAIL");
    
formatex(main2charsmax(main2), "%L"id"MENU_TRAIL_OFF");
    
formatex(NEXTcharsmax(NEXT), "%L"id"NEXT");
    
formatex(BACKcharsmax(BACK), "%L"id"BACK");
    
formatex(EXIT, charsmax(EXIT), "%L"id"EXIT");
    
i_Menu menu_create(menuTitle"__Free_Menu")
    
menu_additem(i_Menumain1"1"0)
    
menu_additem(i_Menumain2"2"0)
    
menu_addblank(i_Menu7)
    
menu_addblank(i_Menu8)
    
menu_addblank(i_Menu9)
    
menu_setprop(i_MenuMPROP_NEXTNAMENEXT)
    
menu_setprop(i_MenuMPROP_BACKNAMEBACK)
    
menu_setprop(i_MenuMPROP_EXITNAME, EXIT)
    
menu_setprop(i_MenuMPROP_EXITMEXIT_ALL)
    
menu_display(idi_Menu0)
}


public 
__Black_Fun_Menu(idmenuitem)
{
    if (
item == MENU_EXIT)
    {
        
menu_destroy(menu)
        return 
PLUGIN_HANDLED
    
}

    new 
s_Data[6], s_Name[64], i_Accessi_Callback
    menu_item_getinfo
(menuitemi_Accesss_Datacharsmax(s_Data), s_Namecharsmax(s_Name), i_Callback)
    
    new 
i_Key str_to_num(s_Data)

    
Buy_Something idi_Key )

    
menu_destroy(menu)
    return 
PLUGIN_HANDLED
}



public 
__Free_Menu(idmenuitem)
{
    if (
item == MENU_EXIT)
    {
        
menu_destroy(menu)
        return 
PLUGIN_HANDLED
    
}

    new 
s_Data[6], s_Name[64], i_Accessi_Callback
    menu_item_getinfo
(menuitemi_Accesss_Datacharsmax(s_Data), s_Namecharsmax(s_Name), i_Callback)
    
    new 
i_Key str_to_num(s_Data)

    switch(
i_Key)
    {
        case 
1:
        {
            
client_cmd id"say trail random" );
            
client_print(idprint_chat"%L"id"MENU_FREE_TRAIL"TITLE );    
        }
        case 
2:
        {
            
client_cmd id"say trail off" );
        }
    }

    
menu_destroy(menu)
    return 
PLUGIN_HANDLED
}


public 
__PayMent_Menu(idmenuitem)
{
    if (
item == MENU_EXIT)
    {
        
menu_destroy(menu)
        return 
PLUGIN_HANDLED
    
}

    new 
s_Data[6], s_Name[64], i_Accessi_Callback
    menu_item_getinfo
(menuitemi_Accesss_Datacharsmax(s_Data), s_Namecharsmax(s_Name), i_Callback)
    
    new 
i_Key str_to_num(s_Data)

    
Buy_Something idi_Key )

    
menu_destroy(menu)
    return 
PLUGIN_HANDLED
}

public 
Buy_Something idItemID )
{
    new 
returntext[147];
    
    if ( !
is_user_alive(id) )
    {
        
formatex(returntextcharsmax(returntext), "%L"id"DEAD_TRY_BUY"TITLE);
        
colored_messageidreturntext,)
        return 
PLUGIN_HANDLED
    
}
   
    new 
money cs_get_user_money(id)
    
    switch(
ItemID)
    {
        case 
1:
        {
            if (
Activated_HPARMOR[id]  >= 1)
            {
                return 
PLUGIN_HANDLED;
            }
            if ( 
money >= CONFIG_HPARMOR_COST )
            {
                
cs_set_user_money(idmoney CONFIG_HPARMOR_COST0)
                
Activated_HPARMOR[id] += 1;
                
cs_set_user_armor(id200CS_ARMOR_VESTHELM);
                
set_user_health(idget_user_health id ) + 100 );
                
                
formatex(returntextcharsmax(returntext), "%L"id"BOUGHT_HP_ARMOR"TITLE);
                
colored_messageidreturntext,)
            }
            else
            {
                
formatex(returntextcharsmax(returntext), "%L"id"NOT_ENOUGH_MONEY"TITLE);
                
colored_messageidreturntext,)
            }
        
        }
        case 
2:
        {
            if (
Activated_Gravity[id]  >= 1)
            {
                return 
PLUGIN_HANDLED;
            }
            if (
money >= CONFIG_GRAVITY_COST)
            {
                
cs_set_user_money(idmoney CONFIG_GRAVITY_COST0)
                
Activated_Gravity[id] += 1;
                
SetGravityid )
                
                
formatex(returntextcharsmax(returntext), "%L"id"BOUGHT_GRAVITY"TITLE);
                
colored_messageidreturntext,)
            }
            else
            {
                
formatex(returntextcharsmax(returntext), "%L"id"NOT_ENOUGH_MONEY"TITLE);
                
colored_messageidreturntext,)
            }
        
        }
        case 
3:
        {
            if (
Activated_Run[id]  >= 1)
            {
                return 
PLUGIN_HANDLED;
            }
            if (
money >= CONFIG_RUN_COST)
            {
                
cs_set_user_money(idmoney CONFIG_RUN_COST0)
                
Activated_Run[id] += 1;
                
                
formatex(returntextcharsmax(returntext), "%L"id"BOUGHT_RUN"TITLE);
                
colored_messageidreturntext,)
            }
            else
            {
                
formatex(returntextcharsmax(returntext), "%L"id"NOT_ENOUGH_MONEY"TITLE);
                
colored_messageidreturntext,)
            }
        
        }
        case 
4:
        {
            if (
Activated_Stealth[id]  >= 1)
            {
                return 
PLUGIN_HANDLED;
            }
            if (
money >= CONFIG_STEALTH_COST)
            {
                
cs_set_user_money(idmoney CONFIG_STEALTH_COST0)
                
Activated_Stealth[id] += 1;
                
                
formatex(returntextcharsmax(returntext), "%L"id"BOUGHT_STEALTH"TITLE);
                
colored_messageidreturntext,)
            }
            else
            {
                
formatex(returntextcharsmax(returntext), "%L"id"NOT_ENOUGH_MONEY"TITLE);
                
colored_messageidreturntext,)
            }
        
        }
        case 
5:
        {
            if ( 
Mode_ON && MODE_Num == )
            {
                
formatex(returntextcharsmax(returntext), "%L"id"ZOMBI_NO_WEAPON"TITLE);
                
colored_messageidreturntext,)
                
                return 
PLUGIN_HANDLED;
            }
            
            if (
Activated_Deagle[id]  >= 1)
            {
                return 
PLUGIN_HANDLED;
            }
            if (
money >= CONFIG_DEAGLE_COST)
            {
                
cs_set_user_money(idmoney CONFIG_DEAGLE_COST0)
                
strip_user_weapons id );
                
give_item id"weapon_deagle" );
                
give_item id"weapon_knife" );
                
                
formatex(returntextcharsmax(returntext), "%L"id"BOUGHT_DEAGLE"TITLE);
                
colored_messageidreturntext,)
                
                
Activated_Deagle[id] += 1;
            }
            else
            {
                
formatex(returntextcharsmax(returntext), "%L"id"NOT_ENOUGH_MONEY"TITLE);
                
colored_messageidreturntext,)
            }
        
        }
        case 
100:
        {
            if (
money >= CONFIG_LIVE_COST)
            {
                
cs_set_user_money(idmoney CONFIG_LIVE_COST0)
                
                new 
lives get_user_lives id );
                
                
set_user_lives idlives );
                
    
                
formatex(returntextcharsmax(returntext), "%L"id"BOUGHT_LIVE"TITLElives );
                
colored_messageidreturntext,)
                
            }
            else
            {
                
formatex(returntextcharsmax(returntext), "%L"id"NOT_ENOUGH_MONEY"TITLE);
                
colored_messageidreturntext,)
            }
        
        }
        case 
101:
        {
            new 
lives get_user_lives id );
            
            if ( 
lives >= )
            {    
                
set_user_lives idlives );
                
cs_set_user_money(idmoney CONFIG_LIVE_COST-25001)
                
    
                
formatex(returntextcharsmax(returntext), "%L"id"SELL_LIVE"TITLElives );
                
colored_messageidreturntext,)
                
            }
            else
            {
                
formatex(returntextcharsmax(returntext), "%L"id"NOT_ENOUGH_SOULS"TITLE);
                
colored_messageidreturntext,)
            }
        
        }
    }
    
    return 
PLUGIN_CONTINUE;
}

public 
SetGravityid )
{

    if ( !
is_user_alive(id) )
    {
        return;
    }


    if ( 
Activated_Gravity[id] )
    {
        
set_user_gravityid0.4)//get_cvar_float ("jump_high"));
    
}
    else
        
set_user_gravityid1.0)

    return;

__________________

Last edited by kramesa; 10-25-2011 at 19:37.
kramesa is offline
Qifi
Junior Member
Join Date: Feb 2011
Old 10-26-2011 , 05:06   Re: Need Help
Reply With Quote #3

Thanks very much
Qifi 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 14:15.


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