Round stats text getting over-layed.
#5

Quote:
Originally Posted by Nero_3D
Посмотреть сообщение
Put it in OnPlayerDeath ...

pawn Код:
//
    if(killerid != INVALID_PLAYER_ID || killerid != playerid)
    {
        new rand = random(sizeof(SoundOnDeath)), Float:Xk, Float:Yk, Float:Zk;
        GetPlayerPos(killerid, Xk, Yk, Zk);
        PlayerPlaySound(killerid, SoundOnDeath[rand][0],Xk,Yk,Zk);
        SendDeathMessage(killerid, playerid, reason);
        SetPVarInt(killerid, "PKills", PlayerInfo[killerid][pKills]++);
        SetPVarInt(playerid, "PDeaths", PlayerInfo[playerid][pDeaths]++);
        roundstats[playerid][rKills]++;
        roundstats[playerid][rDeaths]++;
        SetPlayerHealth(killerid, 100);
        SetPlayerArmour(killerid, 100);

        new topkillermessage[128];
        new highestkillerid = GetHighestKiller();
        GetPlayerName(highestkillerid, topkillermessage, MAX_PLAYER_NAME);
        strcat(topkillermessage, " has the most amount of kills.");
        TextDrawSetString(YOUR_TEXTDRAW, topkillermessage);
    }
At YOUR_TEXTDRAW you need to use the textdraw you created in OnGameModeInit, also the OLD textdraw which you store in a variable
shouldn't I use ?
Код:
new LASTMESSAGE[100];
strcat(LASTMESSAGE,topkillermessage, " has the most amount of kills.");
TextDrawSetString(LASTMESSAGE, topkillermessage);
because there isn't any new textdraw that I created in OnGameModeInit callback and it would be out of bounds since it's in another callback (OnGameModeInit and OnPlayerDeath).

What do you think?





EDIT: I'm going to use Timers and public functions, see where that leads me. I will update you =)
Reply


Messages In This Thread
Round stats text getting over-layed. - by Lofti - 23.07.2015, 21:32
AW: Round stats text getting over-layed. - by Nero_3D - 23.07.2015, 22:56
Re: AW: Round stats text getting over-layed. - by Lofti - 24.07.2015, 02:14
AW: Round stats text getting over-layed. - by Nero_3D - 24.07.2015, 11:24
Re: AW: Round stats text getting over-layed. - by Lofti - 24.07.2015, 23:37
AW: Round stats text getting over-layed. - by Nero_3D - 25.07.2015, 00:53
Re: AW: Round stats text getting over-layed. - by Lofti - 25.07.2015, 01:26
AW: Re: AW: Round stats text getting over-layed. - by Nero_3D - 25.07.2015, 10:13
Re: AW: Re: AW: Round stats text getting over-layed. - by Lofti - 26.07.2015, 23:24

Forum Jump:


Users browsing this thread: 4 Guest(s)