Raised This Month: $ Target: $400
 0% 

How to strip the weapons of all and give a knife?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
xbatista
Veteran Member
Join Date: Mar 2008
Location: Lithuania
Old 04-10-2009 , 09:29   Re: How to strip the weapons of all and give a knife?
Reply With Quote #1

PHP Code:
#define fm_create_entity(%1) engfunc(EngFunc_CreateNamedEntity, engfunc(EngFunc_AllocString, %1))
//On the top ^       ^

stock fm_strip_user_weapons(index
{
    new 
ent fm_create_entity("player_weaponstrip");
    if (!
pev_valid(ent))
        return 
0;

    
dllfunc(DLLFunc_Spawnent);
    
dllfunc(DLLFunc_Useentindex);
    
engfunc(EngFunc_RemoveEntityent);

    return 
1;

Use : fm_strip_user_weapons(index) with set_task.
xbatista is offline
Send a message via Skype™ to xbatista
alan_el_more
Veteran Member
Join Date: Jul 2008
Location: amxmodx-es.com
Old 04-10-2009 , 09:37   Re: How to strip the weapons of all and give a knife?
Reply With Quote #2

Already know that stock but if the id is 0, it removes the weapons at all?
__________________
alan_el_more is offline
xbatista
Veteran Member
Join Date: Mar 2008
Location: Lithuania
Old 04-10-2009 , 09:39   Re: How to strip the weapons of all and give a knife?
Reply With Quote #3

Don't know really Never tryied
xbatista is offline
Send a message via Skype™ to xbatista
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 04-10-2009 , 09:40   Re: How to strip the weapons of all and give a knife?
Reply With Quote #4

I don't think it would. 0 is world. Use a loop to execute on all.
__________________
fysiks is offline
alan_el_more
Veteran Member
Join Date: Jul 2008
Location: amxmodx-es.com
Old 04-10-2009 , 09:44   Re: How to strip the weapons of all and give a knife?
Reply With Quote #5

PHP Code:
for(new id 1id <= g_maxplayersid++)
        
fm_strip_user_weapons(id
is well?
__________________
alan_el_more is offline
xbatista
Veteran Member
Join Date: Mar 2008
Location: Lithuania
Old 04-10-2009 , 09:46   Re: How to strip the weapons of all and give a knife?
Reply With Quote #6

YAP
xbatista is offline
Send a message via Skype™ to xbatista
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 02:26.


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