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

player name


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
anakonda001
Member
Join Date: Jul 2020
Old 08-19-2020 , 05:42   player name
Reply With Quote #1

hi, how can I fix it? in the chat instead of the player's name writes Half Life Dedicated Server

Code:
new name[33]
get_user_name(0, name, 32)

ChatColor(0, "Player %s zeroed out the murders!", name)

Last edited by anakonda001; 08-19-2020 at 06:07.
anakonda001 is offline
Natsheh
Veteran Member
Join Date: Sep 2012
Old 08-19-2020 , 06:14   Re: player name
Reply With Quote #2

Show full code or at least the function
__________________
@Jailbreak Main Mod v2.7.0 100%
@User Tag Prefix 100% done !
@Mystery Box 100% done !
@VIP System 100% done !

Natsheh is offline
Send a message via MSN to Natsheh Send a message via Skype™ to Natsheh
anakonda001
Member
Join Date: Jul 2020
Old 08-19-2020 , 06:47   Re: player name
Reply With Quote #3

Quote:
Originally Posted by Natsheh View Post
Show full code or at least the function
look in your personal messages
anakonda001 is offline
DJEarthQuake
Veteran Member
Join Date: Jan 2014
Location: Astral planes
Old 08-19-2020 , 07:13   Re: player name
Reply With Quote #4

Quote:
Originally Posted by anakonda001 View Post
hi, how can I fix it? in the chat instead of the player's name writes Half Life Dedicated Server

Code:
new name[33]
get_user_name(0, name, 32)

ChatColor(0, "Player %s zeroed out the murders!", name)

get_user_name(0, name, 32)


get_user_name(id, name, 32)
__________________
DJEarthQuake is offline
Supremache
Veteran Member
Join Date: Sep 2019
Location: Egypt
Old 08-19-2020 , 07:28   Re: player name
Reply With Quote #5

Quote:
Originally Posted by anakonda001 View Post
hi, how can I fix it? in the chat instead of the player's name writes Half Life Dedicated Server

Code:
new name[33]
get_user_name(0, name, 32)

ChatColor(0, "Player %s zeroed out the murders!", name)
try this
PHP Code:
static szName[32]
            
get_user_name(indexszNamecharsmax(szName))
ChatColor(0"Player %s zeroed out the murders!"szName
Supremache is offline
anakonda001
Member
Join Date: Jul 2020
Old 08-19-2020 , 07:30   Re: player name
Reply With Quote #6

Quote:
Originally Posted by DJEarthQuake View Post
get_user_name(0, name, 32)


get_user_name(id, name, 32)
need 0, want that would nick player saw all
anakonda001 is offline
anakonda001
Member
Join Date: Jul 2020
Old 08-19-2020 , 07:42   Re: player name
Reply With Quote #7

do so
get_user_name(iPlayer, name, 32)
anakonda001 is offline
ZaX
Senior Member
Join Date: Jan 2015
Old 08-19-2020 , 07:56   Re: player name
Reply With Quote #8

You need to provide a valid index for the player in the get_user_name. Index 0 is the server so it will get the servers name.
You dont use '0' index to get everyones name, however I dont think you need to get everyones name in here, what for? Show the function if you want to get help. Dont send in private message to someone

@Supremache
What you did already explained by DJEathQuake

Last edited by ZaX; 08-19-2020 at 08:03.
ZaX is offline
anakonda001
Member
Join Date: Jul 2020
Old 08-19-2020 , 08:06   Re: player name
Reply With Quote #9

Quote:
Originally Posted by ZaX View Post
You need to provide a valid index for the player in the get_user_name. Index 0 is the server so it will get the servers name.
You dont use '0' index to get everyones name, however I dont think you need to get everyones name in here, what for? Show the function if you want to get help. Dont send in private message to someone
do so
get_user_name (iPlayer, name, 32) seems to work
anakonda001 is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 08-19-2020 , 23:11   Re: player name
Reply With Quote #10

If you had posted the full code, or probably even just the function, this would have been solved with only one reply instead of 8.

Generally, the more information/code you provide, the better and quicker advice you will get.
__________________

Last edited by fysiks; 08-19-2020 at 23:14.
fysiks is offline
Reply


Thread Tools
Display Modes

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


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