Corey Taylor
Дебютант
PHP:
alias:mm("menu");
CMD:mm(playerid)
{
new hometext[24],maxquest,targetid = playerid,string[200];
new Float:HP,Float:AR;
GetPlayerHealth(playerid, HP);
if(HP > 100) HP = 100;
GetPlayerArmour(playerid, AR);
if(AR > 100) AR = 100;
format(string,sizeof(string),FixText("Ник: %s"),GN(playerid)),PlayerTextDrawSetString(playerid, PMENUI[playerid][8], string);
format(string,sizeof(string),FixText("Пол: %s"),FixText(GetSex[PlayerInfo[targetid][pSex]])),PlayerTextDrawSetString(playerid, PMENUI[playerid][9], string);
format(string,sizeof(string),FixText("Национальность: %s"),FixText(GetRace[PlayerInfo[targetid][pRace]])),PlayerTextDrawSetString(playerid, PMENUI[playerid][10], string);
format(string,sizeof(string),FixText("Телефон: %d"),PlayerInfo[playerid][pPnumber]),PlayerTextDrawSetString(playerid, PMENUI[playerid][11], string);
format(string,sizeof(string),FixText("Организация: %s"),FixText(GetFracName[PlayerInfo[targetid][pMember]])),PlayerTextDrawSetString(playerid, PMENUI[playerid][12], string);
format(string,sizeof(string),FixText("Ранг: %d"),PlayerInfo[targetid][pRank]),PlayerTextDrawSetString(playerid, PMENUI[playerid][13], string);
format(string,sizeof(string),FixText("Работа: %s"),FixText(GetJobName[PlayerInfo[targetid][pJob]])),PlayerTextDrawSetString(playerid, PMENUI[playerid][14], string);
format(string,sizeof(string),FixText("Наркотики: %d грамм"),PlayerInfo[playerid][pDrugs]),PlayerTextDrawSetString(playerid, PMENUI[playerid][15], string);
format(string,sizeof(string),FixText("Материалы: %d штук"),PlayerInfo[playerid][pMats]),PlayerTextDrawSetString(playerid, PMENUI[playerid][16], string);
format(string,sizeof(string),FixText("Патроны: %d штук"),PlayerInfo[playerid][pPatrons]),PlayerTextDrawSetString(playerid, PMENUI[playerid][17], string);
if(PlayerInfo[playerid][pPhousekey] == 255) { hometext = "Нету"; } else { hometext = "Есть"; }
format(string,sizeof(string),FixText("Дом: %s"),FixText(hometext)),PlayerTextDrawSetString(playerid, PMENUI[playerid][18], string);
if(PlayerInfo[playerid][pBizkey] == 0) { hometext = "Нету"; } else { hometext = "Есть"; }
format(string,sizeof(string),FixText("Бизнес: %s"),FixText(hometext)),PlayerTextDrawSetString(playerid, PMENUI[playerid][19], string);
format(string,sizeof(string),"%d",PlayerInfo[playerid][pCash]),PlayerTextDrawSetString(playerid, PMENUI[playerid][20], string);
for(new i = 0; i < MAX_QUESTS; i++) { if(pQuest[playerid][i] == 1) maxquest++; }
format(string,sizeof(string),"%d",maxquest),PlayerTextDrawSetString(playerid, PMENUI[playerid][22], string);
format(string,sizeof(string),"%d",MAX_QUESTS-maxquest),PlayerTextDrawSetString(playerid, PMENUI[playerid][23], string);
format(string,sizeof(string),"%d",MAX_QUESTS),PlayerTextDrawSetString(playerid, PMENUI[playerid][21], string);
format(string,sizeof(string),FixText("Водительские права: %s"),PlayerInfo[targetid][pCarLic] ? FixText(("Нету")):FixText(("Есть"))),PlayerTextDrawSetString(playerid, PMENUI[playerid][24], string);
format(string,sizeof(string),FixText("Лицензие на оружие: %s"),PlayerInfo[targetid][pGunLic] ? FixText(("Нету")):FixText(("Есть"))),PlayerTextDrawSetString(playerid, PMENUI[playerid][25], string);
format(string,sizeof(string),FixText("Лицензия на воздушный транспорт: %s"),PlayerInfo[targetid][pFlyLic] ? FixText(("Нету")):FixText(("Есть"))),PlayerTextDrawSetString(playerid, PMENUI[playerid][26], string);
PlayerTextDrawSetPreviewModel(playerid, PMENUI[playerid][0],GetPlayerSkin(playerid));
format(string,sizeof(string),"%d",PlayerInfo[playerid][pLevel]),PlayerTextDrawSetString(playerid, PMENUI[playerid][2], string);
format(string,sizeof(string),"%d",PlayerInfo[playerid][pLevel]+1),PlayerTextDrawSetString(playerid, PMENUI[playerid][3], string);
format(string,sizeof(string),"%.0f%%",HP),PlayerTextDrawSetString(playerid, PMENUI[playerid][5], string);
format(string,sizeof(string),"%.0f%%",AR),PlayerTextDrawSetString(playerid, PMENUI[playerid][7], string);
PlayerTextDrawDestroy(playerid, PMENUI[playerid][1]);
PlayerTextDrawDestroy(playerid, PMENUI[playerid][4]);
PlayerTextDrawDestroy(playerid, PMENUI[playerid][6]);
PMENUI[playerid][1] = CreatePlayerTextDraw(playerid, 286.000000, 164.187500, "_");
PlayerTextDrawLetterSize(playerid, PMENUI[playerid][1], 0.460000, -0.053750);
PlayerTextDrawTextSize(playerid, PMENUI[playerid][1], 282.000000 + (PlayerInfo[playerid][pExp]), 382.000000);
PlayerTextDrawAlignment(playerid, PMENUI[playerid][1], 1);
PlayerTextDrawColor(playerid, PMENUI[playerid][1], 640034559);
PlayerTextDrawUseBox(playerid, PMENUI[playerid][1], 1);
PlayerTextDrawBoxColor(playerid, PMENUI[playerid][1], 640034559);
PlayerTextDrawSetShadow(playerid, PMENUI[playerid][1], 0);
PlayerTextDrawSetOutline(playerid, PMENUI[playerid][1], 0);
PlayerTextDrawBackgroundColor(playerid, PMENUI[playerid][1], 255);
PlayerTextDrawFont(playerid, PMENUI[playerid][1], 1);
PlayerTextDrawSetProportional(playerid, PMENUI[playerid][1], 1);
PlayerTextDrawSetShadow(playerid, PMENUI[playerid][1], 0);
PMENUI[playerid][4] = CreatePlayerTextDraw(playerid, 286.000000, 179.500000, "_");
PlayerTextDrawLetterSize(playerid, PMENUI[playerid][4], 0.460000, -0.053750);
PlayerTextDrawTextSize(playerid, PMENUI[playerid][4], 282.000000 + (HP), 382.000000);
PlayerTextDrawAlignment(playerid, PMENUI[playerid][4], 1);
PlayerTextDrawColor(playerid, PMENUI[playerid][4], 640034559);
PlayerTextDrawUseBox(playerid, PMENUI[playerid][4], 1);
PlayerTextDrawBoxColor(playerid, PMENUI[playerid][4], 640034559);
PlayerTextDrawSetShadow(playerid, PMENUI[playerid][4], 0);
PlayerTextDrawSetOutline(playerid, PMENUI[playerid][4], 0);
PlayerTextDrawBackgroundColor(playerid, PMENUI[playerid][4], 255);
PlayerTextDrawFont(playerid, PMENUI[playerid][4], 1);
PlayerTextDrawSetProportional(playerid, PMENUI[playerid][4], 1);
PlayerTextDrawSetShadow(playerid, PMENUI[playerid][4], 0);
PMENUI[playerid][6] = CreatePlayerTextDraw(playerid, 286.000000, 193.937500, "_");
PlayerTextDrawLetterSize(playerid, PMENUI[playerid][6], 0.460000, -0.053750);
PlayerTextDrawTextSize(playerid, PMENUI[playerid][6], 282.000000 + (AR), 382.000000);
PlayerTextDrawAlignment(playerid, PMENUI[playerid][6], 1);
PlayerTextDrawColor(playerid, PMENUI[playerid][6], 640034559);
PlayerTextDrawUseBox(playerid, PMENUI[playerid][6], 1);
PlayerTextDrawBoxColor(playerid, PMENUI[playerid][6], 640034559);
PlayerTextDrawSetShadow(playerid, PMENUI[playerid][6], 0);
PlayerTextDrawSetOutline(playerid, PMENUI[playerid][6], 0);
PlayerTextDrawBackgroundColor(playerid, PMENUI[playerid][6], 255);
PlayerTextDrawFont(playerid, PMENUI[playerid][6], 1);
PlayerTextDrawSetProportional(playerid, PMENUI[playerid][6], 1);
PlayerTextDrawSetShadow(playerid, PMENUI[playerid][6], 0);
for(new td; td < 37; td++) TextDrawShowForPlayer(playerid,PMENU[td]);
for(new td; td < 27; td++) PlayerTextDrawShow(playerid,PMENUI[playerid][td]);
SelectTextDraw(playerid,SLOT_VIDILAET);
SetPVarInt(playerid,"pmenu",1);
return 1;
}
