Raised This Month: $32 Target: $400
 8% 

ProKreedz Disarm on starting climb


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
MaNaReaver
Member
Join Date: Apr 2020
Location: India
Old 08-08-2020 , 06:18   ProKreedz Disarm on starting climb
Reply With Quote #1

Hey AM!

I was working on allowing players to use weapons for ProKreedz 2.31, and not disarming them when they start their climb, except if they have a scout (to allow for nub15 records). I tried this, but it doesn't seem to work. Can anyone help me out?

Code:
for(new i = 0; i < 8; i++)
	if( user_has_weapon(id, other_weapons[i])  )
	{
		strip_user_weapons(id)
		give_item(id,"weapon_knife")
		give_item(id,"weapon_usp")
                give_item(id, other_weapons_name[i]) //Changed code line - the array contains strings with weapon_name to give the player the weapon when they start the run.
		set_pdata_int(id, 382, 24, 5)
		if(wpn==CSW_SCOUT) user_has_scout[id]=true
		else user_has_scout[id]=false
	}
Best regards,
MaNaReaver.
__________________
MaNaReaver is offline
MaNaReaver
Member
Join Date: Apr 2020
Location: India
Old 08-08-2020 , 06:39   Re: ProKreedz Disarm on starting climb
Reply With Quote #2

I also tried this, but this too doesn't work. If someone has a weapon other than scout they get disarmed and get just usp and knife on starting the timer.

Code:
for(new i = 0; i < 8; i++)
{
       if( user_has_weapon(id, other_weapons[i]) )
       {
            strip_user_weapons(id)
            give_item(id,"weapon_knife")
            give_item(id,"weapon_usp")
            set_pdata_int(id, 382, 24, 5)
            if(wpn==other_weapons[i])
                give_item(id, other_weapons_name[i])
            if(wpn==CSW_SCOUT)
            {
                 user_has_scout[id]=true
                 give_item(id, "weapon_scout")
            }
            else
                 user_has_scout[id]=false
       }
}
__________________

Last edited by MaNaReaver; 08-08-2020 at 06:41.
MaNaReaver is offline
JocAnis
Veteran Member
Join Date: Jun 2010
Old 08-10-2020 , 08:11   Re: ProKreedz Disarm on starting climb
Reply With Quote #3

im not 100% sure what you want, but
Code:
strip_user_weapons(id)
is disarming player, so comment that line? after doing that, you can also comment 'give_item' functions cuz they already have that wpn

edit, i would do this and test:
Code:
//for(new i = 0; i < 8; i++)
{
	if(wpn==CSW_SCOUT) user_has_scout[id]=true
	else user_has_scout[id]=false
}
__________________
KZ Public Autocup - PrimeKZ

My blog: http://primekz.xyz (in progress...) - not active (dec 2022)

Last edited by JocAnis; 08-10-2020 at 08:17.
JocAnis is offline
MaNaReaver
Member
Join Date: Apr 2020
Location: India
Old 08-10-2020 , 12:32   Re: ProKreedz Disarm on starting climb
Reply With Quote #4

Quote:
Originally Posted by JocAnis View Post
im not 100% sure what you want, but
Code:
strip_user_weapons(id)
is disarming player, so comment that line? after doing that, you can also comment 'give_item' functions cuz they already have that wpn

edit, i would do this and test:
Code:
//for(new i = 0; i < 8; i++)
{
	if(wpn==CSW_SCOUT) user_has_scout[id]=true
	else user_has_scout[id]=false
}
Thanks Joc, but the issue is that if someone has a scout and doesn't have his weapons stripped, he will be shown in nub15 despite having usp in hand. Is there a way to just remove scout from a player's hand, instead of strip_user_weapons?
__________________
MaNaReaver 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 16:38.


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