13.06.2014, 00:01
first, you have to define it...
then change evething
from
into
at the OnPlayerDeath
change
into
pawn Код:
new Text:Textdraw6[MAX_PLAYERS]; // So it will make it different for every player
from
pawn Код:
Textdraw6
pawn Код:
Textdraw6[playerid] //except on the on player death
change
pawn Код:
public OnPlayerDeath(playerid, killerid, reason)
{
kills[killerid]++;
kills[playerid] = 0;
TextDrawSetString(Textdraw6, kills);
return 1;
}
pawn Код:
public OnPlayerDeath(playerid, killerid, reason)
{
new str[32];
kills[killerid]++;
kills[playerid] = 0;
format(str,sizeof(str,"%d",kills[killerid]);//to convert from integer into string
TextDrawSetString(Textdraw6[killerid], str);//to set the killer's textdraw
TextDrawShowForPlayer(killerid,Textdraw6[killerid]);//show the textdraw to killer
format(str,sizeof(str,"%d",kills[playerid]);//to convert from integer into string
TextDrawSetString(Textdraw6[playerid], str);//to set the player's textdraw
TextDrawShowForPlayer(playerid,Textdraw6[playerid]);//show the textdraw to player
return 1;
}