29.04.2014, 19:58
(
Последний раз редактировалось ShaneOvSina; 29.04.2014 в 22:31.
)
Removed
new
PlayerText:Textdraw[ 25 ],
bool:Showing[ MAX_PLAYERS ] //you could use y_bits as well.
;
public OnPlayerSpawn(playerid)
{
/*
use PlayerTextdraws instead of creating a GlobalTexdraws
https://sampwiki.blast.hk/wiki/CreatePlayerTextDraw
https://sampwiki.blast.hk/wiki/PlayerTex...roundColor
https://sampwiki.blast.hk/wiki/PlayerTextDrawLetterSize
https://sampwiki.blast.hk/wiki/PlayerTextDrawColor
https://sampwiki.blast.hk/wiki/PlayerTextDrawSetOutline
https://sampwiki.blast.hk/wiki/PlayerTex...oportional
https://sampwiki.blast.hk/wiki/PlayerTextDrawSetShadow
https://sampwiki.blast.hk/wiki/PlayerTextDrawUseBox
https://sampwiki.blast.hk/wiki/PlayerTextDrawBoxColor
https://sampwiki.blast.hk/wiki/PlayerTextDrawTextSize
*/
ShowPlayerRulesTextdraw(playerid);
//rest of code.
return true;
}
ShowPlayerRulesTextdraw(playerid)
{
for(new i = 0; i != sizeof(Textdraw); ++i )
{
PlayerTextDrawShow(playerid, Textdraw[i]);
}
Showing[ playerid ] = true;
return true;
}
HidePlayerRulesTextdraw(playerid)
{
for(new i = 0; i != sizeof(Textdraw); ++i )
{
PlayerTextDrawHide(playerid, Textdraw[i]);
}
Showing[ playerid ] = false;
return true;
}
True but what's the purpose of Showing array? I don't quite follow your question
![]() |
Showing[ MAX_PLAYERS ];
ShowPlayerRulesTextdraw(playerid)
{
if(Showing[playerid] == false)
{
for(new i = 0; i != sizeof(Textdraw); ++i )
{
PlayerTextDrawShow(playerid, Textdraw[i]);
}
}
Showing[ playerid ] = true;
return true;
}
HidePlayerRulesTextdraw(playerid)
{
if(Showing[playerid] == true)
{
for(new i = 0; i != sizeof(Textdraw); ++i )
{
PlayerTextDrawHide(playerid, Textdraw[i]);
}
}
Showing[ playerid ] = false;
return true;
}