View Single Post
stephen473
Senior Member
Join Date: Jan 2017
Location: somewhere on earth
Old 03-21-2021 , 09:55   Re: Checking for flag in script
Reply With Quote #5

Quote:
Originally Posted by OZZI View Post
So how am I supposed to implement it into the plugin. I can tell you need to paste in the bool. But the "public Action Test" im kinda confused about. Do i need to paste in the code separately or something else.
it depends on where you want to check flags. the first example i gave you above is a function itself. the other one is just a statement using the existing function. looking at your code it already has a check.

PHP Code:
public Action TimerHit_CallBack(Handle timerint useridint client)
{
        static 
int attacker;
        if(!(
attacker GetClientOfUserId(userid)))
            return 
Plugin_Stop;
        
        if(!(
CheckCommandAccess(client"reservation_admin"ADMFLAG_RESERVATION))) {
            return 
Plugin_Stop;
        }
... 
__________________
Also known as Hardy`.

Feel free to contact me if you have a private plugin request!

My Steam Profile | Discord: Hardy`#3792
stephen473 is offline