15.01.2016, 11:10
Hello Guys I Want This Show When I Clicked Player But It Not Working Pls Help Me
When I Clicked Player Nothing Happen I Put This On My Admin FS How To Fix It?
PHP код:
public ShowStatistics(playerid, playerid2)
{
if(playerid2 == INVALID_PLAYER_ID) return 1;
new string[1000], string2[556], h, m, s;
TotalGameTime(playerid2, h, m, s);
format(string2, 556, "{%06x}%s[%d] Stats!\n\n", (GetPlayerColor(playerid2) >>> 8), IsPlayerName(playerid2), playerid2);
strcat(string, string2);
strcat(string, ""COL_RED"");
format(string2, 556, ""COL_RED"Admin: "COL_YELLOW"%d\n", PInfo[playerid2][Admin]); strcat(string, string2);
format(string2, 556, ""COL_RED"Online Time: "COL_YELLOW"%d:%d:%d\n", h,m,s); strcat(string, string2);
format(string2, 556, ""COL_RED"VIP: "COL_YELLOW"%d\n", PInfo[playerid2][VIP]); strcat(string, string2);
format(string2, 556, ""COL_RED"Score: "COL_YELLOW"%d\n", GetPlayerScore(playerid2)); strcat(string, string2);
format(string2, 556, ""COL_RED"Cash: "COL_YELLOW"$%d\n", PInfo[playerid2][Money]); strcat(string, string2);
format(string2, 556, ""COL_RED"Kills: "COL_YELLOW"%d\n", PInfo[playerid2][Kill]); strcat(string, string2);
format(string2, 556, ""COL_RED"Deaths: "COL_YELLOW"%d\n", PInfo[playerid2][Death]); strcat(string, string2);
new Float:ratio = (float(PInfo[playerid2][Kill])/float(PInfo[playerid2][Death]));
format(string2, 556, ""COL_RED"[K/D]: "COL_YELLOW"%.3f\n", ratio); strcat(string, string2);
format(string2, 556, "%s[%d] Stats!", GetPlayerColor(playerid2) >>> 8, IsPlayerName(playerid2),playerid2);
return 1;
}
public OnPlayerClickPlayer(playerid, clickedplayerid, source)
{
ShowStatistics(playerid, clickedplayerid);
return 1;
}