Raised This Month: $ Target: $400
 0% 

Fix Plugin


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Eviatar Mor
Senior Member
Join Date: Jun 2014
Location: israel
Old 09-26-2014 , 06:10   Fix Plugin
Reply With Quote #1

hey,
i new with variable so always i use variable i have warnings can someone fix my plugin: (3 warnings.)
PHP Code:
/* Plugin generated by AMXX-Studio */

#include <amxmodx>
#include <hamsandwich>
#include <amxmisc> 
#include <cstrike> 
#include <engine> 
#include <fun> 

#define PLUGIN "Shop HNS"
#define VERSION "1.0"
#define AUTHOR "/A/"

new cash[33];
new 
autobhop[33];
new 
doubleshot[33];
new 
g_iMaxPlayers;
new 
silentwalk[33];
public 
plugin_init() {
    
register_dictionary("ShopHns.txt")
    
register_clcmd("say /shop","cmdshop")
    
RegisterHamHam_Spawn"player""player_spawn"
    
RegisterHam(Ham_TakeDamage"player""Player_TakeDamage");
    
g_iMaxPlayers get_maxplayers();
}
public 
cmdShop(id)
{
    new 
menu menu_create("\rShop Menu:""cmdShop_handler");
    
menu_additem(menu"\w50Hp \r(\y2000$\r)""1"0);
    
menu_additem(menu"\w100Hp \r(\y4000$\r)""2"0);
    
menu_additem(menu"\w50Armor \r(\y1000$\r)""3"0);
    
menu_additem(menu"\w100Armor \r(\y2000$\r)""4"0);
    
menu_additem(menu"\wAuto Bhop \r(\y12000$\r)""5"0);
    
menu_additem(menu"\wHe Grenade \r(\y1000$\r)""6"0);
    
menu_additem(menu"\wGravity 400 \r(\y12000$\r)""7"0);
    
menu_additem(menu"\wSpeed 400 \r(\y10000$\r)""8"0);
    
menu_additem(menu"\wDouble Shot [Knife] \r(\y12000$\r)""9"0);
    
menu_additem(menu"\wSilent Walk [CT]  \r(\y3000$\r)""10"0);
    
menu_setprop(menuMPROP_EXITMEXIT_ALL);
    
menu_display(idmenu0);
}

