Raised This Month: $ Target: $400
 0% 

add a flag check


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 06-27-2020 , 11:43   Re: add a flag check
Reply With Quote #1

This code says:
If player has greater than 0 health OR the plugin is disabled then check if the player has the flag, if so, return PLUGIN_CONTINUE.
PHP Code:
// if player is still alive or plugin is disabled
if(get_user_health(id) > || get_cvar_num("mp_nadedrops") < 1
{
    if(
has_flag(idFLAG_HERE))
    {
        return 
PLUGIN_CONTINUE;
    }

__________________

Last edited by Bugsy; 06-27-2020 at 11:53.
Bugsy is offline
supertrio17
Senior Member
Join Date: May 2020
Location: Serbia
Old 06-27-2020 , 11:44   Re: add a flag check
Reply With Quote #2

Uf, now I see it, but why PLUGIN_CONTINUE than?

Edit: This is good now?
PHP Code:
    if(!has_flag(idFLAG_HERE))
    {
        return 
PLUGIN_CONTINUE;
    } 
__________________
Contact! || Discord:
Mr_Boopsy_#2066

Last edited by supertrio17; 06-27-2020 at 11:45.
supertrio17 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 17:02.


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