Nem tudom, hogy PVar-ral vagy pInfo -val csináltad, én PVarral megírom neked, majd írd át az alábbi részt ha nem PVaros! A kódot majd a timerhez tedd legelõlre.
Tehát ezt írd át ha nem PVar: GetPVarInt(playerid, \"Deaths\")
És itt a kód:
if(GetPVarInt(playerid, \"Deaths\") == 0) Ratio = 0;
for(new i; i < GetMaxPlayers(); i++)
{
SetTimerEx(\"textdrawratio\", 1000, true, \"i\", i);
ratio = TextDrawCreate(8.000000, 430.000000, \"\");
TextDrawBackgroundColor(ratio, -1);
TextDrawFont(ratio, 1);
TextDrawLetterSize(ratio, 0.280000, 1.200000);
TextDrawColor(ratio, 65535);
TextDrawSetOutline(ratio, 0);
TextDrawSetProportional(ratio, 1);
TextDrawSetShadow(ratio, 0);
}
public textdrawratio(playerid)
{
new tstring[256];
new Float:ratdio=floatdiv(kills[playerid],deaths[playerid]);
format(tstring,sizeof(tstring),\"Oles: %d Halal: %d Ratio: %.2f\",kills[playerid],deaths[playerid],ratdio);
TextDrawSetString(ratio[playerid],tstring);
return 1;
}
public textdrawratio(playerid)
{
new tstring[256];
new Float:ratdio=floatdiv(kills[playerid],deaths[playerid]);
if(deaths[playerid] == 0) ratdio = 0;
format(tstring,sizeof(tstring),\"Oles: %d Halal: %d Ratio: %.2f\",kills[playerid],deaths[playerid],ratdio);
TextDrawSetString(ratio[playerid],tstring);
return 1;
}