public 
cmdShop_handler(idmenuitemindex)
{
    if( 
item == MENU_EXIT )
    {
        
menu_destroy(menu);
        return 
PLUGIN_HANDLED;
    }
    new 
data[6], szName[64];
    new 
accesscallback;
    
menu_item_getinfo(menuitemaccessdata,charsmax(data), szName,charsmax(szName), callback);
    
cash[id] = cs_get_user_money(id);
    new 
key str_to_num(data);
    switch(
key)
    {
        case 
1:
        {
            if(
cash[id] > 2000)
            {
           
client_print(idprint_chat"[Shop HNS] %L"LANG_PLAYER,"HAVE_MONEY_50HP")
           
cs_set_user_money(idcash[id] - 2000);
           
set_user_health(idget_user_health(id) + 50)  
            }
            else {
                
client_print(idprint_chat"[Shop HNS] %L"LANG_PLAYER,"DONT_HAVE_MONEY_50HP")

            }
        }
        case 
2:
        {
            if(
cash[id] > 4000)
            {
           
client_print(idprint_chat"[Shop HNS] %L"LANG_PLAYER,"HAVE_MONEY_100HP")
           
cs_set_user_money(idcash[id] - 4000);
           
set_user_health(idget_user_health(id) + 100)  
            }
            else {
                
client_print(idprint_chat"[Shop HNS] %L"LANG_PLAYER,"DONT_HAVE_MONEY_100HP")

            }
        }
    case 
3:
        {
            if(
cash[id] > 1000)
            {
           
client_print(idprint_chat"[Shop HNS] %L"LANG_PLAYER,"HAVE_MONEY_50ARMOR")
           
cs_set_user_money(idcash[id] - 1000);
           
set_user_armor(idget_user_armor(id) + 50)  
            }
            else {
                
client_print(idprint_chat"[Shop HNS] %L"LANG_PLAYER,"DONT_HAVE_MONEY_50ARMOR")

            }
        }
    case 
4:
        {
            if(
cash[id] > 2000)
            {
           
client_print(idprint_chat"[Shop HNS] %L"LANG_PLAYER,"HAVE_MONEY_100ARMOR")
           
cs_set_user_money(idcash[id] - 2000);
           
set_user_armor(idget_user_armor(id) + 100)  
            }
            else {
                
client_print(idprint_chat"[Shop HNS] %L"LANG_PLAYER,"DONT_HAVE_MONEY_100ARMOR")

            }
        }
    case 
5:
        {
            if(
cash[id] > 12000)
            {
           
client_print(idprint_chat"[Shop HNS] %L"LANG_PLAYER,"HAVE_MONEY_AUTOBHOP")
           
cs_set_user_money(idcash[id] - 12000);
           
autobhop[id] = true
            
}
            else {
                
client_print(idprint_chat"[Shop HNS] %L"LANG_PLAYER,"DONT_HAVE_MONEY_AUTOBHOP")
           
autobhop[id] = false
            
}
        }
    case 
6:
        {
            if(
cash[id] > 1000)
            {
           
client_print(idprint_chat"[Shop HNS] %L"LANG_PLAYER,"HAVE_MONEY_HE")
           
cs_set_user_money(idcash[id] - 1000);
           
give_item(id,"weapon_hegrenade")
            }
            else {
                
client_print(idprint_chat"[Shop HNS] %L"LANG_PLAYER,"DONT_HAVE_MONEY_HE")
           
            }
        }
    case 
7:
        {
            if(
cash[id] > 12000)
            {
           
client_print(idprint_chat"[Shop HNS] %L"LANG_PLAYER,"HAVE_MONEY_GRAVITY")
           
cs_set_user_money(idcash[id] - 12000);
           
set_user_gravity index0.5)
            }
            else {
                
client_print(idprint_chat"[Shop HNS] %L"LANG_PLAYER,"DONT_HAVE_MONEY_GRAVITY")
           
            }
        }
    case 
8:
        {
            if(
cash[id] > 10000)
            {
           
client_print(idprint_chat"[Shop HNS] %L"LANG_PLAYER,"HAVE_MONEY_SPEED")
           
cs_set_user_money(idcash[id] - 10000);
           
set_user_maxspeed(id400.0)
            }
            else {
                
client_print(idprint_chat"[Shop HNS] %L"LANG_PLAYER,"DONT_HAVE_MONEY_SPEED")
           
            }
        }
    case 
9:
        {
            if(
cash[id] > 12000)
            {
           
client_print(idprint_chat"[Shop HNS] %L"LANG_PLAYER,"HAVE_MONEY_DOUBLESHOT")
           
cs_set_user_money(idcash[id] - 12000);
           
doubleshot[id] = true
            
}
            else {
                
client_print(idprint_chat"[Shop HNS] %L"LANG_PLAYER,"DONT_HAVE_MONEY_DOUBLESHOT")
           
doubleshot[id] = false
            
}
        }
    case 
10:
        {
            if(
cash[id] > 3000)
            {
           
client_print(idprint_chat"[Shop HNS] %L"LANG_PLAYER,"HAVE_MONEY_SILENTWALK")
           
cs_set_user_money(idcash[id] - 3000);
           
silentwalk[id] = true
            
}
            else {
                
client_print(idprint_chat"[Shop HNS] %L"LANG_PLAYER,"DONT_HAVE_MONEY_SILENTWALK")
           
silentwalk[id] = false
            
}
        }
    }    
menu_destroy(menu);
    return 
