shape1
shape2
shape3
shape4
shape7
shape8

Не работает команда


Статус
Закрыто для дальнейших ответов.

ingarpp

Новичок
Пользователь
14.02.2015
18
0
0
Помогите не работает команда.

Делаю команду каторая будет выдовать объекты игроку.

Команда сама работает,ввожу команду и выходит диалог и там название объектов,когда нажимаешь на объекты в списке то ничего не происходит,ниже код.

Самаа команда 

CMD:cobject(playerid,params[])
{
new giveplayerid;
if(sscanf(params,"d",giveplayerid)) return SendClientMessage(playerid, -1,"Введите: /cobject [id]");
if(!IsPlayerConnected(giveplayerid) || giveplayerid == INVALID_PLAYER_ID) return true;
SetPVarInt(playerid,"ID",giveplayerid);
ShowPlayerDialog(playerid,8000,DIALOG_STYLE_LIST,"Выдать Объект Игроку","1.Шляпа Курицы\n2.Огонь на голову\n3.Мигалка на голову\n4.Черная маска\n5.Бандана №1\n6.Бандана №2\n7.Бандана №3\n8.Бандана №4\n9.Бандана №5\n10.Маска дракона\n11.Лазер на голову\n12.Комплект Всемогущий\n13.Попугай на Плечо\n14.Яркий Свет\n15.Большой М4 в руку\n16.Пенис\n.17.Костюм Попугая\nУдалить Все Объекты","Выбрать","Закрыть");
return true;
}

