28.07.2016, 12:00
i have a bug here that show my stats and onther player stats.
And on player update
Please Help
PHP код:
public OnPlayerSpawn(playerid)
{
new string[198+100];
format(string,sizeof(string),"Kills: %d - Deaths: %d - Score: %d - Cash: %d - Level: %d - Cookies: %d - Ping: %d",pInfo[playerid][Kills],pInfo[playerid][Deaths],GetPlayerScore(playerid),GetPlayerMoney(playerid),pInfo[playerid][pLevel],pPinfo[playerid][Cookies],GetPlayerPing(playerid));
TextDrawSetString(TDStats[0], string);
TextDrawShowForPlayer(playerid, TDStats[0]);
return 1;
}
PHP код:
public OnPlayerUpdate(playerid)
{
#if PauseDetectSystem == true
pTick[playerid] = GetTickCount();
#endif
#if MoveSystem == true
if(pInfo[playerid][Move] == 1)
GetPlayerHoldingKey(playerid);
#endif
new string[198+100];
format(string,sizeof(string),"Kills: %d - Deaths: %d - Score: %d - Cash: %d - Level: %d - Cookies: %d - Ping: %d",pInfo[playerid][Kills],pInfo[playerid][Deaths],GetPlayerScore(playerid),GetPlayerMoney(playerid),pInfo[playerid][pLevel],pPinfo[playerid][Cookies],GetPlayerPing(playerid));
TextDrawSetString(TDStats[0], string);
TextDrawShowForPlayer(playerid, TDStats[0]);
return 1;
}