Raised This Month: $12 Target: $400
 3% 

[REQ] Little plugin editing


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
shadybg
Member
Join Date: Jun 2011
Old 03-30-2012 , 08:57   [REQ] Little plugin editing
Reply With Quote #1

I found 2 cool plugins and i wanna add some options to em

1. Free Equipment
PHP Code:

#include <amxmodx>
#include <fakemeta_util>
#include <hamsandwich>

#define PLUGIN "Free Equipment"
#define AUTHOR "SHLAKBAUM"
#define VERSION "0.2"

new g_Free

public plugin_init() {
    
register_plugin(PLUGIN,VERSION,AUTHOR);
    
g_Free register_cvar"amx_free""1" );
    
RegisterHamHam_Spawn"player""fwHamPlayerSpawnPost");
}

public 
fwHamPlayerSpawnPostid ) {

    if( 
get_pcvar_num(g_Free))
        
set_task(1.0"Free"id);
    
    return 
HAM_IGNORED;
}

public 
Freeid ) {
    if( 
is_user_aliveid ) ) {
        
fm_give_item(id,"ammo_45acp")
        
fm_give_item(id,"ammo_45acp")
        
fm_give_item(id,"ammo_45acp")
        
fm_give_item(id,"ammo_45acp")
        
fm_give_item(id,"ammo_45acp")
        
fm_give_item(id,"ammo_45acp")
        
fm_give_item(id,"ammo_45acp")
        
fm_give_item(id,"ammo_45acp")
        
fm_give_item(id,"ammo_45acp")
        
fm_give_item(id,"ammo_45acp")
        
fm_give_item(id,"ammo_57mm")
        
fm_give_item(id,"ammo_57mm")
        
fm_give_item(id,"ammo_57mm")
        
fm_give_item(id,"ammo_57mm")
        
fm_give_item(id,"ammo_57mm")
        
fm_give_item(id,"ammo_57mm")
        
fm_give_item(id,"ammo_9mm")
        
fm_give_item(id,"ammo_9mm")
        
fm_give_item(id,"ammo_9mm")
        
fm_give_item(id,"ammo_9mm")
        
fm_give_item(id,"ammo_50ae")
        
fm_give_item(id,"ammo_50ae")
        
fm_give_item(id,"ammo_50ae")
        
fm_give_item(id,"ammo_50ae")
        
fm_give_item(id,"ammo_50ae")
        
fm_give_item(id,"ammo_357sig")
        
fm_give_item(id,"ammo_357sig")
        
fm_give_item(id,"ammo_357sig")
        
fm_give_item(id,"ammo_357sig")
        
fm_give_item(id,"ammo_buckshot")
        
fm_give_item(id,"ammo_buckshot")
        
fm_give_item(id,"ammo_buckshot")
        
fm_give_item(id,"ammo_buckshot")
        
fm_give_item(id,"ammo_762nato")
        
fm_give_item(id,"ammo_762nato")
        
fm_give_item(id,"ammo_762nato")
        
fm_give_item(id,"ammo_357sig")
        
fm_give_item(id,"ammo_357sig")
        
fm_give_item(id,"ammo_357sig")
        
fm_give_item(id,"ammo_338magnum")
        
fm_give_item(id,"ammo_338magnum")
        
fm_give_item(id,"ammo_338magnum")
        
fm_give_item(id,"ammo_556nato")
        
fm_give_item(id,"ammo_556nato")
        
fm_give_item(id,"ammo_556nato")
        
fm_give_item(id,"ammo_556natobox")
        
fm_give_item(id,"ammo_556natobox")
        
fm_give_item(id,"ammo_556natobox")
        
fm_give_item(id,"ammo_556natobox")
        
fm_give_item(id,"ammo_556natobox")
        
fm_give_item(id,"ammo_556natobox")
        
fm_give_item(id,"ammo_556natobox")
        
fm_give_item(id,"weapon_hegrenade")
        
fm_give_item(id,"item_thighpack")
    }

To Do:Adding Defuse Kit ( if CT ) and He Grenade

2. Demo Recorder
PHP Code:
#include <amxmodx>
#include <colorchat>
#pragma semicolon 1

new g_Toggleg_DModg_UseNIg_RStartAfterg_DemoNameg_DemoNamePrefix;

public 
plugin_init() { 
    
register_plugin"Auto Demo Recorder""1.5""IzI" );
    
g_Toggle         register_cvar"amx_demo",        "1" );
    
g_DMod            register_cvar"amx_demo_mode",    "0" );
    
g_UseNI         register_cvar"amx_demo_steamid",    "0" );
    
g_RStartAfter         register_cvar"amx_demo_rectime",    "15" );    // If it is less than 5, it will automatically set to 5, but willn't apply the changes to the console. I recoment to use default settings.
    
g_DemoName         register_cvar"amx_demo_name",    "Autorecorded_demo" );
    
g_DemoNamePrefix    register_cvar"amx_demo_prefix",    "[AMXX]" );
    
register_dictionary"demorecorder.txt" );
}

public 
client_putinserverid ) {
    if( 
get_pcvar_numg_Toggle ) ) {
        new 
Float:delay get_pcvar_floatg_RStartAfter );
        if( 
delay )
            
set_pcvar_floatg_RStartAfter, ( delay 5.0 ) );
        
set_taskdelay"Record"id );
    }
}

public 
Recordid ) {
    if( !
is_user_connectedid ) || get_pcvar_numg_Toggle ) != )
        return;

    
// Getting time, client SteamID, server's name, server's ip with port.
    
new szSName[128], szINamePrefix[64], szTimedata[9];
    new 
iUseIN get_pcvar_numg_UseNI );
    new 
iDMod get_pcvar_numg_DMod );
    
get_pcvar_stringg_DemoNamePrefixszINamePrefix63 );
    
get_time "%H:%M:%S"szTimedata);

    switch( 
iDMod ) {
        case 
0get_pcvar_stringg_DemoNameszSName127 );
        case 
1get_user_ip0szSName127);
        case 
2get_user_name0szSName127 );
    }

    if( 
iUseIN ) {
        new 
szCID[32];
        
get_user_authididszCID31 );
        
formatszSName127"[%s]%s"szCIDszSName );
    }

    
// Replacing signs.
    
replace_allszSName127":""_" );
    
replace_allszSName127".""_" );
    
replace_allszSName127"*""_" );
    
replace_allszSName127"/""_" );
    
replace_allszSName127"|""_" );
    
replace_allszSName127"\", "_" );
    replace_all( szSName, 127, "
?", "_" );
    replace_all( szSName, 127, "
>", "_" );
    replace_all( szSName, 127, "
<", "_" );
    replace_all( szSName, 127, " ", "
_" );

    // Displaying messages.
    client_cmd( id, "
stoprecord ^"%s^"", szSName );
    ColorChat(id, BLUE, "
^x04[%s] ^x03Now ^x04we ^x03recording^x03 ^"%s.dem^"", szINamePrefix, szSName );
    ColorChat(id, BLUE, "
^x04[%s]^x03 Demo ^x04recording^x03 has been^x04 started^x01 at^x03 %s", szINamePrefix, szTimedata );

To Do: Adding ColorChat

If anyone want to use the plug-ins, copy the php code and make your own amxx.

Plugins are not mine, I just put the options into it. If IzI have any problems that I have edited his demo recorder to color, you may remove the sma.

Last edited by shadybg; 03-31-2012 at 23:35. Reason: Last edit all plugins are with what i need
shadybg 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 15:37.


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