17.09.2011, 12:14
Hi, some days ago I have asked for a script in the script request topic...
I was quiet happy that it was scriptable and that someone has made it for me
But there's a little problem, when I try to use the command it says undefined symbol...
My post: "Like:
TextdrawSetTimerString(playerid,text:text,time)
Wich sets a timer for a textdraw string to change into " "
And OnTextDrawSetStringTimerEnd
Wich gets called when the timer from the first funct hits 0
this way its easy to make handy td's "
so basically what it should do, you can use a new function wich sets the time for a textdraw string to change...
it's quiet usefull for my server,
so the person who helped me out gave me this:
I added it in my GM, and had no problems compiling.
now, when I tried to use the TextDrawSetTimerString function:
but I get an error:
error line:
I don't really get what the compiler means by define, because in all other stocks in my script i could just use the command... whitout having to define something
I was quiet happy that it was scriptable and that someone has made it for me
But there's a little problem, when I try to use the command it says undefined symbol...
My post: "Like:
TextdrawSetTimerString(playerid,text:text,time)
Wich sets a timer for a textdraw string to change into " "
And OnTextDrawSetStringTimerEnd
Wich gets called when the timer from the first funct hits 0
this way its easy to make handy td's "
so basically what it should do, you can use a new function wich sets the time for a textdraw string to change...
it's quiet usefull for my server,
so the person who helped me out gave me this:
pawn Код:
forward TSTS_TimerFunction(text);
public TSTS_TimerFunction(text)
{
TextDrawSetString(Text:text, " ");
return OnTextDrawSetStringTimerEnd(Text:text);
}
forward OnTextDrawSetStringTimerEnd(Text:text);
stock TextDrawSetTimerString(Text:text, time)
{
return SetTimerEx("TSTS_TimerFunction", time, 0, "i", _:text);
}
public OnTextDrawSetStringTimerEnd(Text:text)
{
// Textdraw string is set to " " for now!
return 1;
}
now, when I tried to use the TextDrawSetTimerString function:
pawn Код:
if ( !strcmp( "/yay", cmdtext, true, 11 ) )
{
TextDrawShowForPlayer(playerid, talking);
TextDrawSetTimerString(talking, 5000);
return 1;
}
Код:
C:\Users\William\Documents\Famous' World\Famous' World\gamemodes\Famous.pwn(5195) : error 017: undefined symbol "TextDrawSetTimerString" Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 1 Error.
pawn Код:
TextDrawSetTimerString(talking, 5000);