SA-MP Forums Archive
target stats - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: target stats (/showthread.php?tid=330881)



targetid stats dialog - rtyd - 02.04.2012

I get no error's the problem is wen a player clicks on another player's stats it just show the player's stats instead of the targets any suggestions? would be grateful.

Код:
if(dialogid == DIALOG_SCORECLICK2){
		if(response)
		{
			switch(listitem)
			{
				case 0:
				{
                new string[193], target;
				new cash = PlayerInfo[target][pMoney];
				new job = PlayerInfo[target][pJobID];
				new level = PlayerInfo[target][pScore];
				new rank = PlayerInfo[target][pRank];
				new exp = PlayerInfo[target][pExp];
				new leader = PlayerInfo[target][pLeader];
				new member = PlayerInfo[target][pMember];
				new admin = PlayerInfo[target][pAdmin];
				new name[MAX_PLAYER_NAME];
				GetPlayerName(target, name, sizeof(name));
				format(string, sizeof(string), "{008300}Name {00008B}%s\n{008300}Money {00008B}%i\n{008300}Job {00008B}%i\n{008300}level {00008B}%i\n{008300}Exp {00008B}%i\n{008300}Leader {00008B}%i\n{008300}Member {00008B}%i\n{008300}Rank {00008B}%i\n{008300}Admin {00008B}%i",name, cash, job, level, exp, leader, member, rank, admin);
				return ShowPlayerDialog(playerid, 758, 0, ""E_RED"Stats", string, "Ok", "");
				}