AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   [help] a few have problem (https://forums.alliedmods.net/showthread.php?t=208571)

Erdener 02-15-2013 04:56

[help] a few have problem
 
PHP Code:

#include <amxmodx>
#include <cstrike>
#include <fun>
#include <colorchat>

#define PLUGIN "[FUN]: Level Atlayinca Silah Degistir"
#define VERSION "1.0"
#define AUTHOR "eRdeneR"

new kills[33] = {0,...}
new 
deaths[33] = {0,...}
new 
kill[33][24]

#define LEVELS 4

new levels[4] = {1234}

new 
weapons[4][] = 
{
    
"weapon_deagle",
    
"weapon_p228",
    
"weapon_elites",
    
"weapon_fiveseven"
}

new 
g_clip_size[31] = {-152, -190,  1,  32,  1,  10090,  1,  120,  100,  100909090,  100,  120,
            
30,  120200,  3290,  12090,  2,  359090, -1,  100}

new const 
AMMO[] = "items/9mmclip1.wav"
new const LEVELUP[] = "deathrun/levelup.wav"

public plugin_precache()
{
    
precache_sound(AMMO);
    
precache_sound(LEVELUP);
}
public 
plugin_init()
{
    
register_plugin(PLUGINVERSIONAUTHOR);
    
register_event("DeathMsg""Event_Death""a");
}

public 
client_connect(id) {
    
kills[id] = 0;
    
deaths[id] = 0;
}  

public 
client_disconnect(id) {
    
kills[id] = 0;
    
deaths[id] = 0;
}

public 
Event_Death(id) {
    new 
killer read_data(1);
    new 
victim read_data(2);
    new 
weapon[24], vicname[32], killname[32]
    
read_data(4,weapon,23)
    
get_user_name(victim,vicname,31)
    
get_user_name(killer,killname,31)
    
ColorChat(0,NORMAL,"^4[Level -> Silah]:^1 ^3%s^1, ^4%s^1 tarafindan olduruldun...!",vicname,killname)
    
client_cmd(id,"spk deathrun/levelup");
    

    
kills[killer] += 1;
    
kills[victim] = 0;
    
deaths[killer] = 0;
    
deaths[victim] += 1;

    for (new 
0LEVELSi++) 
    {
        if (
kills[killer] == levels[i]) 
        {
            
announce(killeri);
            return 
PLUGIN_CONTINUE;
        }
    }
    return 
PLUGIN_CONTINUE;
}

announce(killerlevel) {
    new 
wpn_index get_user_weapon(killer)

    if(
g_clip_size[wpn_index] > -1)
    {
        new 
amount cs_get_user_bpammo(killerwpn_index)

        if(
amount g_clip_size[wpn_index])
        {
            
amount += 10

            
if(amount g_clip_size[wpn_index])
            {
                
amount g_clip_size[wpn_index]
            }
            
emit_sound(killerCHAN_AUTOAMMO1.0ATTN_NORM0PITCH_NORM)
            
cs_set_user_bpammo(killerwpn_indexamount)
            
strip_user_weapons(killer)
            
give_item(killerweapons[level]);
        }
    }



1) Old weapons not strip. not work
PHP Code:

strip_user_weapons(killer

2) not work :cry:
PHP Code:

cs_set_user_bpammo(killerwpn_indexamount


fysiks 02-15-2013 10:21

Re: [help] a few have problem
 
Is this before or after updating your server and metamod and AMX Mod X?

Erdener 02-15-2013 10:56

Re: [help] a few have problem
 
Quote:

Originally Posted by fysiks (Post 1894923)
Is this before or after updating your server and metamod and AMX Mod X?

No, I don't update.

YamiKaitou 02-15-2013 17:22

Re: [help] a few have problem
 
Update you server to the latest version and then update AMXX

Erdener 02-16-2013 05:02

Re: [help] a few have problem
 
Ok, I updated AMXX but, I'm having trouble again :(

YamiKaitou 02-16-2013 05:24

Re: [help] a few have problem
 
Did you update your server to the latest version (ie, using SteamCMD) as well?

Erdener 02-16-2013 07:05

Re: [help] a few have problem
 
No


All times are GMT -4. The time now is 20:31.

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