Textdraw help
#1

Код:
#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 )
Reply
#2

Change OnPlayerConnect to OnPlayerSpawn.
Reply
#3

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
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)