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

add a flag check


Post New Thread Reply   
 
Thread Tools Display Modes
jonny1990
Senior Member
Join Date: Apr 2020
Old 06-27-2020 , 12:05   Re: add a flag check
Reply With Quote #11

the plugin works but
1) drops two identical grenades
2) drops and those who do not have a flag
jonny1990 is offline
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 06-27-2020 , 12:09   Re: add a flag check
Reply With Quote #12

If:

Player has > 0 health
OR
the mp_nadedrops cvar < 1
OR
the player does not have the flag

THEN

Stop executing
__________________

Last edited by Bugsy; 06-27-2020 at 12:10.
Bugsy is offline
jonny1990
Senior Member
Join Date: Apr 2020
Old 06-27-2020 , 12:12   Re: add a flag check
Reply With Quote #13

Quote:
Originally Posted by Bugsy View Post
If:

Player has > 0 health
OR
the mp_nadedrops cvar < 1
OR
the player does not have the flag

THEN

Stop executing
I don't know how to do it
jonny1990 is offline
Shadows Adi
AlliedModders Donor
Join Date: Aug 2019
Location: Romania
Old 06-27-2020 , 12:21   Re: add a flag check
Reply With Quote #14

PHP Code:
// if player is still alive or plugin is disabled or player do not have the flags
if(get_user_health(id) > || get_cvar_num("mp_nadedrops") < || get_user_flags(id) & ADMIN_LEVEL_H /*Here you put which flag you want for check*/
{
        return 
PLUGIN_CONTINUE;

__________________


Accepting Paid Requests, contact PM.

MVP Of The Round View project on GITHUB / AlliedModders
CSGO REMAKE ~ CSGO MOD [STABLE + SOURCE CODE]
Shadows Adi is offline
supertrio17
Senior Member
Join Date: May 2020
Location: Serbia
Old 06-27-2020 , 12:27   Re: add a flag check
Reply With Quote #15

Quote:
Originally Posted by Shadows Adi View Post
PHP Code:
// if player is still alive or plugin is disabled or player do not have the flags
if(get_user_health(id) > || get_cvar_num("mp_nadedrops") < || get_user_flags(id) & ADMIN_LEVEL_H /*Here you put which flag you want for check*/
{
        return 
PLUGIN_CONTINUE;

Um, what is the difference? If mine didn't work, that one won't work either.
__________________
Contact! || Discord:
Mr_Boopsy_#2066
supertrio17 is offline
supertrio17
Senior Member
Join Date: May 2020
Location: Serbia
Old 06-27-2020 , 12:29   Re: add a flag check
Reply With Quote #16

I updated the code, try it now
__________________
Contact! || Discord:
Mr_Boopsy_#2066
supertrio17 is offline
jonny1990
Senior Member
Join Date: Apr 2020
Old 06-27-2020 , 12:47   Re: add a flag check
Reply With Quote #17

Quote:
Originally Posted by supertrio17 View Post
I updated the code, try it now
error compilation
jonny1990 is offline
supertrio17
Senior Member
Join Date: May 2020
Location: Serbia
Old 06-27-2020 , 13:41   Re: add a flag check
Reply With Quote #18

I miss-typed one bracket, it should compile now
__________________
Contact! || Discord:
Mr_Boopsy_#2066
supertrio17 is offline
jonny1990
Senior Member
Join Date: Apr 2020
Old 06-27-2020 , 14:27   Re: add a flag check
Reply With Quote #19

Quote:
Originally Posted by supertrio17 View Post
I miss-typed one bracket, it should compile now
1) players without a flag also drop grenades
2) drops 2 he, 2 smoke and blinding are also duplicated, if I have one then 2 drops

Last edited by jonny1990; 06-27-2020 at 14:30.
jonny1990 is offline
supertrio17
Senior Member
Join Date: May 2020
Location: Serbia
Old 06-27-2020 , 18:14   Re: add a flag check
Reply With Quote #20

I'll try to get some better look at the code tomorrow. Sorry, but I'm really tired.
__________________
Contact! || Discord:
Mr_Boopsy_#2066
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 14:04.


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