Raised This Month: $ Target: $400
 0% 

Question About strip_user_weapons


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Ali0mer
Senior Member
Join Date: Jan 2016
Location: Iraq
Old 04-20-2023 , 15:18   Question About strip_user_weapons
Reply With Quote #1

Which is better to use on strip_user_weapons?
Code:
if (is_user_alive(id)
or
Code:
if (is_use_connected(id)
PS: I have Zombie mod server?

Last edited by Ali0mer; 04-20-2023 at 15:19.
Ali0mer is offline
Send a message via Skype™ to Ali0mer
Jhob94
AMX Mod X Donor
Join Date: Jul 2012
Old 04-20-2023 , 15:21   Re: Question About strip_user_weapons
Reply With Quote #2

Alive
__________________
Jhob94 is offline
Ali0mer
Senior Member
Join Date: Jan 2016
Location: Iraq
Old 04-20-2023 , 15:37   Re: Question About strip_user_weapons
Reply With Quote #3

Quote:
Originally Posted by Jhob94 View Post
Alive
I used alive, but you know when the round starts and some players disconnected
In "Tab Score" I see no zombie showing, so i thougt maybe we could do something like this?

if (is_user_alive(id) && if (is_user_connected)

Is this good?
Ali0mer is offline
Send a message via Skype™ to Ali0mer
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 04-20-2023 , 17:36   Re: Question About strip_user_weapons
Reply With Quote #4

is_user_alive() has a built-in is_user_connected() check, so you never need both.
__________________
Bugsy is offline
mlibre
Veteran Member
Join Date: Nov 2015
Location: return PLUGIN_CONTINUE
Old 04-20-2023 , 19:55   Re: Question About strip_user_weapons
Reply With Quote #5

look at it in more detail, reaffirm what they told you
__________________
mlibre is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 04-20-2023 , 23:20   Re: Question About strip_user_weapons
Reply With Quote #6

If you don't understand the low-level C code of AMX Mod X, you can look at the documentation: http://www.amxmodx.org/api/amxmodx/is_user_alive
__________________
fysiks is offline
Ali0mer
Senior Member
Join Date: Jan 2016
Location: Iraq
Old 04-21-2023 , 06:01   Re: Question About strip_user_weapons
Reply With Quote #7

I understand thanks guys
Ali0mer is offline
Send a message via Skype™ to Ali0mer
Ali0mer
Senior Member
Join Date: Jan 2016
Location: Iraq
Old 04-22-2023 , 04:47   Re: Question About strip_user_weapons
Reply With Quote #8

Quote:
Originally Posted by Bugsy View Post
is_user_alive() has a built-in is_user_connected() check, so you never need both.
Just last question
What i did in my code is this

Is this good?
Code:
 if (is_user_alive(iVictim))
	{
	strip_user_weapons(iVictim);
	reset_armor(iVictim);
	give_weapon(iVictim, "weapon_knife");
	ExecuteHamB(Ham_Item_PreFrame, iVictim);
}
	return 0;
}
Or is this good?
Code:
 if (is_user_alive(iVictim))
	{
	strip_user_weapons(iVictim);
	reset_armor(iVictim);
	give_weapon(iVictim, "weapon_knife");
	ExecuteHamB(Ham_Item_PreFrame, iVictim);
	return 0;
}
}
Ali0mer is offline
Send a message via Skype™ to Ali0mer
Jhob94
AMX Mod X Donor
Join Date: Jul 2012
Old 04-22-2023 , 06:32   Re: Question About strip_user_weapons
Reply With Quote #9

Why are you executing item_preframe?

Since we don’t have all the code we can’t tell you about the returns
__________________
Jhob94 is offline
Ali0mer
Senior Member
Join Date: Jan 2016
Location: Iraq
Old 04-22-2023 , 08:03   Re: Question About strip_user_weapons
Reply With Quote #10

Quote:
Originally Posted by Jhob94 View Post
Why are you executing item_preframe?

Since we don’t have all the code we can’t tell you about the returns
Im using item_preframe to reset the max speed of player, so should i cover it all or just strip_user_weapons?

Last edited by Ali0mer; 04-22-2023 at 08:03.
Ali0mer is offline
Send a message via Skype™ to Ali0mer
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 04:24.


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