16.01.2019, 17:48
use boolean once you're near one set it to true and check if allready true do nothing if not true show td
then when leaving check if the boolean is true hide td and set it to false
example
then when leaving check if the boolean is true hide td and set it to false
example
PHP код:
new bool:on[MAX_PLAYERS];
CMD:superman(playerid)
{
if(!on[playerid])
{
SetPlayerHealth(playerid, 999999);
on[playerid] = true;
}
else //or if(on[playerid])
{
SetPlayerHealth(playerid, 100);
on[playerid] = false;
}
return 1;
}