SA-MP Forums Archive
textdraw problem - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: textdraw problem (/showthread.php?tid=253244)



textdraw problem - the_zande - 05.05.2011

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


Re: textdraw problem - MadeMan - 05.05.2011

Show the code.


Re: textdraw problem - Sid_Alexander - 05.05.2011

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


Re: textdraw problem - Sid_Alexander - 05.05.2011

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;
		}



Re: textdraw problem - the_zande - 05.05.2011

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;
}



Re: textdraw problem - Sid_Alexander - 05.05.2011

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;
}



Re: textdraw problem - the_zande - 05.05.2011

But then my timer bugging.... :P


Re: textdraw problem - Sid_Alexander - 05.05.2011

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?


Re: textdraw problem - the_zande - 05.05.2011

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


Re: textdraw problem - Sid_Alexander - 05.05.2011

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 ********


Re: textdraw problem - the_zande - 05.05.2011

krrr come on somebody??


Re: textdraw problem - Joe Staff - 05.05.2011

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);



Re: textdraw problem - Sid_Alexander - 05.05.2011

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?


Re: textdraw problem - the_zande - 05.05.2011

ohh ty mate xDDDDD it works