21.06.2016, 10:19
hello guys i haven made a textdraw for my server and i want that when a please press n in keyboad the textdraw hide/destroy please tell me how i can do that.
#define PRESSED(%0) \
(((newkeys & (%0)) == (%0)) && ((oldkeys & (%0)) != (%0)))
new bool:showingTD [MAX_PLAYERS] = {false, ...};
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
if(PRESSED(KEY_NO)) {
if(showingTD[playerid] == true) {
//hide textdraw
showingTD[playerid] = false;
}
}
/*
if(PRESSED(KEY_NO)) {
//hide textdraw
}
*/
}