Raised This Month: $ Target: $400
 0% 

Solved [Tutorial] How To Get Steam Id/AuthID [By Relaxing And OciXCrom]


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Alber9091
Veteran Member
Join Date: Jun 2014
Location: Karachi, Pakistan
Old 11-03-2017 , 20:01   [Tutorial] How To Get Steam Id/AuthID [By Relaxing And OciXCrom]
Reply With Quote #1

I know this seems stupid.

But can someone make plugin.
Which with /points show a message. [Color Text]

My nick is %s

Only for players having flags ADMIN_IMMUNITY, ADMIN_SLOT And ADMIN_BAN.

Note: There is another plugin running in server.
Which with /points show points of Player. So, I want both messages together. But this second message for just admins/immunity/slot.

Last edited by Alber9091; 12-19-2017 at 16:05. Reason: Changed Title Name
Alber9091 is offline
Relaxing
AlliedModders Donor
Join Date: Jun 2016
Location: White Plains
Old 11-03-2017 , 20:57   Re: Nick Name To Admins [Particular Flags]
Reply With Quote #2

Code:
#include <amxmodx> #pragma semicolon 1 #define int new #define print_team_default 0 public plugin_init(){     register_clclmd("say /points", "clcmd_exec"); } public clcmd_exec(id){     int szName[32];     get_user_name(id, szName, charsmax(szName));     client_print_color(id, 0, "^3My name is ^4%s", szName);     int flags = read_flags("abd");     if(get_user_flags(id) & flags)         client_print(id, 0, "Admin only message ^4(Second Message)"); }
__________________

Last edited by Relaxing; 11-03-2017 at 21:02. Reason: Way to lazy to read the whole thread
Relaxing is offline
Alber9091
Veteran Member
Join Date: Jun 2014
Location: Karachi, Pakistan
Old 11-04-2017 , 06:15   Re: Nick Name To Admins [Particular Flags]
Reply With Quote #3

Quote:
Originally Posted by Relaxing View Post
Code:
#include <amxmodx> #pragma semicolon 1 #define int new #define print_team_default 0 public plugin_init(){     register_clclmd("say /points", "clcmd_exec"); } public clcmd_exec(id){     int szName[32];     get_user_name(id, szName, charsmax(szName));     client_print_color(id, 0, "^3My name is ^4%s", szName);     int flags = read_flags("abd");     if(get_user_flags(id) & flags)         client_print(id, 0, "Admin only message ^4(Second Message)"); }
Thanks for the help ..!! But I guess you didn't actually understood. The idea is 90% clear. But still let me make it more clear.

Ah ..!! There Is Already Plugin Existing In Server. buy_points_vip. So, if anyone write /points! It shows his/her point.
But now I want Admins with Flags (abd)[Either they have all of these flags or any one of it] To get both messages, whey they type /points.

Like Admin having either of any flag. Like ADMIN_IMMUNITY (a flag).
If type
say /points or team_say /points

It shows message to him.

Message- 1: My Nick Is %s [This Message Should Appear With Player Having Either Of Any Flag Mentioned Above, i.e: a,b or d]
Message- 2: Your Have 345 Points (This Message Is Already Provided By Another Plugin Running In Server.)

I Want Both Messages In Conjugation With /Points Command (say_team and say). One is already provided buy_vip_with_points [For All], 2nd By This Plugin [Only For Specified Flags].
Alber9091 is offline
OciXCrom
Veteran Member
Join Date: Oct 2013
Location: Macedonia
Old 11-04-2017 , 09:05   Re: Nick Name To Admins [Particular Flags]
Reply With Quote #4

So why just not post your points plugin so we can edit it?! Here's the same code with all of the only-god-knows-why-he-added-this stuff removed:

PHP Code:
#include <amxmodx>

public plugin_init()
{
    
register_plugin("Points""1.0""OciXCrom")
    
register_clcmd("say /points""ShowPoints")
    
register_clcmd("say_team /points""ShowPoints")
}

