Textdraw | Web Hosting
#1

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!
Reply
#2

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

Use Double-o-text Textdraws. Its much easier.
Reply
#4

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
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)