Raised This Month: $51 Target: $400
 12% 

[HELP] Weapon Set


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
soumyadip77
Senior Member
Join Date: Jul 2017
Location: INDIA,KOLKATA
Old 03-01-2018 , 11:05   [HELP] Weapon Set
Reply With Quote #1

i want to set all players weapon to knife.

remove c4 and all weapons and he dont pickup or buy weapons.

me make it
PHP Code:
RegisterHam(Ham_Spawn"player""KnifeRoundStart"1);

public 
KnifeRoundStart() 
{
    for ( new 
<= gMaxPlayers i++ )
    {
        if (
is_user_alive(i))
        {
            
cs_set_user_money(i0)
            
rg_give_item(i"wepon_knife")
            
rg_remove_all_items(i)
            
engclient_cmd(i"weapon_knife")
        }
    }
    

please help
soumyadip77 is offline
Send a message via Skype™ to soumyadip77
WhiteFang1319
Senior Member
Join Date: Jan 2017
Old 03-01-2018 , 11:23   Re: [HELP] Weapon Set
Reply With Quote #2

Code:
native rg_give_item(const index, const pszName[], GiveType:type = GT_APPEND);

Use with rg_give_item
enum GiveType {     GT_APPEND,          // Just give item     GT_REPLACE,         // Give the item and remove all other weapons from the slot     GT_DROP_AND_REPLACE // Give the item and drop all other weapons from the slot };
A quicksearch always helps you. If this is you want.
WhiteFang1319 is offline
E1_531G
Senior Member
Join Date: Dec 2017
Old 03-01-2018 , 17:47   Re: [HELP] Weapon Set
Reply With Quote #3

Quote:
Originally Posted by WhiteFang1319 View Post
Code:
native rg_give_item(const index, const pszName[], GiveType:type = GT_APPEND);

Use with rg_give_item
enum GiveType {     GT_APPEND,          // Just give item     GT_REPLACE,         // Give the item and remove all other weapons from the slot     GT_DROP_AND_REPLACE // Give the item and drop all other weapons from the slot };
A quicksearch always helps you. If this is you want.
There is no guarantee that he uses Re products. This is the forum for AMX not Re*.
__________________
My English is A0
E1_531G is offline
OciXCrom
Veteran Member
Join Date: Oct 2013
Location: Macedonia
Old 03-01-2018 , 19:51   Re: [HELP] Weapon Set
Reply With Quote #4

Quote:
Originally Posted by E1_531G View Post
There is no guarantee that he uses Re products. This is the forum for AMX not Re*.
The code he posted containing "Re products" definitely doesn't guarantee he's using them.

PS - this forum isn't for AMX.
PS2 - Re is officially supported in AMXX's core.
__________________

Last edited by OciXCrom; 03-01-2018 at 19:53.
OciXCrom is offline
Send a message via Skype™ to OciXCrom
soumyadip77
Senior Member
Join Date: Jul 2017
Location: INDIA,KOLKATA
Old 03-01-2018 , 20:01   Re: [HELP] Weapon Set
Reply With Quote #5

Quote:
Originally Posted by WhiteFang1319 View Post
Code:
native rg_give_item(const index, const pszName[], GiveType:type = GT_APPEND);

Use with rg_give_item
enum GiveType {     GT_APPEND,          // Just give item     GT_REPLACE,         // Give the item and remove all other weapons from the slot     GT_DROP_AND_REPLACE // Give the item and drop all other weapons from the slot };
A quicksearch always helps you. If this is you want.
i cant under stand can you edit on this file and hamspawn is right for set every ones weapon to knife
soumyadip77 is offline
Send a message via Skype™ to soumyadip77
WhiteFang1319
Senior Member
Join Date: Jan 2017
Old 03-01-2018 , 20:57   Re: [HELP] Weapon Set
Reply With Quote #6

rg_give_item(index, "weapon_knife", GT_DROP_AND_REPLACE)
Though I'm not sure if the item( weapon) class name is correct or not

Last edited by WhiteFang1319; 03-01-2018 at 21:29.
WhiteFang1319 is offline
OciXCrom
Veteran Member
Join Date: Oct 2013
Location: Macedonia
Old 03-02-2018 , 09:43   Re: [HELP] Weapon Set
Reply With Quote #7

Quote:
Originally Posted by WhiteFang1319 View Post
rg_give_item(index, "weapon_knife", GT_DROP_AND_REPLACE)
Though I'm not sure if the item( weapon) class name is correct or not
What are you exactling dropping and replacing from the knife slot?!
__________________
OciXCrom is offline
Send a message via Skype™ to OciXCrom
WhiteFang1319
Senior Member
Join Date: Jan 2017
Old 03-02-2018 , 10:38   Re: [HELP] Weapon Set
Reply With Quote #8

Quote:
Originally Posted by OciXCrom View Post
What are you exactling dropping and replacing from the knife slot?!
My bad
WhiteFang1319 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 12:35.


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