Raised This Month: $ Target: $400
 0% 

Dropped weapons


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Debesėlis
Senior Member
Join Date: Aug 2008
Location: Lithuania
Old 06-03-2009 , 17:11   Dropped weapons
Reply With Quote #1

PHP Code:
public rifles(id)
{
    if(
rifles_active[id] == 1)
    {
        
dropPrimaryWeapons(id)
        
dropSecondaryWeapons(id)

        
fm_give_item(id"weapon_usp")
        
fm_give_item(id"weapon_deagle")
        
fm_give_item(id"weapon_ak47")
        
fm_give_item(id"weapon_m4a1")
    }
}

dropPrimaryWeapons(id)
{
    new 
weaponID get_pdata_cbase(idm_pLastPrimaryItem)

    while(
weaponID != -1)
    {
        
dropWeapon(idweaponID)    
         
weaponID get_pdata_cbase(idm_pLastPrimaryItem)
    }
}

dropSecondaryWeapons(id)
{
    new 
weaponID get_pdata_cbase(idm_pLastSecondaryItem)

    while(
weaponID != -1)
    {
        
dropWeapon(idweaponID)    
        
weaponID get_pdata_cbase(idm_pLastSecondaryItem)
    }        
}

dropWeapon(playerIDweaponID)
{
    static 
weaponName[32]
    
pev(weaponIDpev_classnameweaponNamecharsmax(weaponName))

    
engclient_cmd(playerID"drop"weaponName)

How do you make all weapons except the usp, deagle, m4a1 and ak47 drop at the start of a new round and stop people from buying anything.
Debesėlis 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 13:52.


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