PLUGIN_HANDLED;


public 
client_PreThink(id)
{
    if(
autobhop[id] && is_user_alive(id))
    {
            new 
oldbuttons get_user_oldbutton(id);
            
oldbuttons &= ~IN_JUMP;
            
entity_set_int(idEV_INT_oldbuttonsoldbuttons);
        
    }
}

public 
Player_TakeDamage(idinflictorattackerFloat:damagedamagebits

    if (
doubleshot[id])
    if(    !(
<= attacker <= g_iMaxPlayers)  
    ||    
attacker != inflictor 
    
||    get_user_weapon(attacker) != CSW_KNIFE    
        return 
HAM_IGNORED
    
SetHamParamFloat(4damage 2); //Here knife does double damage, ofc you can set it to 0.0 or anything. 
    
return HAM_HANDLED
  
}  

public 
player_spawnid )
{
    if( 
is_user_aliveid ) && silentwalk[id])
    {
        switch( 
cs_get_user_teamid ) )
        {
            case 
CS_TEAM_CT:
            {
                
set_user_footstepsid
            }
        }
    }

tnx about help.

Last edited by Eviatar Mor; 09-26-2014 at 06:11.
Eviatar Mor is offline
Deathknife
Senior Member
Join Date: Aug 2014
Old 09-26-2014 , 06:19   Re: Fix Plugin
Reply With Quote #2

Only warnings you got was loose identation. Which isn't really anything.
Code:
/* Plugin generated by AMXX-Studio */

#include <amxmodx>
#include <hamsandwich>
#include <amxmisc> 
#include <cstrike> 
#include <engine> 
#include <fun> 

#define PLUGIN "Shop HNS"
#define VERSION "1.0"
#define AUTHOR "/A/"

new cash[33];
new autobhop[33];
new doubleshot[33];
new g_iMaxPlayers;
new silentwalk[33];
public plugin_init() {
    register_dictionary("ShopHns.txt")
    register_clcmd("say /shop","cmdshop")
    RegisterHam( Ham_Spawn, "player", "player_spawn", 1 ) 
    RegisterHam(Ham_TakeDamage, "player", "Player_TakeDamage");
    g_iMaxPlayers = get_maxplayers();
}
public cmdShop(id)
{
    new menu = menu_create("\rShop Menu:", "cmdShop_handler");
    menu_additem(menu, "\w50Hp \r(\y2000$\r)", "1", 0);
    menu_additem(menu, "\w100Hp \r(\y4000$\r)", "2", 0);
    menu_additem(menu, "\w50Armor \r(\y1000$\r)", "3", 0);
    menu_additem(menu, "\w100Armor \r(\y2000$\r)", "4", 0);
    menu_additem(menu, "\wAuto Bhop \r(\y12000$\r)", "5", 0);
    menu_additem(menu, "\wHe Grenade \r(\y1000$\r)", "6", 0);
    menu_additem(menu, "\wGravity 400 \r(\y12000$\r)", "7", 0);
    menu_additem(menu, "\wSpeed 400 \r(\y10000$\r)", "8", 0);
    menu_additem(menu, "\wDouble Shot [Knife] \r(\y12000$\r)", "9", 0);
    menu_additem(menu, "\wSilent Walk [CT]  \r(\y3000$\r)", "10", 0);
    menu_setprop(menu, MPROP_EXIT, MEXIT_ALL);
    menu_display(id, menu, 0);
}

