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

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


Post New Thread Reply   
 
Thread Tools Display Modes
Alber9091
Veteran Member
Join Date: Jun 2014
Location: Karachi, Pakistan
Old 11-04-2017 , 15:31   Re: Nick Name To Admins [Particular Flags]
Reply With Quote #11

But what about the code? is it right? mentioned above?
Alber9091 is offline
Relaxing
AlliedModders Donor
Join Date: Jun 2016
Location: White Plains
Old 11-04-2017 , 15:31   Re: Nick Name To Admins [Particular Flags]
Reply With Quote #12

Yes it is.
__________________
Relaxing is offline
Alber9091
Veteran Member
Join Date: Jun 2014
Location: Karachi, Pakistan
Old 11-04-2017 , 17:26   Re: Nick Name To Admins [Particular Flags]
Reply With Quote #13

Quote:
Originally Posted by Alber9091 View Post
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)

Nope Code Edited By Me, Is Not Right, It Gives Compilation Errors. Please Fix It.
Alber9091 is offline
Relaxing
AlliedModders Donor
Join Date: Jun 2016
Location: White Plains
Old 11-05-2017 , 02:24   Re: Nick Name To Admins [Particular Flags]
Reply With Quote #14

Quote:
Originally Posted by HamletEagle View Post
With above code you get errors because index is not defined. Instead of index you have to use the player index param from the public(entity in this case).
index -> id
__________________

Last edited by Relaxing; 11-05-2017 at 02:27.
Relaxing is offline
Alber9091
Veteran Member
Join Date: Jun 2014
Location: Karachi, Pakistan
Old 11-05-2017 , 05:28   Re: Nick Name To Admins [Particular Flags]
Reply With Quote #15

Quote:
Originally Posted by Relaxing View Post
index -> id
Ah, I think, Now It Would Be Better?

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(idAUTHID ,31

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


Last edited by Alber9091; 11-05-2017 at 05:33.
Alber9091 is offline
Alber9091
Veteran Member
Join Date: Jun 2014
Location: Karachi, Pakistan
Old 11-05-2017 , 06:10   Re: Nick Name To Admins [Particular Flags]
Reply With Quote #16

Alber9091 is offline
Relaxing
AlliedModders Donor
Join Date: Jun 2016
Location: White Plains
Old 11-05-2017 , 06:15   Re: Nick Name To Admins [Particular Flags]
Reply With Quote #17

Check ColorChat func. szNick isn't defined anywhere.
Change it with szName.
__________________
Relaxing is offline
Alber9091
Veteran Member
Join Date: Jun 2014
Location: Karachi, Pakistan
Old 11-05-2017 , 06:31   Re: Nick Name To Admins [Particular Flags]
Reply With Quote #18

Quote:
Originally Posted by Relaxing View Post
Check ColorChat func. szNick isn't defined anywhere.
Change it with szName.
I don't know How to check ColorChat func, any idea?

Where as after fixing szNick > szName +
Removing Space After ^04[^03%s^04]"

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(idAUTHID ,31

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



This is line 174

PHP Code:
    ColorChat(idGREEN"[%s] ^03%s, You Have Now %d Points! ^04[^03%s^04]"MESSAGE_PREFIXszNamePlayerPoints[id], AUTHID

Last edited by Alber9091; 11-05-2017 at 06:43.
Alber9091 is offline
Alber9091
Veteran Member
Join Date: Jun 2014
Location: Karachi, Pakistan
Old 11-05-2017 , 06:48   Re: Nick Name To Admins [Particular Flags]
Reply With Quote #19

PHP Code:
// Show How Many Points Player Has
public show_points(id

    new 
szName[32]  
    
get_user_name(idszName31)  
    new 
AuthID[64
    
get_user_authid(idAuthID63

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

Someone Helped Me, And It Compiled:

I don't Know What do these numbers and lenx means?
PHP Code:
        new szName[32]  
        
get_user_name(idszNamecharsmax(szName)) 
>
PHP Code:
     new szName[32]  
     
get_user_name(idszName31
PHP Code:
        new AUTHID[32
        
get_user_authid(idAuthID31
>
PHP Code:
    new AUTHID[32
    
get_user_authid(idAuthID63

Last edited by Alber9091; 11-05-2017 at 06:59.
Alber9091 is offline
Relaxing
AlliedModders Donor
Join Date: Jun 2016
Location: White Plains
Old 11-05-2017 , 07:18   Re: Nick Name To Admins [Particular Flags]
Reply With Quote #20


charsmax(%1) is equal to sizeof(%1)-1
charsmax() = Maximum characters that the array / string can handle.
- value return

Use:
get_user_name(id, szName, charsmax(szName));
get_user_authid(id, AuthID, charsmax(AuthID));
__________________

Last edited by Relaxing; 11-05-2017 at 07:19.
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 01:43.


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