#1

heey guys

I have made different Dm maps. But how can i make a count how much players are on that map. I want to make it with Textdraw. Pls help

Thanks Admigo
Reply
#2

pawn Код:
new
    iPlayersInDM;

// When they enter/join the map:
++ iPlayersInDM;

// When they leave/exit the map:
-- iPlayersInDM;

// When you show the textdraw:
new
    iStr[15];

format(iStr, sizeof(iStr), "Players: %i", iPlayersInDM);
TextDrawSetString(TD, iStr);

TextDrawShowForAll(TD, iStr);
If that's not what you mean, please elaborate a little bit more.
Reply
#3

What i do with TD because i get undifined TD?
Reply
#4

Can you explain it better because i get error:Undefined TD
Reply
#5

TD = Your textdraw varible., also remember not to bump your topic until after 12 hours have passed.
Reply
#6

But why the text dont appear in server?

Код:
new iPlayersInDM;
new Text:TD;

	new iStr[15];
	format(iStr, sizeof(iStr), "Players: %i", iPlayersInDM);
	TextDrawShowForAll(TD);
	TD=TextDrawCreate(420,350,iStr);
	TextDrawSetString(TD, iStr);
	TextDrawShowForAll(TD);
Reply
#7

Why my text dont appear?This is my code:
Код:
//top of script
new iPlayersInDM;
new Text:TD;

//OnGamemodeInit
new iStr[15];
format(iStr, sizeof(iStr), "Players: %i", iPlayersInDM);
TextDrawShowForAll(TD);
TD=TextDrawCreate(420,350,iStr);
TextDrawSetString(TD, iStr);
TextDrawShowForAll(TD);

//Command
iPlayersInDM ++;

//OnPlayerDead
iPlayersInDM --;
Any help pls"?
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)