15.09.2018, 19:06
Using OnPlayerKeyStateChange this can be a simple task. 
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.

Код:
// 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;
}

