08.11.2011, 18:46
OKay so heres my script for the K/D ratio. and it doesnt seem to be working u might wanna take a look
the KD doesnt increase at all.. its always 0.00
pawn Код:
new playerkill[256];
new playerdeath[256];
new Float:KD;
pawn Код:
OnPlayerConnect(playerid)
{
playerkill[playerid] = 0;
playerdeath[playerid] = 0;
}
pawn Код:
public OnPlayerDeath(playerid, killerid, reason)
{
SendDeathMessage(killerid, playerid, reason);
playerkill[killerid]++;
playerdeath[playerid]++;
KD = floatdiv(playerkill[killerid],playerdeath[killerid]);
new string[32];
format(string,32, "%.2f",KD);
TextDrawSetString(Textdraw3[killerid],string);
KD = floatdiv(playerkill[playerid],playerdeath[playerid]);
format(string,32, "%.2f",KD);
TextDrawSetString(Textdraw3[killerid],string);
return 1;
}