30.01.2018, 15:56
Debug your code, print your results.
PHP код:
PlayerKills[killerid]++; // Addes a score to player killed.
printf("Kills: %i", PlayerKills[killerid]);
PlayerDeaths[playerid]++; // Addes a score to player death.
printf("Deaths: %i", PlayerDeaths[playerid]);
new iString[100]; // string cells.
new ratio = PlayerKills[playerid] / PlayerDeaths[playerid];
printf("Ratio: %i", ratio);
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);