Text Draw String - 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: Text Draw String (
/showthread.php?tid=176399)
Text Draw String -
Kitten - 13.09.2010
Solved
Re: Text Draw String -
Memoryz - 13.09.2010
Try creating a textdraw for each specific player.
pawn Код:
new Text:xpsystem[MAX_PLAYERS];
pawn Код:
if(GetPlayerScore(killerid) > 5)
{
TextDrawHideForPlayer(killerid,xpsystem[killerid]);
TextDrawShowForPlayer(killerid,xpsystem[killerid]);
TextDrawSetString(xpsystem[killerid],"XP: 5/50");
GivePlayerMoney(killerid,10000);
GameTextForPlayer(killerid,"~y~ PROMOTED ~w~ 5 XP",6000,3);
}
Re: Text Draw String -
CuervO - 13.09.2010
wouldn't it be:
pawn Код:
new textdraw4[MAX_PLAYERS];
also you don't have to hide it and show it to make the textdrawsetstring take effect.
Also i would suggest something different so you don't have to make 99999999 Checks.
pawn Код:
public OnPlayerDeath(playerid, killerid, reason)
{
new msg[64];
new score = GetPlayerScore(killerid);
SetPlayerScore(killerid, score+1);
format(msg, sizeof(msg),"XP: %d/50",score+1);
TextDrawSetString(textdraw4[killerid],msg);
GivePlayerMoney(killerid, 2000);
GameTextForPlayer(killerid, "~p~1+ ~w~Experience! ~n~~g~+$2000!!",6000,4);
return 1;
}
Re: Text Draw String -
Kitten - 13.09.2010
Solved