Raised This Month: $51 Target: $400
 12% 

How do i let the plugin know that %s is a players name?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
XunTric
BANNED
Join Date: Jan 2005
Location: Norway/Norge
Old 03-08-2005 , 10:24   How do i let the plugin know that %s is a players name?
Reply With Quote #1

How do i let the function in my plugin know that %s means the players name?
Like client_print(id, print_chat, "%s sucks")
So the message would be showed like this:
"XunTric sucks", and not "%s sucks".
(Btw, i dont suck )

Thanks
XunTric is offline
More
Member
Join Date: Nov 2004
Location: Internet
Old 03-08-2005 , 10:31  
Reply With Quote #2

client_print(id, print_chat, "%s sucks", "XunTric")

or

new playername[] = "XunTric"
client_print(id, print_chat, "%s sucks", playername)
More is offline
XunTric
BANNED
Join Date: Jan 2005
Location: Norway/Norge
Old 03-08-2005 , 10:37  
Reply With Quote #3

But thats only me. I mean it has to know any player on the server.
Im working on a plugin with xp system and what i want is like:
"%s ganied a level! Congratulations!"
So you understand what i mean?
Thanks anyway
XunTric is offline
xeroblood
BANNED
Join Date: Mar 2004
Location: Toronto, Canada
Old 03-08-2005 , 11:13  
Reply With Quote #4

Code:
stock GainLevel( id ) {     new szUsername[32]     get_user_name( id, szUsername, 31 )     client_print( 0, print_chat, "%s ganied a level! Congratulations!", szUsername )     // do some other stuff...     return }
xeroblood is offline
Send a message via MSN to xeroblood
XunTric
BANNED
Join Date: Jan 2005
Location: Norway/Norge
Old 03-08-2005 , 11:16  
Reply With Quote #5

Thanks
XunTric 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:06.


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