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

Error while making prefix plugin.


Post New Thread Reply   
 
Thread Tools Display Modes
supertrio17
Senior Member
Join Date: May 2020
Location: Serbia
Old 05-25-2020 , 22:37   Re: Error while making prefix plugin.
Reply With Quote #11

Quote:
Originally Posted by OciXCrom View Post
I made both variants...
I'm sorry, but I can't find that other variant. I tried to make this myself, but can you tell me where am I wrong. I tought I understand this...

PHP Code:
#include <amxmodx>
#include <chatmanager>

#define PLUGIN "Prefix For setinfo"
#define VERSION "1.0"
#define AUTHOR "Mr. Boopsy"
#define PREFIX "[VIP]"
#define LAUNCHER_INFO "vip"
#define LAUNCHER_INFO_VALUE 1

public plugin_init()
{
    
register_plugin(PLUGINVERSIONAUTHOR)
}

public 
client_authorized(id)
{
    new 
szInfo[5]
    
get_user_info(idLAUNCHER_INFOszInfocharsmax(szInfo))
    
    if (
szInfo[0] == LAUNCHER_INFO_VALUE)
    {
        
cm_set_user_prefix(idPREFIX)
    }

Even the ones you made didn't work, I just get normal chat, I do not know what is wrong...
supertrio17 is offline
OciXCrom
Veteran Member
Join Date: Oct 2013
Location: Macedonia
Old 05-26-2020 , 08:12   Re: Error while making prefix plugin.
Reply With Quote #12

Maybe if you stop ignoring your threads and creating new ones you will find the answers.

https://forums.alliedmods.net/showpo...5&postcount=11
__________________
OciXCrom is offline
Send a message via Skype™ to OciXCrom
supertrio17
Senior Member
Join Date: May 2020
Location: Serbia
Old 05-26-2020 , 08:46   Re: Error while making prefix plugin.
Reply With Quote #13

Hey, I'm really sorry, I didn't see that post at all. Thank you so much, I will test it immediately.
supertrio17 is offline
supertrio17
Senior Member
Join Date: May 2020
Location: Serbia
Old 05-26-2020 , 08:56   Re: Error while making prefix plugin.
Reply With Quote #14

Quote:
Originally Posted by OciXCrom View Post
Maybe if you stop ignoring your threads and creating new ones you will find the answers.

https://forums.alliedmods.net/showpo...5&postcount=11
But now I'm curious why mine didn't work, can you please explain it to me?
supertrio17 is offline
supertrio17
Senior Member
Join Date: May 2020
Location: Serbia
Old 05-26-2020 , 09:01   Re: Error while making prefix plugin.
Reply With Quote #15

Quote:
Originally Posted by OciXCrom View Post
Maybe if you stop ignoring your threads and creating new ones you will find the answers.

https://forums.alliedmods.net/showpo...5&postcount=11
It still doesn't work
supertrio17 is offline
OciXCrom
Veteran Member
Join Date: Oct 2013
Location: Macedonia
Old 05-26-2020 , 14:42   Re: Error while making prefix plugin.
Reply With Quote #16

Quote:
Originally Posted by supertrio17 View Post
But now I'm curious why mine didn't work, can you please explain it to me?
Because Chat Manager sets the prefix 1 second after the "client_putinserver" event, thus overrides your "client_authorized" call which happens before this. There's a reason why I added a forward that gets called when the prefix is updated (cm_player_data_updated) - you should always use that if you want to make additional changes.
__________________

Last edited by OciXCrom; 05-26-2020 at 14:43.
OciXCrom is offline
Send a message via Skype™ to OciXCrom
supertrio17
Senior Member
Join Date: May 2020
Location: Serbia
Old 05-26-2020 , 14:56   Re: Error while making prefix plugin.
Reply With Quote #17

Quote:
Originally Posted by OciXCrom View Post
Because Chat Manager sets the prefix 1 second after the "client_putinserver" event, thus overrides your "client_authorized" call which happens before this. There's a reason why I added a forward that gets called when the prefix is updated (cm_player_data_updated) - you should always use that if you want to make additional changes.
That still doesn't work. I have no idea why, but no prefixes are shown.
supertrio17 is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 05-26-2020 , 23:28   Re: Error while making prefix plugin.
Reply With Quote #18

Quote:
Originally Posted by supertrio17 View Post
Hey, I'm really sorry, I didn't see that post at all. Thank you so much, I will test it immediately.
If you are not diligent enough to check your threads, you should subscribe to your threads (via Thread Tools) so that you get an e-mail when there is a response.
__________________
fysiks 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 16:05.


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