public 
ShowPoints(id)
{
    new 
iFlags get_user_flags(id)
    
    if(
iFlags ADMIN_IMMUNITY && iFlags ADMIN_BAN && iFlags ADMIN_BAN)
    {
        new 
szName[32]
        
get_user_name(idszNamecharsmax(szName))
        
client_print(idprint_chat"Your name is %s"szName)
    }

Put it above your other plugin if you want it to work.
__________________
OciXCrom is offline
Send a message via Skype™ to OciXCrom
Alber9091
Veteran Member
Join Date: Jun 2014
Location: Karachi, Pakistan
Old 11-04-2017 , 12:01   Re: Nick Name To Admins [Particular Flags]
Reply With Quote #5

Quote:
Originally Posted by OciXCrom View Post
So why just not post your points plugin so we can edit it?! Here's the same code with all of the only-god-knows-why-he-added-this stuff removed:

PHP Code:
#include <amxmodx>

public plugin_init()
{
    
register_plugin("Points""1.0""OciXCrom")
    
register_clcmd("say /points""ShowPoints")
    
register_clcmd("say_team /points""ShowPoints")
}

public 
ShowPoints(id)
{
    new 
iFlags get_user_flags(id)
    
    if(
iFlags ADMIN_IMMUNITY && iFlags ADMIN_BAN && iFlags ADMIN_BAN)
    {
        new 
szName[32]
        
get_user_name(idszNamecharsmax(szName))
        
client_print(idprint_chat"Your name is %s"szName)
    }

Put it above your other plugin if you want it to work.
Ah, Perfect, But Can You Add Steam Id Too.

Example:
Your Nick is %s [STEAM_0:1:234567]
Alber9091 is offline
Relaxing
AlliedModders Donor
Join Date: Jun 2016
Location: White Plains
Old 11-04-2017 , 13:13   Re: Nick Name To Admins [Particular Flags]
Reply With Quote #6

https://forums.alliedmods.net/showthread.php?t=3565
__________________
Relaxing is offline
Alber9091
Veteran Member
Join Date: Jun 2014
Location: Karachi, Pakistan
Old 11-04-2017 , 13:50   Re: Nick Name To Admins [Particular Flags]
Reply With Quote #7

PHP Code:
#include <amxmodx> 

public plugin_init() 

    
register_plugin("Points""1.0""OciXCrom"
    
register_clcmd("say /points""ShowPoints"
    
register_clcmd("say_team /points""ShowPoints"


public 
ShowPoints(id

    new 
iFlags get_user_flags(id
     
    if(
iFlags ADMIN_IMMUNITY && iFlags ADMIN_BAN && iFlags ADMIN_BAN
    { 
        new 
szName[32
        
get_user_name(idszNamecharsmax(szName)) 
        new 
AUTHID[32]
        
get_user_authid(indexAUTHID ,31)
        
client_print(idprint_chat"Your name is %s [%s]"szNameAUTHID
    } 

Like this?

Last edited by Alber9091; 11-04-2017 at 14:51.
Alber9091 is offline
Alber9091
Veteran Member
Join Date: Jun 2014
Location: Karachi, Pakistan
Old 11-04-2017 , 13:58   Re: Nick Name To Admins [Particular Flags]
Reply With Quote #8

Or You Can Make It Like This? Or Fix It? Or It is Alright?
Ignore Flags, If this case is possible.

PHP Code:
// Show How Many Points Player Has
public show_points(id)
{
        new 
szName[32
        
get_user_name(idszNamecharsmax(szName)) 
        new 
AUTHID[32]
        
get_user_authid(indexAUTHID ,31)

    
ColorChat(idGREEN"[%s] ^03%s, You Have Now %d Points! ^04[^03%s^04]" MESSAGE_PREFIXszNickPlayerPoints[id], AUTHID)


Last edited by Alber9091; 11-04-2017 at 14:51.
Alber9091 is offline
Alber9091
Veteran Member
Join Date: Jun 2014
Location: Karachi, Pakistan
Old 11-04-2017 , 14:35   Re: Nick Name To Admins [Particular Flags]
Reply With Quote #9

Well, Whats Difference Between
SzUserId, SzSteamId, SzAuthID?
Alber9091 is offline
Relaxing
AlliedModders Donor
Join Date: Jun 2016
Location: White Plains
Old 11-04-2017 , 15:10   Re: Nick Name To Admins [Particular Flags]
Reply With Quote #10

They all are used to identify a client. Retrieving user information.
Your question isn't referred to AMXX, since every player has these IDs.
All players have their own data. The same value will result on patching the product.
__________________

Last edited by Relaxing; 11-04-2017 at 15:10.
Relaxing 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 18:35.


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