OnPlayerClickPlayer
#1

Hello Guys, my Problem is that when i click every Player it show me just the Stats from ID 0. Know everyone why?

Код:
public OnPlayerClickPlayer(playerid, clickedplayerid, source)
{
    new targetid;
new string[800];
			new Float:kd = floatdiv(pInfo[targetid][pKills], pInfo[targetid][pDeaths]);
			new Float:wins = floatdiv(pInfo[targetid][pMapsPlayed], pInfo[targetid][pEvac]);
			format(string,sizeof(string),"	{37DB45}Viewing Stats from: %s{FFFFFF}	\nCoins %i\nXP %i\nKills %i\nDeaths %i\nMaps Played %i\nRank %i\nEvac Points %i\nAdmin Level %s\nVip Level %i\n\
			Played %d Hours || %d Minutes || %d Seconds\nK:D RATIO: %0.2f\nWin RATIO: %0.2f",PlayerName(targetid),pInfo[targetid][pCoins],pInfo[targetid][pXP],pInfo[targetid][pKills],pInfo[targetid][pDeaths],pInfo[targetid][pMapsPlayed],
			pInfo[playerid][pRank],pInfo[targetid][pEvac],GetAdminName(targetid),pInfo[targetid][pVipLevel],pInfo[targetid][pHour],pInfo[targetid][pMin],pInfo[targetid][pSec],kd,wins);

			ShowPlayerDialog(playerid,1888,DIALOG_STYLE_MSGBOX,"Viewing Stats!",string,"Close","");
	return 1;
}
Reply
#2

Replace targetid with clickedplayerid
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)