~k~ Constants in SendClientMessage
#1

Good Evening.

It states in the 0.3d RC thread, that we can now use the ~k~ constants in SendClientMessage, though I have no idea how (and it is not documented on the wiki). Could someone please tell me how to do this? I'm quite intrigued now!

Thanks,
Ash
Reply
#2

I'm assuming you use it the same way as you would with gametexts and textdraws.
Reply
#3

Don't know how you can be confused by it, it's pretty obvious...

List of ~k~ constants: https://sampwiki.blast.hk/wiki/GetPlayerKeys

Example:
pawn Код:
SendClientMessage(playerid, 0, "Bop it! ~k~~VEHICLE_TURRETRIGHT~");
Reply
#4

EDIT: LOL
Reply
#5

Quote:
Originally Posted by Calgon
Посмотреть сообщение
Don't know how you can be confused by it, it's pretty obvious...

List of ~k~ constants: https://sampwiki.blast.hk/wiki/GetPlayerKeys

Example:
pawn Код:
SendClientMessage(playerid, 0, "Bop it! ~k~~VEHICLE_TURRETRIGHT~");
You sure about that? I can't get that to work (hence why I was confused)...


pawn Код:
SendClientMessage(playerid, COLOUR_YELLOW, "Press ~k~~KEY_FIRE~ to attach aircraft to your tug.");
Reply
#6

You're not using the proper key constants, you're just copying the defines which are the numeric representations of the keys often used in OnPlayerKeyStateChange. It clearly says they're defines as well, you should have pay closer attention.

Take a proper look at the wiki:



I've circled (or tried to in PokIt) the defines for you in red, if you haven't noticed.
Reply
#7

Quote:
Originally Posted by Calgon
Посмотреть сообщение
You're not using the constants, you're just copying the defines, which it clearly says they're defines.

Take a proper look at the wiki:

[Image: 6bf5dd9ea221a17b55468dce8e7b5714.png]
That, is a fair point.

Oh my...

Thanks Calgon!
//Awesome circling by the way!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)