14.03.2015, 10:35
instead of using it on OnPlayerUpdate try it on this:-
pawn Код:
new UpdatingTimer[MAX_PLAYERS];
public OnPlayerConnect(playerid)
{
UpdatingTimer[playerid] = SetTimerEx("UpdatePlayer", 1000, true, "i", playerid);
return 1;
}
public OnPlayerDisconnect(playerid)
{
KillTimer(UpdatingTimer[playerid]);
return 1;
}
forward UpdatePlayer(playerid);
public UpdatePlayer(playerid);
{
new string[128], playerid, Float:ratio = floatdiv(PlayerInfo[playerid][Kills], PlayerInfo[playerid][Deaths]);
format(string, sizeof(string), "~y~Score: ~w~%d~n~~y~Money: ~w~$%d~n~~y~Kills: ~w~%d~n~~y~Deaths: ~w~%d~n~~y~K/D Ratio: ~w~%0.2f", GetPlayerScore(playerid), GetPlayerMoney(playerid), PlayerInfo[playerid][Kills], PlayerInfo[playerid][Deaths], ratio);
TextDrawSetString(Textdraw[playerid], string);
TextDrawShowForPlayer(playerid, Textdraw[playerid]);
return 1;
}