Raised This Month: $ Target: $400
 0% 

Strip weapons then give them back


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Jelle
[b]MOAR CANDY[/b]
Join Date: Aug 2009
Location: Denmark
Old 06-25-2012 , 11:09   Strip weapons then give them back
Reply With Quote #1

I have just started to work with ZP, and a lot has changed from 4.3 to 5.0. But that's not really relevant here.

What I want to do, when a user buys an item, is that I want to strip all his weapons, and then give them all back to him but the primary one since he bought a new one.

Maybe there is an easier way to do it. I found a stock:

PHP Code:
stock drop_prim(id
{
    new 
weapons[32], num
    get_user_weapons
(idweaponsnum)
    for (new 
0numi++)
    {
        if (
Wep_ak47 & (1<<weapons[i])) 
        {
            static 
wname[32]
            
get_weaponname(weapons[i], wnamesizeof wname 1)
            
engclient_cmd(id"drop"wname)
        }
    }

But that one just throws the weapons on the ground, they can be picked up by anyone when that code has been executed.

Any ideas?
__________________
No idea what to write here...
Jelle is offline
Send a message via MSN to Jelle
 



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 06:12.


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