23.03.2013, 17:17
Buenas, estube haciendo un sistema para que un textdraw sea como un gametextforplayer, que se muestre un determinado tiempo y luego se esconda. Pero el problema es que el textdraw no se esconde, queda allн. Les muestro como puse los timers y demбs definiciones:
Modo de uso:
їEs posible que sea eso del SetPVarInt? Uso y_ini.
PHP код:
stock GameTextDraw(playerid,string[],tiempo)
{
if (!GetPVarInt(playerid,"TextMsgMostrado"))
{
TextDrawSetString(MsgText[playerid],string);
TextDrawShowForPlayer(playerid,MsgText[playerid]);
SetPVarInt(playerid,"TextMsgMostrado",1);
SetTimerEx("EsconderMsg",tiempo,0,"d",playerid);
}
return 1;
}
stock EsconderText(playerid)
{
TextDrawHideForPlayer(playerid,MsgText[playerid]);
SetPVarInt(playerid,"TextMsgMostrado",0);
return 1;
}
PHP код:
GameTextDraw(playerid, "[] ЎNo puedes usar esto!", 5000);