Textdraw hide
#1

I have problem when somebody made kill spree it show textdraw but after some seconds this textdraw wont hide!

Код:
format(string, sizeof(string), "~r~%s is on killing spree 3", pname);
        TextDrawHideForPlayer(playerid,Spree);
        TextDrawSetString(Spree, string);
        TextDrawShowForAll(Spree); 
        SetTimer("RemoveTextDraw", 3000, 0);
Код:
forward RemoveTextDraw(playerid);
public RemoveTextDraw(playerid)
{
   TextDrawHideForPlayer(playerid, Spree);
   return 1;
}
Reply
#2

Код:
forward RemoveTextDraw(playerid);
public RemoveTextDraw(playerid)
{
for(new t=0; t<=MAX_PLAYERS; t++)
	{
   TextDrawHideForPlayer(t, Spree);
   return 1;
        }
}
test this
Reply
#3

Quote:
Originally Posted by ThatFag
Посмотреть сообщение
Код:
forward RemoveTextDraw(playerid);
public RemoveTextDraw(playerid)
{
for(new t=0; t<=MAX_PLAYERS; t++)
	{
   TextDrawHideForPlayer(t, Spree);
   return 1;
        }
}
test this
dont return inside the loop it will break the loop there will be no sense in doing a loop and use foreach and there is not point in passing playerid and no arguements can be passed in settimer.
Reply
#4

try this sir
PHP код:
forward RemoveTextDraw();
public 
RemoveTextDraw()
{
   
TextDrawHideForAll(Spree);
   return 
1;

You can't use a public function with playerid or an value and call it by settimer you have to call it by settimerex also this function don't need the "playerid" you just have to hide the textdraw for all as long as you were showing it for all.
Reply
#5

Quote:
Originally Posted by jlalt
Посмотреть сообщение
try this sir
PHP код:
forward RemoveTextDraw();
public 
RemoveTextDraw()
{
   
TextDrawHideForAll(Spree);
   return 
1;

You can't use a public function with playerid or an value and call it by settimer you have to call it by settimerex also this function don't need the "playerid" you just have to hide the textdraw for all as long as you were showing it for all.
Thanks man!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)