SA-MP Forums Archive
Textdraw | Web Hosting - 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 | Web Hosting (/showthread.php?tid=275457)



Textdraw | Web Hosting - Urefeu - 09.08.2011

Hello.

I use this code that is supposed to display textdraw to all players

Код:
for(new i = 0; i < MAX_PLAYERS; i++) {
	    if(IsPlayerConnected(i)) {
			text_grade[i] = TextDrawCreate(503.000000, 127.000000, "Grade : Recrue (1)");
			TextDrawFont(text_grade[i], 0);
			TextDrawLetterSize(text_grade[i], 1, 7);
			TextDrawColor(text_grade[i], 0x6060FDFF);
			TextDrawSetProportional(text_grade[i], 1);
			TextDrawSetShadow(text_grade[i], 1);
			TextDrawShowForPlayer(i, text_grade[i]);
		}
	}
It is in the OnFilterScriptInit.

I declared Text:text_grade[MAX_PLAYERS] at the top.

Problem: Nothing appears (I have no error).

PS: I also tried to put in the TextDrawShowForPlayer OnPlayerSpawn, without success.

--------------------------------------------------------

I am also looking for accommodation offering 50 to 100 slots, free or inexpensive for 1 month and then pay (by then my shop will be running).

Thank you!


Re: Textdraw | Web Hosting - Darnell - 09.08.2011

Spaces, braces, try sorting it out.
----------------------------------------------------
I'm intersted in a server with 50~100 slots, roleplay one.


Re: Textdraw | Web Hosting - rooney12 - 09.08.2011

Use Double-o-text Textdraws. Its much easier.


Re: Textdraw | Web Hosting - Jakku - 09.08.2011

If you are using IsPlayerConnected in OnFilterScriptInit, no textdraws will be created because there are no players online.

Try this instead:

pawn Код:
public OnPlayerConnect(playerid)
{
text_grade[playerid] = TextDrawCreate(503.000000, 127.000000, "Grade : Recrue (1)");
TextDrawFont(text_grade[playerid], 0);
TextDrawLetterSize(text_grade[playerid], 1, 7);
TextDrawColor(text_grade[playerid], 0x6060FDFF);
TextDrawSetProportional(text_grade[playerid], 1);
TextDrawSetShadow(text_grade[playerid], 1);
TextDrawShowForPlayer(playeridi, text_grade[playerid]);
}

public OnPlayerDisconnect(playerid)
{
TextDrawDestroy(text_grade[playerid]);
}
Sorry for bad indentation