Samuel_Lecompte
Умник
Команда является копией проекта Samp-Rp.Ru 2016 года.
Сразу предупреждаю, требуется настройка под свой мод, иначе не будет показывать правильно.
У кого будут проблемы, пишите в комментарии я помогу.
PHP:
#define ServerPatrons[%0] AGunAmmo[params[0]][Gun[%0]]
CMD:iwep(playerid, params[])
{
if(!CheckAdminLevel(playerid, 2)) return 1; // Проверка на админку.
if(sscanf(params, "u",params[0])) return SendClientMessage(playerid, COLOR_WHITE," Введите: /iwep [playerid/ник]");
if(!IsPlayerConnected(params[0])) return SendClientMessage(playerid, COLOR_GREY," Игрок не найден");
new iwep[55+10], Gun[12+1], Ammo[12+1], string[725+1];
for (new i = 0; i < 13; i++) {
GetPlayerWeaponData(params[0], i, Gun[i], Ammo[i]);
}
new Float:onepercent, shotpercent, Float:toneshotp, tshotprocent;
if(NumberShot[params[0]]) {
onepercent = float(NumberShotTarget[params[0]])/float(NumberShot[params[0]]);
shotpercent = floatround(onepercent*100);
}
if(TimeNumberShot[params[0]]) {
toneshotp = float(TimeNumberShotTarget[params[0]])/float(TimeNumberShot[params[0]]);
tshotprocent = floatround(toneshotp*100);
}
format(iwep,sizeof(iwep),"{33CC00}%s\n\n",getName(params[0])), strcat(string,iwep);
format(iwep,sizeof(iwep),"{ffff00}State: %d\n",GetPlayerState(params[0])), strcat(string,iwep);
format(iwep,sizeof(iwep),"{FF0000}Выстрелов за сессию: %d. Попаданий: %d. Процент: %d\n",NumberShot[params[0]],NumberShotTarget[params[0]],shotpercent), strcat(string,iwep);
format(iwep,sizeof(iwep),"{FF0000}Выстрелов за 10мин: %d. Попаданий: %d. Процент: %d\n",TimeNumberShot[params[0]],TimeNumberShotTarget[params[0]],tshotprocent), strcat(string,iwep);
format(iwep,sizeof(iwep),"{ff00ff}[Weapon][ClientGuns][ServerGuns]\n"), strcat(string,iwep);
format(iwep,sizeof(iwep),"{ff00ff}0\tW: %d CG: %d SG: %d\n",Gun[0],Ammo[0],ServerPatrons[0]), strcat(string,iwep);
format(iwep,sizeof(iwep),"{ff00ff}1\tW: %d CG: %d SG: %d\n",Gun[1],Ammo[1],ServerPatrons[1]), strcat(string,iwep);
format(iwep,sizeof(iwep),"{ff00ff}2\tW: %d CG: %d SG: %d\n",Gun[2],Ammo[2],ServerPatrons[2]), strcat(string,iwep);
format(iwep,sizeof(iwep),"{ff00ff}3\tW: %d CG: %d SG: %d\n",Gun[3],Ammo[3],ServerPatrons[3]), strcat(string,iwep);
format(iwep,sizeof(iwep),"{ff00ff}4\tW: %d CG: %d SG: %d\n",Gun[4],Ammo[4],ServerPatrons[4]), strcat(string,iwep);
format(iwep,sizeof(iwep),"{ff00ff}5\tW: %d CG: %d SG: %d\n",Gun[5],Ammo[5],ServerPatrons[5]), strcat(string,iwep);
format(iwep,sizeof(iwep),"{ff00ff}6\tW: %d CG: %d SG: %d\n",Gun[6],Ammo[6],ServerPatrons[6]), strcat(string,iwep);
format(iwep,sizeof(iwep),"{ff00ff}7\tW: %d CG: %d SG: %d\n",Gun[7],Ammo[7],ServerPatrons[7]), strcat(string,iwep);
format(iwep,sizeof(iwep),"{ff00ff}8\tW: %d CG: %d SG: %d\n",Gun[8],Ammo[8],ServerPatrons[8]), strcat(string,iwep);
format(iwep,sizeof(iwep),"{ff00ff}9\tW: %d CG: %d SG: %d\n",Gun[9],Ammo[9],ServerPatrons[9]), strcat(string,iwep);
format(iwep,sizeof(iwep),"{ff00ff}10\tW: %d CG: %d SG: %d\n",Gun[10],Ammo[10],ServerPatrons[10]), strcat(string,iwep);
format(iwep,sizeof(iwep),"{ff00ff}11\tW: %d CG: %d SG: %d\n",Gun[11],Ammo[11],ServerPatrons[11]), strcat(string,iwep);
format(iwep,sizeof(iwep),"{ff00ff}12\tW: %d CG: %d SG: %d",Gun[12],Ammo[12],ServerPatrons[12]), strcat(string,iwep);
return ShowPlayerDialog(playerid,0,DIALOG_STYLE_MSGBOX,"Информация оружия",string,"Закрыть","");
}
Автор: Samuel_Lecompte
Спасибо за внимание.
Последнее редактирование:
