Raised This Month: $ Target: $400
 0% 

Replacing Holster and Deploy


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Nextra
Veteran Member
Join Date: Apr 2008
Location: Germany
Old 10-07-2014 , 16:07   Re: Replacing Holster and Deploy
Reply With Quote #5

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

#pragma semicolon 1
#pragma ctrlchar '\'

new hprehpostdpredpost;

public 
plugin_init() {
    
register_plugin("Hamtest""0.0.1""Nextra");

    new 
wpnname[32];
    for(new 
wpn CSW_P228wpn <= CSW_P90; ++wpn) {
        if (
get_weaponname(wpnwpnnamecharsmax(wpnname))) {
            for (new 
0100000; ++i) {
                
RegisterHam(Ham_Item_Holsterwpnname"holster_pre_whynot");
                
RegisterHam(Ham_Item_Deploywpnname"deploy_pre_whynot");
                
RegisterHam(Ham_Item_Holsterwpnname"holster_post_whynot", .Post 1);
                
RegisterHam(Ham_Item_Deploywpnname"deploy_post_whynot", .Post 1);
            }
        }
    }

    
register_clcmd("hamtest""cmd_hamtest");
}

public 
holster_pre_whynot(const ent) {
    ++
hpre;
}

public 
deploy_pre_whynot(const ent) {
    ++
dpre;
}

public 
holster_post_whynot(const ent) {
    ++
hpost;
}

public 
deploy_post_whynot(const ent) {
    ++
dpost;
}

public 
cmd_hamtest(const client) {
    
client_print(clientprint_chat"hpre: %d hpost: %d dpre: %d dpost: %d"hprehpostdpredpost);
    
hpre hpost dpre dpost 0;

Doesn't crash.
__________________
In Flames we trust!

Last edited by Nextra; 10-07-2014 at 16:10.
Nextra 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 17:45.


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