Problem
#8

Using OnPlayerKeyStateChange this can be a simple task.

Код:
// PRESSED(keys)
#define PRESSED(%0) \
	(((newkeys & (%0)) == (%0)) && ((oldkeys & (%0)) != (%0)))

public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
	if (PRESSED(KEY_YES)) // default key is Y
	{
		if(IsPlayerInRangeOfPoint(playerid, range, X, Y, Z)) // plug in your range, X, Y, and Z coordinates here.
		{
			// do what ever you wish to do here.
		}
	}
	return 1;
}
I realise you said you would do it alone, but I figured I'd give you the bare bones code for your own reference or anyone else coming across this thread wanting to do a similar thing.
Reply


Messages In This Thread
Problem - by KinderClans - 15.09.2018, 18:37
Re: Problem - by Burridge - 15.09.2018, 18:38
Re: Problem - by Kasichok - 15.09.2018, 18:44
Re: Problem - by KinderClans - 15.09.2018, 18:46
Re: Problem - by Kasichok - 15.09.2018, 18:47
Re: Problem - by spinu - 15.09.2018, 18:48
Re: Problem - by KinderClans - 15.09.2018, 18:57
Re: Problem - by Burridge - 15.09.2018, 19:06
Re: Problem - by KinderClans - 15.09.2018, 19:21
Re: Problem - by Burridge - 15.09.2018, 19:27

Forum Jump:


Users browsing this thread: 1 Guest(s)