Raised This Month: $ Target: $400
 0% 

get_user_name


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
dj_freeze
Veteran Member
Join Date: Dec 2009
Location: Looking for you!
Old 12-06-2013 , 17:13   get_user_name
Reply With Quote #1

Hello. I'm trying to write some code but i have some problems.

PHP Code:
new name[32]
get_user_name(idname31)

server_cmd(kick ^"%d^"name
instead of returning admins name it returns some number (70 for example).
Why is this happening and how can i get the name?

Last edited by dj_freeze; 12-06-2013 at 17:14.
dj_freeze is offline
Send a message via Skype™ to dj_freeze
YamiKaitou
Has a lovely bunch of coconuts
Join Date: Apr 2006
Location: Texas
Old 12-06-2013 , 17:15   Re: get_user_name
Reply With Quote #2

%s is used for strings
__________________
ProjectYami Laboratories

I do not browse the forums regularly anymore. If you need me for anything (asking questions or anything else), then PM me (be descriptive in your PM, message containing only a link to a thread will be ignored).
YamiKaitou is offline
dj_freeze
Veteran Member
Join Date: Dec 2009
Location: Looking for you!
Old 12-06-2013 , 17:23   Re: get_user_name
Reply With Quote #3

Quote:
Originally Posted by YamiKaitou View Post
%s is used for strings
Thank you very much and what is %d for?

** EDIT **

Sorry 1 more thing..

PHP Code:
new name[32]
get_user_name(idname31)

server_cmd("kick ^"%s^"  %L"name"something"
how must i multilang it?

and this "something" is wrote is txt file like:

something = blalala

Last edited by dj_freeze; 12-06-2013 at 17:36.
dj_freeze is offline
Send a message via Skype™ to dj_freeze
YamiKaitou
Has a lovely bunch of coconuts
Join Date: Apr 2006
Location: Texas
Old 12-06-2013 , 17:30   Re: get_user_name
Reply With Quote #4

http://www.cplusplus.com/reference/cstdio/printf/
__________________
ProjectYami Laboratories

I do not browse the forums regularly anymore. If you need me for anything (asking questions or anything else), then PM me (be descriptive in your PM, message containing only a link to a thread will be ignored).
YamiKaitou is offline
dj_freeze
Veteran Member
Join Date: Dec 2009
Location: Looking for you!
Old 12-06-2013 , 17:34   Re: get_user_name
Reply With Quote #5

Sorry but i don'y understand these. Edited UP

Last edited by dj_freeze; 12-06-2013 at 17:42.
dj_freeze is offline
Send a message via Skype™ to dj_freeze
YamiKaitou
Has a lovely bunch of coconuts
Join Date: Apr 2006
Location: Texas
Old 12-06-2013 , 17:42   Re: get_user_name
Reply With Quote #6

My message was before you editted your post. %L is a special one for ML, see https://wiki.alliedmods.net/Advanced...ingual_Support
__________________
ProjectYami Laboratories

I do not browse the forums regularly anymore. If you need me for anything (asking questions or anything else), then PM me (be descriptive in your PM, message containing only a link to a thread will be ignored).
YamiKaitou is offline
dj_freeze
Veteran Member
Join Date: Dec 2009
Location: Looking for you!
Old 12-06-2013 , 17:52   Re: get_user_name
Reply With Quote #7

for example

PHP Code:
server_cmd("kick # %d %L"userid"BAN123"name
in lang txt i have:
BAN123 = you were banned by %s

Is this correct?
If yes why does it write to me that:
Reason: Kicked :ML_NOTFOUND: charlie_martin
dj_freeze is offline
Send a message via Skype™ to dj_freeze
YamiKaitou
Has a lovely bunch of coconuts
Join Date: Apr 2006
Location: Texas
Old 12-06-2013 , 18:17   Re: get_user_name
Reply With Quote #8

Code:
server_cmd("kick #%d %L", userid, "BAN123", id, name)
__________________
ProjectYami Laboratories

I do not browse the forums regularly anymore. If you need me for anything (asking questions or anything else), then PM me (be descriptive in your PM, message containing only a link to a thread will be ignored).
YamiKaitou is offline
dj_freeze
Veteran Member
Join Date: Dec 2009
Location: Looking for you!
Old 12-06-2013 , 18:23   Re: get_user_name
Reply With Quote #9

Now it's this


Kicked :ML_NOTFOUND:
dj_freeze is offline
Send a message via Skype™ to dj_freeze
YamiKaitou
Has a lovely bunch of coconuts
Join Date: Apr 2006
Location: Texas
Old 12-06-2013 , 18:34   Re: get_user_name
Reply With Quote #10

Did you register the dictionary and include that ML line in the lang file?
__________________
ProjectYami Laboratories

I do not browse the forums regularly anymore. If you need me for anything (asking questions or anything else), then PM me (be descriptive in your PM, message containing only a link to a thread will be ignored).
YamiKaitou 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 13:40.


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