help, textdraws
#1

Код:
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.
Reply
#2

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);
Reply
#3

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



in this:

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

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);
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)