~k~ Constants in SendClientMessage - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: ~k~ Constants in SendClientMessage (
/showthread.php?tid=302142)
~k~ Constants in SendClientMessage -
Ash. - 07.12.2011
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
Re: ~k~ Constants in SendClientMessage -
MrObviousPotato - 07.12.2011
I'm assuming you use it the same way as you would with gametexts and textdraws.
Re: ~k~ Constants in SendClientMessage -
Calgon - 07.12.2011
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~");
Re: ~k~ Constants in SendClientMessage -
Thresholdold - 07.12.2011
EDIT: LOL
Re: ~k~ Constants in SendClientMessage -
Ash. - 07.12.2011
Quote:
Originally Posted by Calgon
|
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.");
Re: ~k~ Constants in SendClientMessage -
Calgon - 07.12.2011
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.
Re: ~k~ Constants in SendClientMessage -
Ash. - 07.12.2011
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]](http://pokit.org/get/6bf5dd9ea221a17b55468dce8e7b5714.png)
|
That, is a fair point.
Oh my...
Thanks Calgon!
//Awesome circling by the way!