22.01.2015, 02:04
Quote:
pawn Код:
|
Heres an example, actually its basically what I use, after pushing the function (under it) place 'CancelSelectTextDraw(playerid);', theres no need to include this in the Stock as you may not always be selecting from the WepShop (if you're just showing it without clicking, ect).
pawn Код:
stock HideTextdraw_WeaponShop(playerid, bool:show = true)
{
if(show)
{
for(new i; i < sizeof(WepShop); i ++)
{
TextDrawShowForPlayer(playerid, WebShop[i]);
}
} else {
for(new i; i < sizeof(WepShop); i ++)
{
TextDrawHideForPlayer(playerid, WebShop[i]);
}
}
}
pawn Код:
public {some function}({some parameters})
{
HideTextdraw_WeaponShop(playerid); // this will show it, as by default the Boolean is set to true and doesn't need a value.
HideTextdraw_WeaponShop(playerid, false); // this will hide it, as by default the Boolean is set to true, and to hide it then it'll require a value of 'False'.
}