29.01.2018, 17:46
I did that on OnPlayerDeath
https://i.imgur.com/ishmaxh.png
Код:
// Kills Deaths & Ratio TD. PlayerKills[killerid]++; // Addes a score to player killed. PlayerDeaths[playerid]++; // Addes a score to player death. new iString[100]; // string cells. new Float:ratio = PlayerKills[playerid]/PlayerDeaths[playerid]; format(iString, sizeof iString, "Kills: %i", PlayerKills[killerid]); // Here we put the amout of Killed players. TextDrawSetString(KILLS[killerid], iString); format(iString, sizeof iString, "Deaths: %i", PlayerDeaths[playerid]); // Here we put the amout of Deaths. TextDrawSetString(DEATHS[playerid], iString); format( iString, sizeof( iString ), "Ratio: %.2f", ratio); TextDrawSetString(RATIO[playerid], iString);