Raised This Month: $ Target: $400
 0% 

[help] a few have problem


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Erdener
Senior Member
Join Date: Apr 2010
Location: Turkey
Old 02-15-2013 , 04:56   [help] a few have problem
Reply With Quote #1

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
PHP Code:
cs_set_user_bpammo(killerwpn_indexamount
__________________

Last edited by Erdener; 02-15-2013 at 05:16.
Erdener is offline
 



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 20:31.


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