Help me please! - 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)
+--- Thread: Help me please! (
/showthread.php?tid=590345)
Help me please! -
ironmen - 28.09.2015
I've made a textdraw and everything is fine !
But...
This code:
Код:
PlayerTextDrawSetString(playerid, XPS, newxp);
Shows this warning:
Код:
warning 213: tag mismatch
What is the problem ??
Thanks !!
Ironmen
EDIT:
TextDraw create:
Код:
XPS = TextDrawCreate(310, 432, "Xp: ");
Update:
Код:
new newxp[246];
format(newxp, sizeof(newxp), "Xp: %d", XP[playerid]);
PlayerTextDrawSetString(playerid, XPS, newxp);
Re: Help me please! -
IceBilizard - 28.09.2015
show the textdraw creating code and updating the textdraw code too
Re: Help me please! -
nezo2001 - 28.09.2015
Show XPS and newxp
Re: Help me please! -
karemmahmed22 - 28.09.2015
PHP код:
new Text:XPS[246];
^ Replace with the other XPS variable.
Re: Help me please! -
ironmen - 28.09.2015
Quote:
Originally Posted by karemmahmed22
PHP код:
new Text:XPS[246];
^ Replace with the other XPS variable.
|
After I did this it added more Tag MisMatches !
Re: Help me please! -
IceBilizard - 28.09.2015
First of all learn how to create textdraw for players with CreatePlayerTextDraw
https://sampwiki.blast.hk/wiki/CreatePlayerTextDraw
EDIT:
try this
1st Step:
pawn Код:
new PlayerText:XPS[MAX_PLAYERS]; //At top of script
2nd Step:
pawn Код:
public OnPlayerConnect(playerid)
{
XPS[playerid] = CreatePlayerTextDraw(playerid, 310, 432, " ");
PlayerTextDrawShow(playerid, XPS[playerid]);
return 1;
}
Update Step:
pawn Код:
new newxp[246];
format(newxp, sizeof(newxp), "Xp: %d", XP[playerid]);
PlayerTextDrawSetString(playerid, XPS[playerid], newxp);
Re: Help me please! -
ironmen - 28.09.2015
Quote:
Originally Posted by IceBilizard
First of all learn how to create textdraw for players with CreatePlayerTextDraw
https://sampwiki.blast.hk/wiki/CreatePlayerTextDraw
EDIT:
try this
1st Step:
pawn Код:
new PlayerText:XPS[MAX_PLAYERS]; //At top of script
2nd Step:
pawn Код:
public OnPlayerConnect(playerid) { XPS[playerid] = CreatePlayerTextDraw(playerid, 310, 432, " "); PlayerTextDrawShow(playerid, XPS[playerid]); return 1; }
Update Step:
pawn Код:
new newxp[246]; format(newxp, sizeof(newxp), "Xp: %d", XP[playerid]); PlayerTextDrawSetString(playerid, XPS[playerid], newxp);
|
BUT..
now it's not showing for players!!!!!!!!!!!!!
IronMen
Re: Help me please! -
IceBilizard - 28.09.2015
then use PlayerTextDrawShow(playerid, XPS[playerid]); at OnPlayerSpawn
Re: Help me please! -
PrO.GameR - 28.09.2015
my best guess is that XPS is not a "PlayerText" so first define it as PlayerText:XPS
(and you probably should add a [MAX_PLAYERS] to it so every XPS is unique for players)
and whenever you use it, add PlayerText: before it, your tag mismatches will be fixed I guess.
Re: Help me please! -
ironmen - 29.09.2015
Quote:
Originally Posted by PrO.GameR
my best guess is that XPS is not a "PlayerText" so first define it as PlayerText:XPS
(and you probably should add a [MAX_PLAYERS] to it so every XPS is unique for players)
and whenever you use it, add PlayerText: before it, your tag mismatches will be fixed I guess.
|
Nothing worked!!!
Help me!
Thanks!
IronMen!