public cmdShop_handler(id, menu, item, index)
{
    if( item == MENU_EXIT )
    {
        menu_destroy(menu);
        return PLUGIN_HANDLED;
    }
    new data[6], szName[64];
    new access, callback;
    menu_item_getinfo(menu, item, access, data,charsmax(data), szName,charsmax(szName), callback);
    cash[id] = cs_get_user_money(id);
    new key = str_to_num(data);
    switch(key)
    {
        case 1:
        {
            if(cash[id] > 2000)
            {
           client_print(id, print_chat, "[Shop HNS] %L", LANG_PLAYER,"HAVE_MONEY_50HP")
           cs_set_user_money(id, cash[id] - 2000);
           set_user_health(id, get_user_health(id) + 50)  
            }
            else {
                client_print(id, print_chat, "[Shop HNS] %L", LANG_PLAYER,"DONT_HAVE_MONEY_50HP")

            }
        }
        case 2:
        {
            if(cash[id] > 4000)
            {
           client_print(id, print_chat, "[Shop HNS] %L", LANG_PLAYER,"HAVE_MONEY_100HP")
           cs_set_user_money(id, cash[id] - 4000);
           set_user_health(id, get_user_health(id) + 100)  
            }
            else {
                client_print(id, print_chat, "[Shop HNS] %L", LANG_PLAYER,"DONT_HAVE_MONEY_100HP")

            }
        }
    case 3:
        {
            if(cash[id] > 1000)
            {
           client_print(id, print_chat, "[Shop HNS] %L", LANG_PLAYER,"HAVE_MONEY_50ARMOR")
           cs_set_user_money(id, cash[id] - 1000);
           set_user_armor(id, get_user_armor(id) + 50)  
            }
            else {
                client_print(id, print_chat, "[Shop HNS] %L", LANG_PLAYER,"DONT_HAVE_MONEY_50ARMOR")

            }
        }
    case 4:
        {
            if(cash[id] > 2000)
            {
           client_print(id, print_chat, "[Shop HNS] %L", LANG_PLAYER,"HAVE_MONEY_100ARMOR")
           cs_set_user_money(id, cash[id] - 2000);
           set_user_armor(id, get_user_armor(id) + 100)  
            }
            else {
                client_print(id, print_chat, "[Shop HNS] %L", LANG_PLAYER,"DONT_HAVE_MONEY_100ARMOR")

            }
        }
    case 5:
        {
            if(cash[id] > 12000)
            {
           client_print(id, print_chat, "[Shop HNS] %L", LANG_PLAYER,"HAVE_MONEY_AUTOBHOP")
           cs_set_user_money(id, cash[id] - 12000);
           autobhop[id] = true
            }
            else {
                client_print(id, print_chat, "[Shop HNS] %L", LANG_PLAYER,"DONT_HAVE_MONEY_AUTOBHOP")
                autobhop[id] = false
            }
        }
    case 6:
        {
            if(cash[id] > 1000)
            {
           client_print(id, print_chat, "[Shop HNS] %L", LANG_PLAYER,"HAVE_MONEY_HE")
           cs_set_user_money(id, cash[id] - 1000);
           give_item(id,"weapon_hegrenade")
            }
            else {
                client_print(id, print_chat, "[Shop HNS] %L", LANG_PLAYER,"DONT_HAVE_MONEY_HE")
           
            }
        }
    case 7:
        {
            if(cash[id] > 12000)
            {
           client_print(id, print_chat, "[Shop HNS] %L", LANG_PLAYER,"HAVE_MONEY_GRAVITY")
           cs_set_user_money(id, cash[id] - 12000);
           set_user_gravity ( index, 0.5)
            }
            else {
                client_print(id, print_chat, "[Shop HNS] %L", LANG_PLAYER,"DONT_HAVE_MONEY_GRAVITY")
           
            }
        }
    case 8:
        {
            if(cash[id] > 10000)
            {
           client_print(id, print_chat, "[Shop HNS] %L", LANG_PLAYER,"HAVE_MONEY_SPEED")
           cs_set_user_money(id, cash[id] - 10000);
           set_user_maxspeed(id, 400.0)
            }
            else {
                client_print(id, print_chat, "[Shop HNS] %L", LANG_PLAYER,"DONT_HAVE_MONEY_SPEED")
           
            }
        }
    case 9:
        {
            if(cash[id] > 12000)
            {
           client_print(id, print_chat, "[Shop HNS] %L", LANG_PLAYER,"HAVE_MONEY_DOUBLESHOT")
           cs_set_user_money(id, cash[id] - 12000);
           doubleshot[id] = true
            }
            else {
                client_print(id, print_chat, "[Shop HNS] %L", LANG_PLAYER,"DONT_HAVE_MONEY_DOUBLESHOT")
                doubleshot[id] = false
            }
        }
    case 10:
        {
            if(cash[id] > 3000)
            {
           client_print(id, print_chat, "[Shop HNS] %L", LANG_PLAYER,"HAVE_MONEY_SILENTWALK")
           cs_set_user_money(id, cash[id] - 3000);
           silentwalk[id] = true
            }
            else {
                client_print(id, print_chat, "[Shop HNS] %L", LANG_PLAYER,"DONT_HAVE_MONEY_SILENTWALK")
                silentwalk[id] = false
            }
        }
    }    menu_destroy(menu);
    return PLUGIN_HANDLED;
} 

