Raised This Month: $ Target: $400
 0% 

Solved Hook player flag change


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
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
 



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 02:52.


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