Blockland Forums > Modification Help

Client Centerprint

Pages: (1/2) > >>

Aide33:


--- Code: ---commandtoclient(%client,'centerprint',"Hello",1);
--- End code ---

Why won't this work?
I input it in the console and it doesn't work!

Port:

Does %client exist in the current scope?

Ipquarx:

That is not the correct usage.
Here is the correct usage:
--- Code: ---clientCmdCenterPrint("message", time in seconds);
--- End code ---
To see, try typing clientCmdCenterPrint("I will disapeear in 5 seconds!", 5); into the console.

This is assuming your trying to do it client-sidedly.

Headcrab Zombie:

Post the entire function that is calling centerprint
Didn't see the "in the console" part

Space Guy:

"input it in the console" won't work because %client hasn't been set, so it's not sending the message to anyone.

findClientByName("Aide33").centerPrint("Hello",3); will display that message for one client whose name best matches the one given. This is the same method the Client->CenterPrint event uses.

Pages: (1/2) > >>

Go to full version