How to Tell if textdraw is showing
#5

Sure, wait a second

Just notices it's better to do with a multi-dimensional array. I will make an example for that instead of enum

Add to top of script, to the other "new"
pawn Код:
new TextDrawShowed[MAX_TEXT_DRAWS][MAX_PLAYERS]; // 0 = hided ... 1 = showed
And here are your stocks
pawn Код:
stock TextDrawShowForPlayerEx(playerid,drawid) // Playerid it has to show for and draw it has to show (returned value on TextDrawCreate)
{
    TextDrawShowForPlayer(playerid,text); // Showing textdraw
    TextDrawShowed[drawid][playerid] = 1; // Since '1' means showed, we got to set it to 1
    return 1; // The return doesn't matter as it doesn't return any value
}

stock TextDrawHideForPlayerEx(playerid,drawid) // Playerid it has to hide for and draw it should hide (returned value on TextDrawCreate)
{
    TextDrawHideForPlayer(playerid,text); // Hiding textdraw
    TextDrawShowed[drawid][playerid] = 0; // 0 means hided, so we set it back to 0
    return 1; // The return doesn't matter as it doesn't return any value
}

stock IsTextDrawShowed(playerid,drawid)
{
    return TextDrawShowed[drawid][playerid]; // Returns 0 if it's hided, or returns 1 if it's showed (but only if you have used the above stocks)
}
Maybe this is not the best way, but you will get an idea of what to do though?

Jochem
Reply


Messages In This Thread
How to Tell if textdraw is showing - by Windows7 - 16.02.2011, 11:36
Re: How to Tell if textdraw is showing - by Jochemd - 16.02.2011, 11:38
Re: How to Tell if textdraw is showing - by Windows7 - 16.02.2011, 11:43
Re: How to Tell if textdraw is showing - by Windows7 - 16.02.2011, 11:55
Re: How to Tell if textdraw is showing - by Jochemd - 16.02.2011, 12:37
Re: How to Tell if textdraw is showing - by Windows7 - 16.02.2011, 21:16

Forum Jump:


Users browsing this thread: 1 Guest(s)