17.09.2017, 15:27
Is there something like it? It's not possible to detect esc key, is there some other way to find out?
Is there something like it? It's not possible to detect esc key, is there some other way to find out?
|
new PlayerSelecting[MAX_PLAYERS]; SomeFunctions(playerid) { // Somehow it ended up here PlayerSelecting[playerid] = 1; SelectObject(playerid); SelectTextDraw(playerid, 0xFFFFFF00); } public OnPlayerSelectObject(playerid, type, objectid, modelid, Float:fX, Float:fY, Float:fZ) { PlayerSelecting[playerid] = 0; //assuming that the selecting process is cancelled in this callback when an object has been selected? // do stuff with object that was selected } public OnPlayerClickTextDraw(playerid, Text:clickedid) { if (clickedid == INVALID_TEXT_DRAW && PlayerSelecting[playerid]) { // do stuff } }