Raised This Month: $ Target: $400
 0% 

[ Help ] Knowing if player shouldn't take damage


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
SnoW
Veteran Member
Join Date: Oct 2008
Location: Finland WisdomNuggets: 8
Old 07-28-2009 , 13:13   [ Help ] Knowing if player shouldn't take damage
Reply With Quote #1

I'd like to detect when player is frozen, when player is on madness and when has a spawn protection.
There's such variables in zombie plague called g_nodamage and g_frozen. Somehow those are 33 arrays and that's why I can't use xvar natives.
There's only this in inc file, but it's useless:
PHP Code:
 /**
* Called when a player gets unfrozen (frostnades).
*
* @param id Player index.
*/
forward zp_user_unfrozen(id
Any help is appreciated, ty.
SnoW is offline
Send a message via MSN to SnoW
meTaLiCroSS
Gaze Upon My Hat
Join Date: Feb 2009
Location: Viņa del Mar, Chile
Old 07-28-2009 , 17:02   Re: [ Help ] Knowing if player shouldn't take damage
Reply With Quote #2

Quote:
Originally Posted by SnoW View Post
I'd like to detect when player is frozen, when player is on madness and when has a spawn protection.
There's such variables in zombie plague called g_nodamage and g_frozen. Somehow those are 33 arrays and that's why I can't use xvar natives.
There's only this in inc file, but it's useless:
PHP Code:
 /**
* Called when a player gets unfrozen (frostnades).
*
* @param id Player index.
*/
forward zp_user_unfrozen(id
Any help is appreciated, ty.
MeRcyLeZZ should add more Forwards. Also will be more usefull for new addons.

And, i don't have idea to how detect when is frozen/in maddnes
__________________
Quote:
Originally Posted by joropito View Post
You're right Metalicross
meTaLiCroSS is offline
SnoW
Veteran Member
Join Date: Oct 2008
Location: Finland WisdomNuggets: 8
Old 07-29-2009 , 06:19   Re: [ Help ] Knowing if player shouldn't take damage
Reply With Quote #3

Quote:
Originally Posted by meTaLiCroSS View Post
MeRcyLeZZ should add more Forwards. Also will be more usefull for new addons.
Ye, well I'd need just a simple native zp_is_user_frozen( index ) for example. For me it'd be fine if MeRc would do all variables public, so I could use xvars, but ye maybe some more funcs as well.
SnoW is offline
Send a message via MSN to SnoW
alan_el_more
Veteran Member
Join Date: Jul 2008
Location: amxmodx-es.com
Old 07-29-2009 , 19:26   Re: [ Help ] Knowing if player shouldn't take damage
Reply With Quote #4

Create a forward and call when a player is frozen or using madness
__________________
alan_el_more is offline
SnoW
Veteran Member
Join Date: Oct 2008
Location: Finland WisdomNuggets: 8
Old 07-30-2009 , 07:39   Re: [ Help ] Knowing if player shouldn't take damage
Reply With Quote #5

Quote:
Originally Posted by alan_el_more View Post
Create a forward and call when a player is frozen or using madness
Modifying the main plugin is mainly stupid. Like that people are able to use only one plugin where's edited version. The only thing I could think is that I make couple of public functions what people are able to copy to the end of their sma, so they don't have to start copying for example multi forwards and mess their plugin. Just that I didn't wanna do it that way, but what other options I have? None I believe.
SnoW is offline
Send a message via MSN to SnoW
meTaLiCroSS
Gaze Upon My Hat
Join Date: Feb 2009
Location: Viņa del Mar, Chile
Old 07-30-2009 , 17:01   Re: [ Help ] Knowing if player shouldn't take damage
Reply With Quote #6

Quote:
Originally Posted by SnoW View Post
Ye, well I'd need just a simple native zp_is_user_frozen( index ) for example. For me it'd be fine if MeRc would do all variables public, so I could use xvars, but ye maybe some more funcs as well.
Here is some examples of new forwards/natives:
PHP Code:
// Natives
zp_set_frost_status(id1/0)
zp_set_burn_status(id1/0)
zp_set_frost_godmode(id1/0)
zp_set_burn_godmode(id1/0)

// Forwards
zp_user_frost
zp_user_burned
zp_user_ammo_packs_changed 
And a lot of more natives/forwards.
__________________
Quote:
Originally Posted by joropito View Post
You're right Metalicross
meTaLiCroSS is offline
SnoW
Veteran Member
Join Date: Oct 2008
Location: Finland WisdomNuggets: 8
Old 07-31-2009 , 04:44   Re: [ Help ] Knowing if player shouldn't take damage
Reply With Quote #7

I managed to do it pretty good I think, all they have to do is copy this to the end of their sma:
PHP Code:
public zp_is_user_frozenid )
       return 
g_frozenid ];

public 
zp_is_user_nodamageid )
       return 
g_nodamageid ]; 
Then I'm able to use callfuncs.
SnoW is offline
Send a message via MSN to SnoW
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 08:46.


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