Checkpoint/pickup for Textdraw change - 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: Checkpoint/pickup for Textdraw change (
/showthread.php?tid=72135)
Checkpoint/pickup for Textdraw change -
morris91 - 06.04.2009
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.
Re: Checkpoint/pickup for Textdraw change -
Rks25 - 06.04.2009
Search for TextDrawSetString.
Re: Checkpoint/pickup for Textdraw change -
GTA_Rules - 06.04.2009
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.
Re: Checkpoint/pickup for Textdraw change -
morris91 - 14.04.2009
Thankyou...
It did'nt work at first but i got it working fine now. Thank you very much