16.02.2011, 12:37
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"
And here are your stocks
Maybe this is not the best way, but you will get an idea of what to do though? ![Cheesy](images/smilies/biggrin.png)
Jochem
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
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)
}
![Cheesy](images/smilies/biggrin.png)
Jochem