yuraok3
Умник
Здравствуйте помогите с диалоговым окном питаюсь перевести команду на диалоговое окно не чего не получаеться может кто то поможет буду благодарен
Сама команда
Вот что вышло у меня
Сама команда
PHP:
else if(strcmp(cmd, "/makegun", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if(PlayerInfo[playerid][pJailTime] > 0) return SendClientMessage(playerid, COLOR_GREY, "В данный момент Вы не можете пользоваться этой функцией");
new plst = PlayerInfo[playerid][pMRInections];
if(plst == 3 || plst == 5 || plst == 6 || plst == 12 || plst == 13 || plst == 15 || plst == 14 || plst == 17 || plst == 18 || plst == 19)
{
new gunquote;
tmp = strcharsplit(cmdtext, idx);
if(!strlen(tmp))
{
new strcatZ[512], str[82];
format(str,sizeof(str),"Silinced Pistol\tНомер: 1\tМатериалов за 1 патрон: 1 шт.\n"); strcat(strcatZ,str);
format(str,sizeof(str),"Desert Eagle\tНомер: 2\tМатериалов за 1 патрон: 3 шт.\n"); strcat(strcatZ,str);
format(str,sizeof(str),"Shotgun\tНомер: 3\tМатериалов за 1 патрон: 2 шт.\n"); strcat(strcatZ,str);
format(str,sizeof(str),"MP5\t\tНомер: 4\tМатериалов за 1 патрон: 1 шт.\n"); strcat(strcatZ,str);
format(str,sizeof(str),"AK-47\t\tНомер: 5\tМатериалов за 1 патрон: 2 шт.\n"); strcat(strcatZ,str);
format(str,sizeof(str),"M4\t\tНомер: 6\tМатериалов за 1 патрон: 2 шт.\n"); strcat(strcatZ,str);
format(str,sizeof(str),"Sniper Rifle\tНомер: 7\tМатериалов за 1 патрон: 4 шт.\n"); strcat(strcatZ,str);
ShowPlayerDialog(playerid, 00000, DIALOG_STYLE_MSGBOX, "Таблица оружия", strcatZ, "Выход", "");
SendClientMessage(playerid, COLOR_WHITE, "Используйте: /makegun [Номер оружия] [Количество патронов]");
return true;
}
new gunidxx = strval(tmp);
if(gunidxx == 1 || gunidxx == 2 || gunidxx == 3 || gunidxx == 4 || gunidxx == 5 || gunidxx == 6 || gunidxx == 7)
{
tmp = strcharsplit(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_WHITE, "Используйте: /makegun [Номер оружия] [Количество патронов]");
return true;
}
new gunid, gunname[28];
new ammogunxx = strval(tmp);
if(gunidxx == 1) gunquote = 1, gunid = 23, format(gunname, 28, "Silinced Pistol");
else if(gunidxx == 2) gunquote = 3, gunid = 24, format(gunname, 28, "Desert Eagle");
else if(gunidxx == 3) gunquote = 2, gunid = 25, format(gunname, 28, "Shotgun");
else if(gunidxx == 4) gunquote = 1, gunid = 29, format(gunname, 28, "MP5");
else if(gunidxx == 5) gunquote = 2, gunid = 30, format(gunname, 28, "AK-47");
else if(gunidxx == 6) gunquote = 2, gunid = 31, format(gunname, 28, "M4");
else if(gunidxx == 7) gunquote = 4, gunid = 34, format(gunname, 28, "Sniper Rifle");
if(PlayerInfo[playerid][pMats] < (gunquote*ammogunxx)) return SendClientMessage(playerid, COLOR_GREY, "У Вас недостаточно материалов");
GiveWeapon(playerid,gunid,ammogunxx);
PlayerInfo[playerid][pMats] -= gunquote*ammogunxx;
format(stringer, sizeof(stringer), "%s сделал из материалов %s c %d патр.",PlayerInfo[playerid][pNames], gunname, ammogunxx);
ProxDetector(20.0, playerid, stringer, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
}
}
else return SendClientMessage(playerid, COLOR_GREY, "Вам недоступна эта функция");
}
return true;
}
PHP:
else if(strcmp(cmd, "/makegun1", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if(PlayerInfo[playerid][pJailTime] > 0) return SendClientMessage(playerid, COLOR_GREY, "В данный момент Вы не можете пользоваться этой функцией");
{
format(stringer, sizeof(stringer), "- Silinced Pistol\n- Desert Eagle\n- Shotgun\n- MP5\n- AK-47\n- M4\n- Sniper Rifle");
ShowPlayerDialog(playerid, 53031, DIALOG_STYLE_LIST, "Информация о доме", stringer, "Выбрать", "Отмена");
return true;
}
}
}
PHP:
case 53031:
{
if(response)
{
switch(listitem)
{
case 0: ShowPlayerDialog(playerid,5031, DIALOG_STYLE_INPUT, "Прописка","Введите [ID] человека\n которого хотите прописать в вашем(ей) доме(квартире)", "Прописать", "Отмена"); //Прописка
}
}
else return true;
}
PHP:
case 5031:
{
if(response)
{
new gunquote;
new gunid, gunname[28];
new ammogunxx;
if(gunquote == 1) gunid = 23, format(gunname, 28, "Silinced Pistol");
if(PlayerInfo[playerid][pMats] < (gunquote*ammogunxx)) return SendClientMessage(playerid, COLOR_GREY, "У Вас недостаточно материалов");
GiveWeapon(playerid,gunid,ammogunxx);
PlayerInfo[playerid][pMats] -= gunquote*ammogunxx;
format(stringer, sizeof(stringer), "%s сделал из материалов %s c %d патр.",PlayerInfo[playerid][pNames], gunname, ammogunxx);
ProxDetector(20.0, playerid, stringer, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
return true;
}
else { return true; }
}
Последнее редактирование:
