Raised This Month: $ Target: $400
 0% 

[HELP] Striping Weapon.


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
lolzin123
Member
Join Date: Apr 2009
Old 06-16-2009 , 12:46   [HELP] Striping Weapon.
Reply With Quote #1

I need make a code to strip weapon from player and 20 seconds later give the same weapons to him again.
lolzin123 is offline
tpt
Member
Join Date: Jun 2009
Location: Scripting help section
Old 06-16-2009 , 13:07   Re: [HELP] Striping Weapon.
Reply With Quote #2

Use strip_user_weapons ( index ) and then add the 20 second delay with set_task ( Float:time, const function[], id = 0, parameter[]="", len = 0, flags[]="", repeat = 0 ). And after delay give weapons with: give_item ( index, const item[] )
tpt is offline
lolzin123
Member
Join Date: Apr 2009
Old 06-16-2009 , 13:12   Re: [HELP] Striping Weapon.
Reply With Quote #3

Yep but how do I return the same weapons that the player was using?
lolzin123 is offline
AntiBots
Veteran Member
Join Date: May 2008
Location: Brazil
Old 06-16-2009 , 17:23   Re: [HELP] Striping Weapon.
Reply With Quote #4

PHP Code:
#include <amxmodx>
#include <fun>

new g_weapons[33][32]
new 
g_iNum[33]

public 
plugin_init() 
{
    
register_plugin("1""2""3")
    
    
register_clcmd("say test1""test1")
    
register_clcmd("say test2""test2")
}

public 
test1id )
{
    
get_user_weapons(idg_weapons[id], g_iNum[id])
    
strip_user_weapons(id)
}

public 
test2id )
{
    static 
StrData[32], i
    
for(0g_iNum[id]; i++)
    {
        
get_weaponname(g_weapons[id][i], StrData31)
        
give_item(idStrData)
    }

Fix, I do this some month ago.
__________________
AntiBots is offline
Send a message via ICQ to AntiBots Send a message via MSN to AntiBots Send a message via Skype™ to AntiBots
lolzin123
Member
Join Date: Apr 2009
Old 06-16-2009 , 18:22   Re: [HELP] Striping Weapon.
Reply With Quote #5

How do I put this in my code?
lolzin123 is offline
P i x e L
Junior Member
Join Date: Jun 2009
Location: eBaum's World
Old 06-16-2009 , 18:59   Re: [HELP] Striping Weapon.
Reply With Quote #6

Well what's the code you currently have?
P i x e L is offline
lolzin123
Member
Join Date: Apr 2009
Old 06-16-2009 , 19:27   Re: [HELP] Striping Weapon.
Reply With Quote #7

This code:
PHP Code:
case OBJECT_FROSTBLOCK:
        {
            
set_task(0.0"tsk_add_frost"plr);
            
set_task(10.0"tsk_remove_frost"plr);
        }

public 
tsk_remove_frost(plr)
{
    
set_pev(plrpev_maxspeed250.0);
    
}

public 
tsk_add_frost(plr)
{
    
set_pev(plrpev_maxspeed0.1);
    
    
strip_user_weapons (plr);
    
    
set_hudmessage(00255,  -1.00.2006.012.00.01.03);
    
show_hudmessage(plr"Message.");

lolzin123 is offline
Reply



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 14:05.


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