Script Help Please
#1

How can i script a text draw that shows the remainding players on each team? I tried to create a text draw but not sure how to connect it with the remaining players
Reply
#2

Loop through the remaining players, store the sum in a variable and throw that one into your textdraw.
Reply
#3

could u post an example please
Reply
#4

Quote:
Originally Posted by bennyisme
could u post an example please
for i > 0 MAX_PLAYER_NAME
{
textdrawcreate.bitches("Team 1: %S", i);
}
Reply
#5

error 010: invalid function or declaration
get an error on first line
Reply
#6

.. Zamaroht's editor doesnt work with this...
and sorry i fail but can you please help me i get errors
Reply
#7

Код:
error 001: expected token: "(", but found ">"
error 001: expected token: ";", but found "-integer value-"
error 001: expected token: ";", but found ">"
error 010: invalid function or declaration
warning 219: local variable "i" shadows a variable at a preceding level
its like this rite?
Код:
forward i > 0 MAX_PLAYER_NAME

public OnGameModeInit()
{
    Bitch = TextDrawCreate(x,y, "Team1: %S", i);
}

public OnPlayerSpawn()
{
    TextDrawShowForPlayer(playerid, Bitch)
}
Reply
#8

Quote:
Originally Posted by bennyisme
Код:
error 001: expected token: "(", but found ">"
error 001: expected token: ";", but found "-integer value-"
error 001: expected token: ";", but found ">"
error 010: invalid function or declaration
warning 219: local variable "i" shadows a variable at a preceding level
its like this rite?
Код:
forward i > 0 MAX_PLAYER_NAME

public OnGameModeInit()
{
    Bitch = TextDrawCreate(x,y, "Team1: %S", i);
}

public OnPlayerSpawn()
{
    TextDrawShowForPlayer(playerid, Bitch)
}
LOL, where you get that from...

pawn Код:
//Top of Script
new Text:Bitch;

public OnGameModeInit()
{
    for(new i=0; i<MAX_PLAYERS; i++)
    {
      new str[75];
      format(str, sizeof(str), "Team1: %d", i);
      Bitch = TextDrawCreate(0.0, 0.0, str);
      break;
    }
    return 1;
}

public OnPlayerSpawn(playerid)
{
    TextDrawShowForPlayer(playerid, Bitch);
    return 1;
}
Reply
#9

the textdraw doesnt go up? I was on but the textdraw said
team1 : 0
Reply
#10

Try this.

Код:
//Top of Script
new Text:Bitch;
new count;

public OnGameModeInit()
{
	for(new i=0; i<MAX_PLAYERS; i++)
	{
	  new str[75];
	  format(str, sizeof(str), "Team1: %d", i);
	  Bitch = TextDrawCreate(0.0, 0.0, str);
	  break;
	}
	return 1;
}

public OnPlayerSpawn(playerid)
{
    count++;
    new str[30];
	TextDrawShowForPlayer(playerid, Bitch);
    format(Str,sizeof(Str),"Team1: %d",Bitch);
    TextDrawSetString(Bitch,Str);
	return 1;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)