public client_PreThink(id)
{
    if(autobhop[id] && is_user_alive(id))
    {
            new oldbuttons = get_user_oldbutton(id);
            oldbuttons &= ~IN_JUMP;
            entity_set_int(id, EV_INT_oldbuttons, oldbuttons);
        
    }
}

public Player_TakeDamage(id, inflictor, attacker, Float:damage, damagebits) 
{ 
    if (doubleshot[id])
    if(    !(1 <= attacker <= g_iMaxPlayers)  
    ||    attacker != inflictor 
    ||    get_user_weapon(attacker) != CSW_KNIFE    ) 
        return HAM_IGNORED; 
    SetHamParamFloat(4, damage * 2); //Here knife does double damage, ofc you can set it to 0.0 or anything. 
    return HAM_HANDLED; 
  
}  

public player_spawn( id )
{
    if( is_user_alive( id ) && silentwalk[id])
    {
        switch( cs_get_user_team( id ) )
        {
            case CS_TEAM_CT:
            {
                set_user_footsteps( id, 1 ) 
            }
        }
    }
}
This shouldn't give you any.
Deathknife is offline
Eviatar Mor
Senior Member
Join Date: Jun 2014
Location: israel
Old 09-26-2014 , 06:55   Re: Fix Plugin
Reply With Quote #3

Quote:
Originally Posted by Deathknife View Post
Only warnings you got was loose identation. Which isn't really anything.
Code:
/* Plugin generated by AMXX-Studio */

#include <amxmodx>
#include <hamsandwich>
#include <amxmisc> 
#include <cstrike> 
#include <engine> 
#include <fun> 

#define PLUGIN "Shop HNS"
#define VERSION "1.0"
#define AUTHOR "/A/"

new cash[33];
new autobhop[33];
new doubleshot[33];
new g_iMaxPlayers;
new silentwalk[33];
public plugin_init() {
    register_dictionary("ShopHns.txt")
    register_clcmd("say /shop","cmdshop")
    RegisterHam( Ham_Spawn, "player", "player_spawn", 1 ) 
    RegisterHam(Ham_TakeDamage, "player", "Player_TakeDamage");
    g_iMaxPlayers = get_maxplayers();
}
public cmdShop(id)
{
    new menu = menu_create("\rShop Menu:", "cmdShop_handler");
    menu_additem(menu, "\w50Hp \r(\y2000$\r)", "1", 0);
    menu_additem(menu, "\w100Hp \r(\y4000$\r)", "2", 0);
    menu_additem(menu, "\w50Armor \r(\y1000$\r)", "3", 0);
    menu_additem(menu, "\w100Armor \r(\y2000$\r)", "4", 0);
    menu_additem(menu, "\wAuto Bhop \r(\y12000$\r)", "5", 0);
    menu_additem(menu, "\wHe Grenade \r(\y1000$\r)", "6", 0);
    menu_additem(menu, "\wGravity 400 \r(\y12000$\r)", "7", 0);
    menu_additem(menu, "\wSpeed 400 \r(\y10000$\r)", "8", 0);
    menu_additem(menu, "\wDouble Shot [Knife] \r(\y12000$\r)", "9", 0);
    menu_additem(menu, "\wSilent Walk [CT]  \r(\y3000$\r)", "10", 0);
    menu_setprop(menu, MPROP_EXIT, MEXIT_ALL);
    menu_display(id, menu, 0);
}

