[Problem] Textdraw -
Loox - 20.12.2012
Solved.
Re: [Problem] Textdraw -
Roel - 20.12.2012
Show your onplayerdeath, be sure you add ++ to Information[playerid][pKills] or Information[playerid][pDeaths].
Also you should put this onplayerupdate code inside your onplayerdeath, because it's not needed to update this in about each 500 ms...
Respuesta: [Problem] Textdraw -
Loox - 20.12.2012
Yes, i have this code in OnPlayerDeath:
Код:
if(killerid == INVALID_PLAYER_ID)
{
Information[playerid][pDeaths]++;
SetPlayerScore(killerid, GetPlayerScore(killerid)-1);
}
else
{
Information[killerid][pKills]++;
SetPlayerScore(killerid,GetPlayerScore(killerid)+1);
}
Re: [Problem] Textdraw -
LarzI - 20.12.2012
Try hiding then re-showing it. Some textdraws bug like this and won't update unless they're hidden and re-shown.
pawn Код:
TextDrawHideForPlayer( playerid, textdrawID );
TextDrawShowForPlayer( playerid, textdrawID );
Obviously replace textdrawID with the actual IDs, and be sure to do this for every textdraw that doesn't work after setting its string.
Respuesta: [Problem] Textdraw -
Loox - 20.12.2012
LarzI, i do this and textdraws don't updated..
Re: Respuesta: [Problem] Textdraw -
LarzI - 20.12.2012
Quote:
Originally Posted by Loox
LarzI, i do this and textdraws don't updated..
|
Then I'm not really sure why it doesn't work, although I don't think it's too smart to put this in OnPlayerUpdate. Why don't you just change it when it actually happens - OnPlayerDeath - instead of updating it all the time?
Respuesta: [Problem] Textdraw -
Loox - 20.12.2012
do you have me any example to do the code with this form?
Re: [Problem] Textdraw -
LarzI - 20.12.2012
Well
pawn Код:
Information[playerid][pDeaths]++;
if(killerid == INVALID_PLAYER_ID)
{
SetPlayerScore(killerid, GetPlayerScore(killerid)-1);
}
else
{
Information[killerid][pKills]++;
SetPlayerScore(killerid,GetPlayerScore(killerid)+1);
}
format(String, sizeof(String), "KILLS: ~y~%d", Information[killerid][pKills]);
TextDrawSetString(Killer[killerid], String);
format(String, sizeof(String), "DEATHS: ~y~%d", Information[playerid][pDeaths]);
TextDrawSetString(Dead[playerid], String);
/* format(String, sizeof(String), "~y~%s", NombreJugador(playerid));
TextDrawSetString(Nombre[playerid], String); */ // I'm unsure what this is, that's why I just commented it
/* format(String, sizeof(String), "RANK: ~y~%s", rango);
TextDrawSetString(Ranking[playerid], String); */ //show us rango before you uncomment this please
format(String, sizeof(String), "KILL RATIO: ~y~%0.2f", Float:Information[playerid][pKills]/Float:Information[playerid][pDeaths]);
TextDrawSetString(Ratio[playerid], String);
format(String, sizeof(String), "KILL RATIO: ~y~%0.2f", Float:Information[killerid][pKills]/Float:Information[killerid][pDeaths]);
TextDrawSetString(Ratio[killerid], String);
Respuesta: [Problem] Textdraw -
Loox - 20.12.2012
I do with the form you give me, and textdraws not updated xd.