TextDraw Problems
#1

Hello today I made my own function for showing textdraw for Achievements.It`s works but when timer ends it`s start showing and disappearing all that is 1 seconds and it`s repeating...I don`t know how to fix it.So I am asking here.Here is the function with timer:

pawn Код:
stock AchievementDone(playerid,message[])
{
    PlayerTextDrawSetString(playerid,Textdraw70[playerid],message);
    PlayerTextDrawShow(playerid,Textdraw69[playerid]);
    PlayerTextDrawShow(playerid,Textdraw70[playerid]);
    SetTimer("HidingTextDraw",5000,0);
    return 1;
}
forward HidingTextDraw(playerid);
public HidingTextDraw(playerid)
{
    PlayerTextDrawHide(playerid,Textdraw69[playerid]);
    PlayerTextDrawHide(playerid,Textdraw70[playerid]);
    return 1;
}
Please reaply fast I need to fix this to continue my other work...
Reply
#2

You need to pass the player ID using SetTimerEx.
Reply
#3

Quote:
Originally Posted by Finn
Посмотреть сообщение
You need to pass the player ID using SetTimerEx.
I tryed and same problem..
Reply
#4

Anyone know how to fix this? (Sorry for double posting )
Reply
#5

pawn Код:
stock AchievementDone(playerid,message[])
{
    PlayerTextDrawSetString(playerid,Textdraw70[playerid],message);
    PlayerTextDrawShow(playerid,Textdraw69[playerid]);
    PlayerTextDrawShow(playerid,Textdraw70[playerid]);
    SetTimerEx("HidingTextDraw", 5000, 0, "i", playerid);
    return 1;
}
forward HidingTextDraw(playerid);
public HidingTextDraw(playerid)
{
    PlayerTextDrawHide(playerid,Textdraw69[playerid]);
    PlayerTextDrawHide(playerid,Textdraw70[playerid]);
    return 1;
}
and try to check if AchievementDone(playerid,message[]) ist called more then one time?
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)