А ниже код public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])

Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
	switch(dialogid)
	{

				case 8000:
		{
		    new objectplayerid;
			if(response)
			{
				switch(listitem)
		
				{
				case 0:
					{
						if(IsPlayerAttachedObjectSlotUsed(objectplayerid, 2)) RemovePlayerAttachedObject(objectplayerid, 2);
					    SetPlayerAttachedObject(objectplayerid,2,19137,2,0.100000,0.000000,0.000000,0.000000,0.000000,0.000000,1.000000,1.000000,1.000000);
						return true;
					}
				case 1:
					{
						if(IsPlayerAttachedObjectSlotUsed(objectplayerid, 7)) RemovePlayerAttachedObject(objectplayerid, 7);
						SetPlayerAttachedObject(objectplayerid,7, 19270, 2, 0.111052, 0.021643, -0.000846, 92.280899, 92.752510, 358.071044, 1.200000, 1.283168, 1.200000);
						return true;
					}
				case 2:
					{
						if(IsPlayerAttachedObjectSlotUsed(objectplayerid, 4)) RemovePlayerAttachedObject(objectplayerid, 4);
						SetPlayerAttachedObject(objectplayerid,4, 18646, 2, 0.111052, 0.021643, -0.000846, 92.280899, 92.752510, 358.071044, 1.200000, 1.283168, 1.200000);
						return true;
					}
				case 3:
					{
						if(IsPlayerAttachedObjectSlotUsed(objectplayerid, 7)) RemovePlayerAttachedObject(objectplayerid, 7);
						SetPlayerAttachedObject(objectplayerid,7, 19163, 2, 0.111052, 0.021643, -0.000846, 100.280899, 100.752510, 445.071044, 1.100000, 1.300000, 1.300000);
						return true;
					}
				case 4:
					{
						if(IsPlayerAttachedObjectSlotUsed(objectplayerid, 0)) RemovePlayerAttachedObject(objectplayerid, 0);
						SetPlayerAttachedObject(objectplayerid,0, 18915, 2, 0.1, 0.03, -0.005, 90.0, 180.0, 90.0);
						return true;
					}
				case 5:
					{
						if(IsPlayerAttachedObjectSlotUsed(objectplayerid, 0)) RemovePlayerAttachedObject(objectplayerid, 0);
						SetPlayerAttachedObject(objectplayerid,0, 18912, 2, 0.1, 0.03, -0.005, 90.0, 180.0, 90.0);
						return true;
					}
				case 6:
					{
						if(IsPlayerAttachedObjectSlotUsed(objectplayerid, 0)) RemovePlayerAttachedObject(objectplayerid, 0);
						SetPlayerAttachedObject(objectplayerid,0, 18916, 2, 0.1, 0.03, -0.005, 90.0, 180.0, 90.0);
						return true;
					}
				case 7:
					{
						if(IsPlayerAttachedObjectSlotUsed(objectplayerid, 0)) RemovePlayerAttachedObject(objectplayerid, 0);
						SetPlayerAttachedObject(objectplayerid,0, 18917, 2, 0.1, 0.03, -0.005, 90.0, 180.0, 90.0);
						return true;
					}
				case 8:
					{
						if(IsPlayerAttachedObjectSlotUsed(objectplayerid, 0)) RemovePlayerAttachedObject(objectplayerid, 0);
						SetPlayerAttachedObject(objectplayerid,0, 18918, 2, 0.1, 0.03, -0.005, 90.0, 180.0, 90.0);
						return true;
					}
				case 9:
					{
						if(IsPlayerAttachedObjectSlotUsed(objectplayerid, 4)) RemovePlayerAttachedObject(objectplayerid, 4);
						SetPlayerAttachedObject(objectplayerid,4, 3528, 2, 0.111052, 0.021643, -0.000846, 92.280899, 92.752510, 358.071044, 0.100000, 0.100000, 0.100000);
						return true;
					}
				case 10:
					{
						if(IsPlayerAttachedObjectSlotUsed(objectplayerid, 4)) RemovePlayerAttachedObject(objectplayerid, 4);
						SetPlayerAttachedObject(objectplayerid,4, 18643, 2, 0.111052, 0.021643, -0.000846, 92.280899, 92.752510, 358.071044, 1.200000, 1.283168, 1.200000);
						return true;
					}
				case 11:
					{
						if(IsPlayerAttachedObjectSlotUsed(objectplayerid, 0) || IsPlayerAttachedObjectSlotUsed(objectplayerid, 1) || IsPlayerAttachedObjectSlotUsed(objectplayerid, 4))
						{
							RemovePlayerAttachedObject(objectplayerid, 0);
							RemovePlayerAttachedObject(objectplayerid, 1);
							RemovePlayerAttachedObject(objectplayerid, 4);
						}
						SetPlayerAttachedObject(objectplayerid,0, 18693, 5, 1.983503, 1.558882, -0.129482, 86.705787, 308.978118, 268.198822, 1.500000, 1.500000, 1.500000);
						SetPlayerAttachedObject(objectplayerid,1, 18693, 6, 1.983503, 1.558882, -0.129482, 86.705787, 308.978118, 268.198822, 1.500000, 1.500000, 1.500000);
						SetPlayerAttachedObject(objectplayerid,4, 18965, 2, 0.111052, 0.021643, -0.000846, 92.280899, 92.752510, 358.071044, 1.200000, 1.283168, 1.200000);
						return true;
					}
				case 12:
					{
						if(IsPlayerAttachedObjectSlotUsed(objectplayerid, 7)) RemovePlayerAttachedObject(objectplayerid, 7);
						SetPlayerAttachedObject(objectplayerid,7, 19078, 1, 0.329150, -0.072101, 0.156082, 0.000000, 0.000000, 0.000000, 1.000000, 1.000000, 1.000000);
						return true;
					}
				case 13:
					{
						if(IsPlayerAttachedObjectSlotUsed(objectplayerid, 7)) RemovePlayerAttachedObject(objectplayerid, 7);
						SetPlayerAttachedObject(objectplayerid,7, 354, 1, 0.329150, -0.072101, 0.156082, 0.000000, 0.000000, 0.000000, 1.000000, 1.000000, 1.000000);
						return true;
					}
				case 14:
					{
						if(IsPlayerAttachedObjectSlotUsed(objectplayerid, 1)) RemovePlayerAttachedObject(objectplayerid, 1);
						SetPlayerAttachedObject(objectplayerid,1, 356, 6, 0.013610, -0.021393, -0.144862, 2.354303, 354.413848, 0.219168, 3.034477, 3.000000, 3.000000);
						return true;
					}
				case 15:
					{
						if(IsPlayerAttachedObjectSlotUsed(objectplayerid, 1)) RemovePlayerAttachedObject(objectplayerid, 1);
						SetPlayerAttachedObject(objectplayerid,1, 19086, 8, -0.049768, -0.014062, -0.108385, 87.458297, 263.478149, 184.123764, 0.622413, 1.041609, 1.012785);
						return true;
					}
				case 16:
					{
						if(IsPlayerAttachedObjectSlotUsed(objectplayerid, 0)) RemovePlayerAttachedObject(objectplayerid, 0);
						SetPlayerAttachedObject(objectplayerid,0, 19078, 1, -1.097527, -0.348305, -0.008029, 0.000000, 0.000000, 0.000000, 8.073966, 8.073966, 8.073966);
						return true;
					}
				case 17:
					{
						RemovePlayerAttachedObject(objectplayerid, 0);
						RemovePlayerAttachedObject(objectplayerid, 1);
						RemovePlayerAttachedObject(objectplayerid, 2);
						RemovePlayerAttachedObject(objectplayerid, 3);
						RemovePlayerAttachedObject(objectplayerid, 4);
						RemovePlayerAttachedObject(objectplayerid, 5);
						RemovePlayerAttachedObject(objectplayerid, 6);
						RemovePlayerAttachedObject(objectplayerid, 7);
						RemovePlayerAttachedObject(objectplayerid, 8);
						RemovePlayerAttachedObject(objectplayerid, 9);
						return true;
					}
				}
			}
		}
	}		return true;
}
 

Mirex

Руководитель проекта
Команда портала
Гл.Администратор
Золотой
21.12.2013
2 513
550
0
26
definehost.ru
Скриптер
Вообще-то, форум тематики CRMP, а не SAMP.

Замените:

new objectplayerid;

На это:

Код:
new objectplayerid = GetPVarInt(playerid,"ID");
 
Статус
Закрыто для дальнейших ответов.