SA-MP Forums Archive
Textdraw help - 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)
+--- Thread: Textdraw help (/showthread.php?tid=646852)



Textdraw help - KyNe - 25.12.2017

Код:
#include <a_samp>

new Text:website;
new Text:WXTDM;
new Text:Version;

public OnFilterScriptInit()
{

	// Textdraw stuff
	website = TextDrawCreate(489.000000, 428.000000, "www.wx-play.cf");
	TextDrawBackgroundColor(website, 255);
	TextDrawFont(website, 1);
	TextDrawLetterSize(website, 0.500000, 2.000000);
	TextDrawColor(website, -16776961);
	TextDrawSetOutline(website, 0);
	TextDrawSetProportional(website, 1);
	TextDrawSetShadow(website, 1);

	WXTDM = TextDrawCreate(499.000000, 96.000000, "WXTDM");
	TextDrawBackgroundColor(WXTDM, 65535);
	TextDrawFont(WXTDM, 1);
	TextDrawLetterSize(WXTDM, 0.500000, 2.000000);
	TextDrawColor(WXTDM, 16711935);
	TextDrawSetOutline(WXTDM, 1);
	TextDrawSetProportional(WXTDM, 1);

	Version = TextDrawCreate(73.000000, 327.000000, "v10");
	TextDrawBackgroundColor(Version, 255);
	TextDrawFont(Version, 0);
	TextDrawLetterSize(Version, 0.500000, 2.000000);
	TextDrawColor(Version, 65535);
	TextDrawSetOutline(Version, 0);
	TextDrawSetProportional(Version, 1);
	TextDrawSetShadow(Version, 1);

	for(new i; i < MAX_PLAYERS; i ++)
	{
		if(IsPlayerConnected(i))
		{
			TextDrawShowForPlayer(i, website);
			TextDrawShowForPlayer(i, WXTDM);
			TextDrawShowForPlayer(i, Version);
		}
	}
	return 1;
}


public OnPlayerConnect(playerid)
{
	TextDrawShowForPlayer(playerid, website);
	TextDrawShowForPlayer(playerid, WXTDM);
	TextDrawShowForPlayer(playerid, Version);
	return 1;
}
my textdraw disappear after few second ( after join server )


Re: Textdraw help - DonaldDuck - 25.12.2017

Change OnPlayerConnect to OnPlayerSpawn.


Re: Textdraw help - RogueDrifter - 25.12.2017

Quote:
Originally Posted by DonaldDuck
Посмотреть сообщение
Change OnPlayerConnect to OnPlayerSpawn.
Why would that matter? there is no samp rule forbidding showing textdraws on connect which im using so that's not it,
@OP: show your OnPlayerSpawn/RequestSpawn/RequestClass