Raised This Month: $51 Target: $400
 12% 

Add a flags update forward in 1.8.3


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
OciXCrom
Veteran Member
Join Date: Oct 2013
Location: Macedonia
Old 12-29-2017 , 08:38   Add a flags update forward in 1.8.3
Reply With Quote #1

Please, just do it. It's not hard to do. Making plugins for admin prefixes and stuff like that is pure death. You have to make multiple checks and functions in order to properly update the prefix when the flags change (on connect, on name change, etc) and you can't possibly detect all cases without editing other plugins.

PHP Code:
/* Called when the user's flags are changed. */
forward client_flags_updated(idiFlags); 
__________________

Last edited by OciXCrom; 12-29-2017 at 12:39.
OciXCrom is offline
Send a message via Skype™ to OciXCrom
Relaxing
AlliedModders Donor
Join Date: Jun 2016
Location: White Plains
Old 12-29-2017 , 09:14   Re: Add a flags update forward in 1.8.3
Reply With Quote #2

Can you show any idea how to make this forward just by describing it? Also for what iFlags stands?
__________________

Last edited by Relaxing; 12-29-2017 at 09:15.
Relaxing is offline
Relaxing
AlliedModders Donor
Join Date: Jun 2016
Location: White Plains
Old 12-29-2017 , 13:51   Re: Add a flags update forward in 1.8.3
Reply With Quote #3

Quote:
Originally Posted by Relaxing View Post
how to make
__________________
Relaxing is offline
OciXCrom
Veteran Member
Join Date: Oct 2013
Location: Macedonia
Old 12-29-2017 , 09:18   Re: Add a flags update forward in 1.8.3
Reply With Quote #4

What more descirption do you need than "called when the admin flags are updated"? It stand for the user's current flags.
__________________
OciXCrom is offline
Send a message via Skype™ to OciXCrom
OciXCrom
Veteran Member
Join Date: Oct 2013
Location: Macedonia
Old 12-29-2017 , 14:05   Re: Add a flags update forward in 1.8.3
Reply With Quote #5

Do you know what a forward is? Are you an AMXX developer? Probably no to both questions. Just leave this to the people who it's meant for.
__________________
OciXCrom is offline
Send a message via Skype™ to OciXCrom
Relaxing
AlliedModders Donor
Join Date: Jun 2016
Location: White Plains
Old 12-29-2017 , 18:04   Re: Add a flags update forward in 1.8.3
Reply With Quote #6

Quote:
Originally Posted by OciXCrom View Post
Do you know what a forward is? Are you an AMXX developer? Probably no to both questions. Just leave this to the people who it's meant for.
You submitted a suggestion that you cannot even describe by just using words. Pointless
__________________
Relaxing is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 12-29-2017 , 18:20   Re: Add a flags update forward in 1.8.3
Reply With Quote #7

He's actually described it enough to know exactly what he is requesting.
__________________
fysiks is offline
Old 12-29-2017, 22:14
CrazY.
This message has been deleted by CrazY.. Reason: No sense
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 12-30-2017 , 02:22   Re: Add a flags update forward in 1.8.3
Reply With Quote #9

The request is not directly related to the admin prefixes plugin. The requested feature is something that would be used inside of such a plugin for knowing when admin flags change.

So, the request is fully described in the code block (with two lines of code; one being a comment line) and the rest of his post is an explanation as to why he wants such a feature.
__________________

Last edited by fysiks; 12-30-2017 at 02:25.
fysiks is offline
OciXCrom
Veteran Member
Join Date: Oct 2013
Location: Macedonia
Old 12-30-2017 , 08:26   Re: Add a flags update forward in 1.8.3
Reply With Quote #10

I can try doing this myself and submit a pull request, but I have no clue on how to compile the .cpp/.h files to get actual modules. Any quick tutorials? Is this going to work for the default AMXX files too?

amxmodx.cpp:
Code:
static cell AMX_NATIVE_CALL set_user_flags(AMX *amx, cell *params) /* 3 param */ {     int index = params[1];     if (index < 0 || index > gpGlobals->maxClients)     {         LogError(amx, AMX_ERR_NATIVE, "Invalid player id %d", index);         return 0;     }     CPlayer* pPlayer = GET_PLAYER_POINTER_I(index);     int flag = params[2];     int id = params[3];     if (id < 0)         id = 0;     if (id > 31)         id = 31;     pPlayer->flags[id] |= flag;
    executeForwards(FF_ClientFlagsUpdated, static_cast<cell>(index), static_cast<cell>(flag), static_cast<flags[id]>(i));
    return 1; }

^ Don't kill me if what I wrote makes no sense.
__________________

Last edited by OciXCrom; 12-30-2017 at 08:28.
OciXCrom is offline
Send a message via Skype™ to OciXCrom
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 02:45.


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