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; }
public OnPlayerClickPlayer(playerid, clickedplayerid, source) { new cname[MAX_PLAYER_NAME], score, kills, deaths, adminlvl, viplvl, money; new teamname[24]; if(GetPlayerTeam(clickedplayerid) == 1) teamname = "internationalforces"; if(GetPlayerTeam(clickedplayerid) == 2) teamname = "Daesh"; score = PlayerInfo[clickedplayerid][pScore]; kills = PlayerInfo[clickedplayerid][pKills]; deaths = PlayerInfo[clickedplayerid][pDeaths]; adminlvl = PlayerInfo[clickedplayerid][pAdmin]; viplvl = PlayerInfo[clickedplayerid][pVip]; money = PlayerInfo[clickedplayerid][pMoney]; GetPlayerName(clickedplayerid, cname, sizeof(cname)); new str[128]; format(str,128,"name:%s (id:%d) team:%s score:%d kills:%d deaths:%d money:%d adminlevel:%d viplevel:%d",cname, clickedplayerid, teamname, score, kills, deaths, money, adminlvl, viplvl); SendClientMessage(playerid,COLOR_GREEN,str); return 1; }
public OnPlayerClickPlayer(playerid, clickedplayerid, source)
{
new cname[MAX_PLAYER_NAME], score, kills, deaths, adminlvl, viplvl, money;
new teamname[24];
switch(GetPlayerTeam(clickedplayerid))
{
case 1: format(teamname, sizeof(teamname), "internationalforces");
case 2: format(teamname, sizeof(teamname), "Daesh");
default: format(teamname, sizeof(teamname), "There is an error in getting your current team");
}
score = PlayerInfo[clickedplayerid][pScore];
kills = PlayerInfo[clickedplayerid][pKills];
deaths = PlayerInfo[clickedplayerid][pDeaths];
adminlvl = PlayerInfo[clickedplayerid][pAdmin];
viplvl = PlayerInfo[clickedplayerid][pVip];
money = PlayerInfo[clickedplayerid][pMoney];
GetPlayerName(clickedplayerid, cname, sizeof(cname));
new str[128];
format(str, sizeof(str),"name: %s (id:%d) team: %s score:%d kills:%d deaths:%d money:%d adminlevel:%d viplevel:%d",cname, clickedplayerid, teamname, score, kills, deaths, money, adminlvl, viplvl);
SendClientMessage(playerid,COLOR_GREEN,str);
return 1;
}
fix teamname plz.
Код:
public OnPlayerClickPlayer(playerid, clickedplayerid, source) { new cname[MAX_PLAYER_NAME], score, kills, deaths, adminlvl, viplvl, money; new teamname[24]; if(GetPlayerTeam(clickedplayerid) == 1) teamname = "internationalforces"; if(GetPlayerTeam(clickedplayerid) == 2) teamname = "Daesh"; score = PlayerInfo[clickedplayerid][pScore]; kills = PlayerInfo[clickedplayerid][pKills]; deaths = PlayerInfo[clickedplayerid][pDeaths]; adminlvl = PlayerInfo[clickedplayerid][pAdmin]; viplvl = PlayerInfo[clickedplayerid][pVip]; money = PlayerInfo[clickedplayerid][pMoney]; GetPlayerName(clickedplayerid, cname, sizeof(cname)); new str[128]; format(str,128,"name:%s (id:%d) team:%s score:%d kills:%d deaths:%d money:%d adminlevel:%d viplevel:%d",cname, clickedplayerid, teamname, score, kills, deaths, money, adminlvl, viplvl); SendClientMessage(playerid,COLOR_GREEN,str); return 1; } |