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

Solved Hook player flag change


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
iceeedr
Veteran Member
Join Date: Apr 2017
Location: Brazil
Old 01-05-2020 , 20:35   Hook player flag change
Reply With Quote #1

Is there any way to know the exact moment a player had its flags changed? Example someone wins admin in the middle of the round and I want to execute something the moment he had the flags changed ...
__________________


Quote:
Originally Posted by fysiks View Post
Please stop trying to help. You appear to just be posting random stuff. Wait until you actually understand more about AMX Mod X and how the game works.
https://iceeedr.com.br/

Last edited by iceeedr; 01-05-2020 at 21:47.
iceeedr is offline
Send a message via Skype™ to iceeedr
OciXCrom
Veteran Member
Join Date: Oct 2013
Location: Macedonia
Old 01-05-2020 , 21:07   Re: Hook player flag change
Reply With Quote #2

Nope - https://github.com/alliedmodders/amxmodx/pull/475

We can just pray the PR gets reviewed soon.
__________________

Last edited by OciXCrom; 01-05-2020 at 21:08.
OciXCrom is offline
Send a message via Skype™ to OciXCrom
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 01-05-2020 , 21:13   Re: Hook player flag change
Reply With Quote #3

I think you will just need to keep re-checking as I do not believe there are any events fired when flags are changed. It is not an expensive native so it's not the end of the world.

PHP Code:
static cell AMX_NATIVE_CALL get_user_flags(AMX *amxcell *params/* 2 param */
{
    
int index params[1];
    
    if (
index || index gpGlobals->maxClients)
    {
        
LogError(amxAMX_ERR_NATIVE"Invalid player id %d"index);
        return 
0;
    }
    
    
int id params[2];
    
    if (
id 0)
        
id 0;
    
    if (
id 31)
        
id 31;
    
    return 
GET_PLAYER_POINTER_I(index)->flags[id];

__________________
Bugsy is offline
iceeedr
Veteran Member
Join Date: Apr 2017
Location: Brazil
Old 01-05-2020 , 21:46   Re: Hook player flag change
Reply With Quote #4

Thanks both of you.
__________________


Quote:
Originally Posted by fysiks View Post
Please stop trying to help. You appear to just be posting random stuff. Wait until you actually understand more about AMX Mod X and how the game works.
https://iceeedr.com.br/
iceeedr is offline
Send a message via Skype™ to iceeedr
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:03.


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