AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   How to save droped weapons [SOLVED] (https://forums.alliedmods.net/showthread.php?t=233778)

CHE4TER 01-20-2014 05:50

How to save droped weapons [SOLVED]
 
When you receive and weapon, 'stripWeapons' drops all weapons that you have.. But I want to save the primary weapon, like the usp/deagle..

Example when you choose AWP
PHP Code:

case 0: {
            
stripWeapons(id)
            
give_item(id"weapon_awp")
            
cs_set_user_bpammo(id CSW_AWP30)
            
ColorChat(idGREY"^3[^4SERVER^3] ^1You received AWP")
        } 

stripWeapons
PHP Code:

public stripWeapons(id) {
    
// Strip all weapons
    
strip_user_weapons(id)
    
// Give knife
    
give_item(id"weapon_knife")
    
    
// Give the primary weapon that had the user?
    // code



DavidJr 01-20-2014 06:04

Re: How to save droped weapons?
 
Use array and give it back when you want

SpeeDeeR 01-20-2014 06:16

Re: How to save droped weapons?
 
https://forums.alliedmods.net/showpo...60&postcount=2

CHE4TER 01-20-2014 06:24

Re: How to save droped weapons?
 
Quote:

Originally Posted by SpeeDeeR (Post 2088404)

Thank you! :)


All times are GMT -4. The time now is 10:09.

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