AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   How do i let the plugin know that %s is a players name? (https://forums.alliedmods.net/showthread.php?t=11039)

XunTric 03-08-2005 10:24

How do i let the plugin know that %s is a players name?
 
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 :lol: )

Thanks

More 03-08-2005 10:31

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

or

new playername[] = "XunTric"
client_print(id, print_chat, "%s sucks", playername)

XunTric 03-08-2005 10:37

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

xeroblood 03-08-2005 11:13

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 }

XunTric 03-08-2005 11:16

Thanks


All times are GMT -4. The time now is 14:02.

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