Keyboard commands assistance please.
#1

So .. I've read almost everything I could until I was blue in the face about this key story.. basically I'm wanting to create something that when someone presses their up key, it sends them a message saying "Woop woop", can some one assist me and tell me where I'm going wrong:

Code:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
	if(newkeys == KEY_UP)
	{
	SendClientMessage(playerid, COLOR_YELLOW, "Woop Woop");
  }
}
Thanks in advanced!
Reply
#2

The direction keys aren't detected because they are pressed almost constantly by players, producing too much data to be sent from clients and too much work for this server callback. So there is the function GetPlayerKeys.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)