20.12.2015, 18:16
i have this code but when i clicked on my name show me name:aref id:0 team: score:0 kills:0 deaths:0 adminlevel:0 viplevel:0, but my score 1410 and admin level 10 and vip level 5.how to fix it?
Код:
public OnPlayerClickPlayer(playerid, clickedplayerid, source) { new cname[MAX_PLAYER_NAME], score, kills, deaths, adminlvl, viplvl; new teamname[24]; if(GetPlayerTeam(clickedplayerid) == 1) teamname = "internationalforces"; if(GetPlayerTeam(clickedplayerid) == 2) teamname = "Daesh"; PlayerInfo[clickedplayerid][pScore] = score; PlayerInfo[clickedplayerid][pKills] = kills; PlayerInfo[clickedplayerid][pDeaths] = deaths; PlayerInfo[clickedplayerid][pAdmin] = adminlvl; PlayerInfo[clickedplayerid][pVip] = viplvl; GetPlayerName(clickedplayerid, cname, sizeof(cname)); new str[128]; format(str,128,"name:%s (id:%d) team:%s score:%d kills:%d deaths:%d adminlevel:%d viplevel:%d",cname, clickedplayerid, teamname, score, kills, deaths, adminlvl, viplvl); SendClientMessage(playerid,COLOR_GREEN,str); return 1; }