[URGENT]Help me guys!
#2

If I understand your problem right, try these things:

pawn Код:
public OnPlayerDeath(playerid, killerid, reason)
{
new tmp[256];
        new tmp2[256];
if(gTeam[playerid] == TEAM_RED) { RedCount--;
        format(tmp, sizeof(tmp), "~r~%d", RedCount);
        TextDrawSetString(Text:Textdraw13, tmp);
}
    if(gTeam[playerid] == TEAM_GREEN)  { GreenCount--;
       format(tmp2, sizeof(tmp2), "~g~%d", GreenCount);
       TextDrawSetString(Text:Textdraw14, tmp2);
}
if(killerid != INVALID_PLAYER_ID) {
    TogglePlayerSpectating(playerid, 1);
    PlayerSpectatePlayer(playerid, killerid);
   
    PlayerInfo[playerid][Latezor] = 1;
}
       return 1;
}
Fixed your bug of spectating invalid player id, and I guess the falling thing should work. If it doesn't, after closing bracket of if(killerid != INVALID_PLAYER_ID) add else { code of count-- and textdrawstring.


EDIT: Also, if you want to spectate random player when player died himself, use a loop and then spectateplayer
Reply


Messages In This Thread
[URGENT]Help me guys! - by Zhoom - 21.01.2012, 07:57
Re: [URGENT]Help me guys! - by wildcookie007 - 21.01.2012, 08:08
Re: [URGENT]Help me guys! - by Zhoom - 21.01.2012, 08:21
Re: [URGENT]Help me guys! - by Universal - 21.01.2012, 08:28
Re: [URGENT]Help me guys! - by Zhoom - 21.01.2012, 08:49

Forum Jump:


Users browsing this thread: 1 Guest(s)