public cmdShop_handler(id, menu, item, index)
{
    if( item == MENU_EXIT )
    {
        menu_destroy(menu);
        return PLUGIN_HANDLED;
    }
    new data[6], szName[64];
    new access, callback;
    menu_item_getinfo(menu, item, access, data,charsmax(data), szName,charsmax(szName), callback);
    cash[id] = cs_get_user_money(id);
    new key = str_to_num(data);
    switch(key)
    {
        case 1:
        {
            if(cash[id] > 2000)
            {
           client_print(id, print_chat, "[Shop HNS] %L", LANG_PLAYER,"HAVE_MONEY_50HP")
           cs_set_user_money(id, cash[id] - 2000);
           set_user_health(id, get_user_health(id) + 50)  
            }
            else {
                client_print(id, print_chat, "[Shop HNS] %L", LANG_PLAYER,"DONT_HAVE_MONEY_50HP")

            }
        }
        case 2:
        {
            if(cash[id] > 4000)
            {
           client_print(id, print_chat, "[Shop HNS] %L", LANG_PLAYER,"HAVE_MONEY_100HP")
           cs_set_user_money(id, cash[id] - 4000);
           set_user_health(id, get_user_health(id) + 100)  
            }
            else {
                client_print(id, print_chat, "[Shop HNS] %L", LANG_PLAYER,"DONT_HAVE_MONEY_100HP")

            }
        }
    case 3:
        {
            if(cash[id] > 1000)
            {
           client_print(id, print_chat, "[Shop HNS] %L", LANG_PLAYER,"HAVE_MONEY_50ARMOR")
           cs_set_user_money(id, cash[id] - 1000);
           set_user_armor(id, get_user_armor(id) + 50)  
            }
            else {
                client_print(id, print_chat, "[Shop HNS] %L", LANG_PLAYER,"DONT_HAVE_MONEY_50ARMOR")

            }
        }
    case 4:
        {
            if(cash[id] > 2000)
            {
           client_print(id, print_chat, "[Shop HNS] %L", LANG_PLAYER,"HAVE_MONEY_100ARMOR")
           cs_set_user_money(id, cash[id] - 2000);
           set_user_armor(id, get_user_armor(id) + 100)  
            }
            else {
                client_print(id, print_chat, "[Shop HNS] %L", LANG_PLAYER,"DONT_HAVE_MONEY_100ARMOR")

            }
        }
    case 5:
        {
            if(cash[id] > 12000)
            {
           client_print(id, print_chat, "[Shop HNS] %L", LANG_PLAYER,"HAVE_MONEY_AUTOBHOP")
           cs_set_user_money(id, cash[id] - 12000);
           autobhop[id] = true
            }
            else {
                client_print(id, print_chat, "[Shop HNS] %L", LANG_PLAYER,"DONT_HAVE_MONEY_AUTOBHOP")
                autobhop[id] = false
            }
        }
    case 6:
        {
            if(cash[id] > 1000)
            {
           client_print(id, print_chat, "[Shop HNS] %L", LANG_PLAYER,"HAVE_MONEY_HE")
           cs_set_user_money(id, cash[id] - 1000);
           give_item(id,"weapon_hegrenade")
            }
            else {
                client_print(id, print_chat, "[Shop HNS] %L", LANG_PLAYER,"DONT_HAVE_MONEY_HE")
           
            }
        }
    case 7:
        {
            if(cash[id] > 12000)
            {
           client_print(id, print_chat, "[Shop HNS] %L", LANG_PLAYER,"HAVE_MONEY_GRAVITY")
           cs_set_user_money(id, cash[id] - 12000);
           set_user_gravity ( index, 0.5)
            }
            else {
                client_print(id, print_chat, "[Shop HNS] %L", LANG_PLAYER,"DONT_HAVE_MONEY_GRAVITY")
           
            }
        }
    case 8:
        {
            if(cash[id] > 10000)
            {
           client_print(id, print_chat, "[Shop HNS] %L", LANG_PLAYER,"HAVE_MONEY_SPEED")
           cs_set_user_money(id, cash[id] - 10000);
           set_user_maxspeed(id, 400.0)
            }
            else {
                client_print(id, print_chat, "[Shop HNS] %L", LANG_PLAYER,"DONT_HAVE_MONEY_SPEED")
           
            }
        }
    case 9:
        {
            if(cash[id] > 12000)
            {
           client_print(id, print_chat, "[Shop HNS] %L", LANG_PLAYER,"HAVE_MONEY_DOUBLESHOT")
           cs_set_user_money(id, cash[id] - 12000);
           doubleshot[id] = true
            }
            else {
                client_print(id, print_chat, "[Shop HNS] %L", LANG_PLAYER,"DONT_HAVE_MONEY_DOUBLESHOT")
                doubleshot[id] = false
            }
        }
    case 10:
        {
            if(cash[id] > 3000)
            {
           client_print(id, print_chat, "[Shop HNS] %L", LANG_PLAYER,"HAVE_MONEY_SILENTWALK")
           cs_set_user_money(id, cash[id] - 3000);
           silentwalk[id] = true
            }
            else {
                client_print(id, print_chat, "[Shop HNS] %L", LANG_PLAYER,"DONT_HAVE_MONEY_SILENTWALK")
                silentwalk[id] = false
            }
        }
    }    menu_destroy(menu);
    return PLUGIN_HANDLED;
} 

