What is that ? Textdraws
#8

first, you have to define it...
pawn Код:
new Text:Textdraw6[MAX_PLAYERS]; // So it will make it different for every player
then change evething
from
pawn Код:
Textdraw6
into
pawn Код:
Textdraw6[playerid] //except on the on player death
at the OnPlayerDeath

change
pawn Код:
public OnPlayerDeath(playerid, killerid, reason)
{
    kills[killerid]++;
    kills[playerid] = 0;
    TextDrawSetString(Textdraw6, kills);
    return 1;
}
into
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;
}
Reply


Messages In This Thread
What is that ? Textdraws - by Le3aT - 12.06.2014, 21:02
Re: What is that ? Textdraws - by Abagail - 12.06.2014, 21:53
Re: What is that ? Textdraws - by Le3aT - 12.06.2014, 21:55
Re: What is that ? Textdraws - by AiRaLoKa - 12.06.2014, 21:59
Re: What is that ? Textdraws - by Le3aT - 12.06.2014, 22:06
Re: What is that ? Textdraws - by Le3aT - 12.06.2014, 23:32
Re: What is that ? Textdraws - by SilentSoul - 12.06.2014, 23:54
Re: What is that ? Textdraws - by AiRaLoKa - 13.06.2014, 00:01
Re: What is that ? Textdraws - by Le3aT - 13.06.2014, 00:54
Re: What is that ? Textdraws - by AiRaLoKa - 13.06.2014, 01:06

Forum Jump:


Users browsing this thread: 1 Guest(s)