AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Starting weapons M4A1 and AK47 together (https://forums.alliedmods.net/showthread.php?t=172564)

spookjun 11-22-2011 17:18

Starting weapons M4A1 and AK47 together
 
need player spawn will get M4A1 and AK47 and 100 armor


PHP Code:

#include <amxmodx>  
#include <fakemeta>
#include <fun>
#include <hamsandwich>
#include <cstrike>

#define PLUGIN "Anti - Buy" 
#define VERSION "1.0" 
#define AUTHOR "XstRessful"  

#if cellbits == 32
    #define OFFSET_BUYZONE 235
#else
    #define OFFSET_BUYZONE 268
#endif

public plugin_init()  

    
register_plugin(PLUGINVERSIONAUTHOR); 
     
    
RegisterHam(Ham_Spawn"player""FwdHamPlayerSpawn");
    
    
register_messageget_user_msgid"StatusIcon" ), "msgStatusIcon" );


public 
fwHamPlayerSpawnid 

    if ( 
is_user_connectedid ) ) 
    { 
        
cs_set_user_moneyid); 
        
strip_user_weaponsid )
        
give_itemid"weapon_knife" )
    } 
    return 
PLUGIN_HANDLED

public 
msgStatusIcon( const iMsgId, const iMsgDest, const iPlayer )
{
    static 
szMsg];
    
get_msg_arg_string2szMsg);
    
    if( 
equalszMsg"buyzone" ) )
    {
        
set_pdata_intiPlayerOFFSET_BUYZONEget_pdata_intiPlayerOFFSET_BUYZONE ) & ~( 1<<) );
        return 
PLUGIN_HANDLED;
    }
    return 
PLUGIN_CONTINUE



All times are GMT -4. The time now is 08:22.

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