OnPlayerKeyStateChange
#1

Hello guys, I'm currently scripting an RPG Gamemode for me right now, maybe I'll host it one time and I made a rent car system and at onplayerkeystatechange i wrote if he is in the rentcar range then open a dialog, but I want to do it only when the player presses key Y, I did read the wiki but didn't understand much. I'm on my android phone right now so sorry if you wanted some code.
Reply
#2

Код:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
if ((newkeys & KEY_YES) && IsPlayerInRangeOfPoint(playerid, x, y ,z)) // Your coords
	{
	    ShowPlayerDialog.... // Your dialog code
	}
	return 1;
}
Reply
#3

Thanks, appreciated.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)