14.06.2016, 15:55
Thanks guys:
Here my onplayerupdate:
Here my onplayerupdate:
PHP код:
public OnPlayerUpdate(playerid)
{
new str[256];
format(str,sizeof(str),"~r~Kills: ~w~%d ~g~Deaths: ~w~%d",User[playerid][kills],User[playerid][deaths], User[playerid][score]);
TextDrawSetString(Text:Stats[playerid],str);
new string[256];
format(string,sizeof(string),"~g~Score: ~w~%d ~g~Class: ~w~%d",User[playerid][score],gPlayerClass[playerid]);
TextDrawSetString(Text:Stats2[playerid],string);
new st[256];
new Float:ratio;
if(User[playerid][deaths] <= 0) ratio = 0.0;
else ratio = floatdiv(User[playerid][kills], User[playerid][deaths]);
format(st,sizeof(st),"~g~K/D: ~w~%0.2f",ratio);
TextDrawSetString(Text:Stats3[playerid],st);
GetPlayerRank(playerid);
return 1;
}