Help with TextDraw
#2

You're on the right track but instead of updating the string on OnPlayerConnect, update it on OnPlayerDeath.

pawn Код:
public OnPlayerDeath(playerid, killerid, reason)
{
    SetPlayerScore(killerid,GetPlayerScore(killerid)+1);
    if(GetPlayerTeam(killerid) == 1)
    {  
        team1score++; //Sets team1score
        new newtext[41];
        GetPlayerScore(playerid, team1score);
        format(newtext, sizeof(newtext), "BLUE: %d", team1score);
        TextDrawSetString(textdrawblue, newtext);
    }
    if(GetPlayerTeam(killerid) == 2)
    {  
        team2score++; //Sets team2score
        new newtext[41];
        format(newtext, sizeof(newtext), "Red: %d", team2score);
        TextDrawSetString(textdrawred, newtext);
    }
    if(team1score == 100 || team2score == 100)  
    {
        SendRconCommand("gmx"); //Restarts Server
    }
    return 1;
}
Reply


Messages In This Thread
Help with TextDraw - by Sreadon - 09.07.2011, 22:53
Re: Help with TextDraw - by [HiC]TheKiller - 09.07.2011, 23:12
Re : Help with TextDraw - by Sreadon - 09.07.2011, 23:35

Forum Jump:


Users browsing this thread: 2 Guest(s)