public client_PreThink(id)
{
    if(autobhop[id] && is_user_alive(id))
    {
            new oldbuttons = get_user_oldbutton(id);
            oldbuttons &= ~IN_JUMP;
            entity_set_int(id, EV_INT_oldbuttons, oldbuttons);
        
    }
}

public Player_TakeDamage(id, inflictor, attacker, Float:damage, damagebits) 
{ 
    if (doubleshot[id])
    if(    !(1 <= attacker <= g_iMaxPlayers)  
    ||    attacker != inflictor 
    ||    get_user_weapon(attacker) != CSW_KNIFE    ) 
        return HAM_IGNORED; 
    SetHamParamFloat(4, damage * 2); //Here knife does double damage, ofc you can set it to 0.0 or anything. 
    return HAM_HANDLED; 
  
}  

public player_spawn( id )
{
    if( is_user_alive( id ) && silentwalk[id])
    {
        switch( cs_get_user_team( id ) )
        {
            case CS_TEAM_CT:
            {
                set_user_footsteps( id, 1 ) 
            }
        }
    }
}
This shouldn't give you any.
Thanks u ! but u can tell me what u do ?
Eviatar Mor is offline
zmd94
Veteran Member
Join Date: Nov 2013
Location: Malaysia (9w2zow).
Old 09-26-2014 , 07:08   Re: Fix Plugin
Reply With Quote #4

He just fix the indentation of the code. ;)
zmd94 is offline
Eviatar Mor
Senior Member
Join Date: Jun 2014
Location: israel
Old 09-26-2014 , 07:19   Re: Fix Plugin
Reply With Quote #5

Quote:
Originally Posted by zmd94 View Post
He just fix the indentation of the code. ;)
oo tnxx
Eviatar Mor 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 10:25.


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