textdraw problem
#1

I have problem with textdraw. I have few textdraws with timer (show timer) and its working normal while first player come in but when second players come and see that txtdraw, it will bug and doesn't go away from screen. I dont see any reasons of this at all :dd
Reply
#2

Show the code.
Reply
#3

Add this to your OnPlayerConnect, OnplayerSpawn, OnPlayerDisconnect and OnPlayerDeath

Код:
Textdrawhideforplayer(i,Your textdraw number);
or
Код:
Textdrawhideforplayer(playerid,Your texdrawnumber);
If the problem is with animhelpr then :
Код:
Textdrawhideforplayer(i,txtanimhelper);
Temme if it works
Reply
#4

Or maybe you can also Add A Command which will Hide all the Textdraws

Example this

Код:
if(strcmp(cmd, "/refresh", true) == 0)
	        SetPlayerVirtualWorld(playerid, 0);
	        SetPlayerInterior(playerid,0);
	        TextDrawHideForPlayer(playerid,txtAnimHelper);
	        SendClientMessage(playerid,COLOR_YELLOW3,"You have been Refreshed");
	        return 1;
		}
Reply
#5

hehee thats wont work with command because textdraws are welcome text and that is so stupid if u have take out welcome text with command but that is not bad idea at all and heres my textdraws and timers!
pawn Код:
public OnPlayerConnect(playerid)
{
        TextDrawShowForPlayer(playerid, Textdraw4);
        TextDrawShowForPlayer(playerid, Textdraw5);
        TextDrawShowForPlayer(playerid, Textdraw8);
        TextDrawShowForPlayer(playerid, Textdraw9);
        TextDrawShowForPlayer(playerid, Textdraw10);
        SetTimerEx("ShowMessage", 9000, false, "is", 1337, "%s left");
return 1;
}
and
pawn Код:
forward ShowMessage(playerid);
public ShowMessage(playerid)
{
TextDrawShowForPlayer(playerid, Text:Textdraw4);
SetTimer("closemessage", 6, 1);
return 1;
}
forward closemessage(playerid);
public closemessage(playerid)
{
TextDrawHideForPlayer(playerid, Text:Textdraw4);
TextDrawHideForPlayer(playerid, Text:Textdraw4);
TextDrawHideForPlayer(playerid, Text:Textdraw5);
TextDrawHideForPlayer(playerid, Text:Textdraw8);
TextDrawHideForPlayer(playerid, Text:Textdraw9);
TextDrawHideForPlayer(playerid, Text:Textdraw10);
return 1;
}
Reply
#6

Then Add this to your OnplayerSpawn, OnPlayerdeath And Onplayer Disconnect

Код:
TextDrawHideForPlayer(playerid, Text:Textdraw4);
TextDrawHideForPlayer(playerid, Text:Textdraw4);
TextDrawHideForPlayer(playerid, Text:Textdraw5);
TextDrawHideForPlayer(playerid, Text:Textdraw8);
TextDrawHideForPlayer(playerid, Text:Textdraw9);
TextDrawHideForPlayer(playerid, Text:Textdraw10);
return 1;
}
Reply
#7

But then my timer bugging.... :P
Reply
#8

Quote:
Originally Posted by the_zande
Посмотреть сообщение
But then my timer bugging.... :P
Umm, The timer is not that useful, Temme, The welcome message comes only when a player connects right?
Reply
#9

yeaa but thats not fix it anyways becuase its on player class selection and ehh everyone have to take class with random XDD that wont work :P
Reply
#10

Can i get your script? i will fix it for you, I Already own a gamemode A medium roleplay, So dont think i will steal it, Or Else chat me at ********
Reply
#11

krrr come on somebody??
Reply
#12

pawn Код:
SetTimerEx("ShowMessage", 9000, false, "is", 1337, "%s left");

1337 isn't a valid playerid, and there's no second parameter in ShowMessage(playerid)

Change it to
pawn Код:
SetTimerEx("ShowMessage", 9000, false, "i", playerid);
Reply
#13

Quote:
Originally Posted by SilentHuntR
Посмотреть сообщение
pawn Код:
SetTimerEx("ShowMessage", 9000, false, "is", 1337, "%s left");

1337 isn't a valid playerid, and there's no second parameter in ShowMessage(playerid)

Change it to
pawn Код:
SetTimerEx("ShowMessage", 9000, false, "i", playerid);
nice forums What webhost used?
Reply
#14

ohh ty mate xDDDDD it works
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)