Strings and textdraws? - 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: Strings and textdraws? (
/showthread.php?tid=186882)
Strings and textdraws? -
admantis - 31.10.2010
Hello, I am wondering if i can place a string or a enum value in a textdraw, like this
pawn Код:
Textdraw0 = TextDrawCreate(300.000000, 412.000000, "kills: PlayerInfo[playerid[pKills]");
if somebody could help me i'd be VERY, VERY thankful.
Re: Strings and textdraws? -
ViruZZzZ_ChiLLL - 31.10.2010
new string[116];
format(string, sizeof(string), "Kills : %d", PlayerInfo[playerid][pKills]);
TextDrawSetString(TextDrawName, string);
Re : Strings and textdraws? -
admantis - 31.10.2010
will try it, brb :P
Re : Strings and textdraws? -
admantis - 31.10.2010
pawn Код:
C:\Archivos de programa\Rockstar Games\GTA San Andreas\SA-MP 0.3b\Server 0.3b\gamemodes\fierroharb.pwn(176) : error 017: undefined symbol "playerid"
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
1 Error.
pawn Код:
public OnGameModeInit()
{
// other shit
Textdraw1 = TextDrawCreate(70.000000, 431.000000, "kills: %d");
TextDrawAlignment(Textdraw1, 2);
TextDrawBackgroundColor(Textdraw1, 0);
TextDrawFont(Textdraw1, 3);
TextDrawLetterSize(Textdraw1, 0.709999, 1.500000);
TextDrawColor(Textdraw1, 2021837055);
TextDrawSetOutline(Textdraw1, 0);
TextDrawSetProportional(Textdraw1, 1);
TextDrawSetShadow(Textdraw1, 1);
TextDrawUseBox(Textdraw1, 1);
TextDrawBoxColor(Textdraw1, 255);
TextDrawTextSize(Textdraw1, 125.000000, 712.000000);
new string[116];
format(string, sizeof(string), "Kills : %d", PlayerInfo[playerid][pKills]);
TextDrawSetString(Textdraw0, string);
// more other shit
Re: Strings and textdraws? -
ViruZZzZ_ChiLLL - 31.10.2010
As you can see, the OnGameModeInit doesn't have the parameters "playerid".
You must put it on a callback that has playerid.
Re : Re: Strings and textdraws? -
admantis - 31.10.2010
Quote:
Originally Posted by ViruZZzZ_ChiLLL
As you can see, the OnGameModeInit doesn't have the parameters "playerid".
You must put it on a callback that has playerid.
|
Like OnPlayerSpawn?
Re: Strings and textdraws? -
i514x - 31.10.2010
yes, or OnPlayerConnect, and remember to always update it OnPlayerDeath
This forum requires that you wait 120 seconds between posts. Please try again in 11 seconds.
Re: Strings and textdraws? -
admantis - 31.10.2010
Quote:
Originally Posted by i514x_
yes, or OnPlayerConnect, and remember to always update it OnPlayerDeath
This forum requires that you wait 120 seconds between posts. Please try again in 11 seconds.
|
Thanks for everything if something goes wrong I will post it