SA-MP Forums Archive
help, 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: help, textdraws (/showthread.php?tid=172360)



help, textdraws - jaksimaksi - 29.08.2010

Код:
public OnPlayerSpawn(playerid)
{
TextDrawShowForPlayer(playerid,Textdraw0);
Код:
public OnPlayerDeath(playerid, killerid, reason)
{
new string[256];
format(string, sizeof(string), "Level: %d/17",WeaponLevel[killerid]);
TextDrawSetString(Textdraw0, string);
why when any of players gets a new level, that player level is showing for all? fix the script please.


Re: help, textdraws - Mauzen - 29.08.2010

You have to create a TextDraw for every player. Textdraw0 is shown to every player, and if its text changes for one, it changes for everyone.
Make it an array.

TextDrawShowForPlayer(playerid,Textdraw0[playerid]);

TextDrawSetString(Textdraw0[killerid], string);


Re: help, textdraws - jaksimaksi - 30.08.2010

invalid subscript (not an array or too many subscripts): "Textdraw0"
error 001: expected token: ";", but found "]"



in this:

Код:
TextDrawShowForPlayer(playerid,Textdraw0[playerid]);



Re: help, textdraws - Voldemort - 30.08.2010

On top

new Text:LevelTD[MAX_PLAYERS];

On spawn

TextDrawShowForPlayer(playerid,LevelTD[playerid]);

on death

new string[16];
format(string, sizeof(string), "Level: %d/17",WeaponLevel[killerid]);
TextDrawSetString(LevelTD[playerid], string);


And for who you want that he get weap skill, killerid or playerid ?

if killer than

TextDrawSetString(LevelTD[killerid], string);