Checkpoint/pickup for Textdraw change
#1

Im trying to make a event and when a player enters a checkpoint the textdraw on screen changed with the player name.


So like it says.

Pill: Not Found

And when a player finds it, it turns to.

Pill: Steven

How could i make that work when a player enters a checkpoint or a pickup.
Reply
#2

Search for TextDrawSetString.
Reply
#3

Here

Код:
// On top:

new Text:Pill;

// In OnPlayerSpawn or OnPlayerConnect:

TextDrawShowForAll(Pill);

// In OnGameModeInit

    {
		Pill = TextDrawCreate(430.000000,426.000000,"Pill: Not found");
		TextDrawUseBox(Pill,1);
		TextDrawBoxColor(Pill,0x000000ff);
		TextDrawTextSize(Pill,630.000000,-63.000000);
		TextDrawAlignment(Pill,0);
		TextDrawBackgroundColor(Pill,0x000000ff);
		TextDrawFont(Pill,3);
		TextDrawLetterSize(Pill,0.499999,1.600000);
		TextDrawColor(Pill,0xffffffff);
		TextDrawSetOutline(Pill,1);
		TextDrawSetProportional(Pill,1);
		TextDrawSetShadow(Pill,1);
		}

    return 1;
}


public OnPlayerEnterCheckpoint(playerid)
{
	new playername[MAX_PLAYER_NAME];
	new string[256];
	GetPlayerName(playerid, playername, sizeof(playername));
	format(string, sizeof(string), "Pill: %s", playername);
	TextDrawSetString(Pill, string);
	TextDrawShowForAll(Pill);

	}
  return 1;
}
Untested though.
Reply
#4

Thankyou...

It did'nt work at first but i got it working fine now. Thank you very much
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)