AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   prefix display (https://forums.alliedmods.net/showthread.php?t=213903)

GhostMan 04-20-2013 13:28

prefix display
 
PHP Code:

new const PREFIX[] = "[AMXX]" 

how should i display this in chat?

PHP Code:

client_print(idprint_chat"%d Hello."PREFIX

or
PHP Code:

client_print(idprint_chat"%s Hello."PREFIX


wickedd 04-20-2013 13:56

Re: prefix display
 
The time it took you to ask this question you could have tried it yourself and got your answer.

GhostMan 04-20-2013 15:53

Re: prefix display
 
it works both, thats why i'm asking :O

wickedd 04-20-2013 16:07

Re: prefix display
 
They both work but in your case the second one is the correct one to use.

%s is for strings
%d is for integers


All times are GMT -4. The time now is 10:54.

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