Author Topic: Disable spraycan on specific playertype  (Read 1059 times)

Does it possible to disable the ability to move to the spray can ('E' key) on some kinds of players.
 like, for example, I don't want that horses could spray..
If yes then what line of code exists for this?

what did the artist horses ever do to you

perhaps package usespraycan and check the player's datablock
would also need to force people to put away the spray can while changing to a banned datablock

Also send clientCmdDisabledSprayCan or whatever it is.

Also send clientCmdDisabledSprayCan or whatever it is.
clientcmdsetpaintingdisabled(bool);
bool is either 1 or 0

clientcmdsetpaintingdisabled() doesn't work, neither 0 or 1 in the parenthesis. :(
Works. Thank you!
« Last Edit: December 08, 2018, 01:33:54 PM by BlockAlpha »

Note to you.
You also want to package useSprayCan or whatever to do it properly. Otherwise people can just do clientCmdSetPaintingDisabled(0); in their console and use the spray can.

Also also. Do commandToClient(%client, 'setPaintingDisabled', 1); If you just do clientCmdSetPaintingDisabled(0); then it will only affect the host.