Доступ к архиву

Переход в группу "Пользователь"

300.00 ₽
Одноразовый платёж
Быстрый переход в группу "Пользователи", без надобности написания постов и ожидания.

Покупка дает возможность:
Быть полноправным участником форума
Нормальное копирование кода
Создавать темы
Скачивать файлы
Доступ к архиву Pawno-Info

/object

Статус
В этой теме нельзя размещать новые ответы.

Fllazy

Умник
Здравствуйте. Сегодня я дам возможность выдать объект игроку. И так преступин кидаем код в диалог
PHP:
case 8000:
		{
			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);
						SendMes(objectplayerid,COLOR_LIGHTBLUE,"Администратор %s выдал вам объект [Шляпа Курицы]",PlayerInfo[playerid][pNames]);
						SendMes(playerid,COLOR_LIGHTBLUE,"Вы выдали объект игроку %s [Шляпа Курицы]",PlayerInfo[objectplayerid][pNames]);
						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);
						SendMes(objectplayerid,COLOR_LIGHTBLUE,"Администратор %s выдал вам объект [Огонь на голову]",PlayerInfo[playerid][pNames]);
						SendMes(playerid,COLOR_LIGHTBLUE,"Вы выдали объект игроку %s [Огонь на голову]",PlayerInfo[objectplayerid][pNames]);
						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);
						SendMes(objectplayerid,COLOR_LIGHTBLUE,"Администратор %s выдал вам объект [Мигалка на голову]",PlayerInfo[playerid][pNames]);
						SendMes(playerid,COLOR_LIGHTBLUE,"Вы выдали объект игроку %s [Мигалка на голову]",PlayerInfo[objectplayerid][pNames]);
						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);
						SendMes(objectplayerid,COLOR_LIGHTBLUE,"Администратор %s выдал вам объект [Черная маска]",PlayerInfo[playerid][pNames]);
						SendMes(playerid,COLOR_LIGHTBLUE,"Вы выдали объект игроку %s [Черная маска]",PlayerInfo[objectplayerid][pNames]);
						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);
						SendMes(objectplayerid,COLOR_LIGHTBLUE,"Администратор %s выдал вам объект [Бандана №1]",PlayerInfo[playerid][pNames]);
						SendMes(playerid,COLOR_LIGHTBLUE,"Вы выдали объект игроку %s [Бандана №1]",PlayerInfo[objectplayerid][pNames]);
						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);
						SendMes(objectplayerid,COLOR_LIGHTBLUE,"Администратор %s выдал вам объект [Бандана №2]",PlayerInfo[playerid][pNames]);
						SendMes(playerid,COLOR_LIGHTBLUE,"Вы выдали объект игроку %s [Бандана №2]",PlayerInfo[objectplayerid][pNames]);
						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);
						SendMes(objectplayerid,COLOR_LIGHTBLUE,"Администратор %s выдал вам объект [Бандана №3]",PlayerInfo[playerid][pNames]);
						SendMes(playerid,COLOR_LIGHTBLUE,"Вы выдали объект игроку %s [Бандана №3]",PlayerInfo[objectplayerid][pNames]);
						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);
						SendMes(objectplayerid,COLOR_LIGHTBLUE,"Администратор %s выдал вам объект [Бандана №4]",PlayerInfo[playerid][pNames]);
						SendMes(playerid,COLOR_LIGHTBLUE,"Вы выдали объект игроку %s [Бандана №4]",PlayerInfo[objectplayerid][pNames]);
						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);
						SendMes(objectplayerid,COLOR_LIGHTBLUE,"Администратор %s выдал вам объект [Бандана №5]",PlayerInfo[playerid][pNames]);
						SendMes(playerid,COLOR_LIGHTBLUE,"Вы выдали объект игроку %s [Бандана №5]",PlayerInfo[objectplayerid][pNames]);
						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);
						SendMes(objectplayerid,COLOR_LIGHTBLUE,"Администратор %s выдал вам объект [Маска Дракона]",PlayerInfo[playerid][pNames]);
						SendMes(playerid,COLOR_LIGHTBLUE,"Вы выдали объект игроку %s [Маска Дракона]",PlayerInfo[objectplayerid][pNames]);
						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);
						SendMes(objectplayerid,COLOR_LIGHTBLUE,"Администратор %s выдал вам объект [Лазер на голову]",PlayerInfo[playerid][pNames]);
						SendMes(playerid,COLOR_LIGHTBLUE,"Вы выдали объект игроку %s [Лазер на голову]",PlayerInfo[objectplayerid][pNames]);
						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);
						SendMes(objectplayerid,COLOR_LIGHTBLUE,"Администратор %s выдал вам объект [Комплект всемогущий]",PlayerInfo[playerid][pNames]);
						SendMes(playerid,COLOR_LIGHTBLUE,"Вы выдали объект игроку %s [Комплект всемогущий]",PlayerInfo[objectplayerid][pNames]);
						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);
						SendMes(objectplayerid,COLOR_LIGHTBLUE,"Администратор %s выдал вам объект [Попугай на плечо]",PlayerInfo[playerid][pNames]);
						SendMes(playerid,COLOR_LIGHTBLUE,"Вы выдали объект игроку %s [Попугай на плечо]",PlayerInfo[objectplayerid][pNames]);
						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);
						SendMes(objectplayerid,COLOR_LIGHTBLUE,"Администратор %s выдал вам объект [Яркий свет]",PlayerInfo[playerid][pNames]);
						SendMes(playerid,COLOR_LIGHTBLUE,"Вы выдали объект игроку %s [Яркий свет]",PlayerInfo[objectplayerid][pNames]);
						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);
						SendMes(objectplayerid,COLOR_LIGHTBLUE,"Администратор %s выдал вам объект [Большой М4 в руку]",PlayerInfo[playerid][pNames]);
						SendMes(playerid,COLOR_LIGHTBLUE,"Вы выдали объект игроку %s [Большой М4 в руку]",PlayerInfo[objectplayerid][pNames]);
						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);
						SendMes(objectplayerid,COLOR_LIGHTBLUE,"Администратор %s выдал вам объект [Пенис]",PlayerInfo[playerid][pNames]);
						SendMes(playerid,COLOR_LIGHTBLUE,"Вы выдали объект игроку %s [Пенис]",PlayerInfo[objectplayerid][pNames]);
						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);
						SendMes(objectplayerid,COLOR_LIGHTBLUE,"Администратор %s выдал вам объект [Костюм попугая]",PlayerInfo[playerid][pNames]);
						SendMes(playerid,COLOR_LIGHTBLUE,"Вы выдали объект игроку %s [Костюм попугая]",PlayerInfo[objectplayerid][pNames]);
						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);
						SendMes(objectplayerid,COLOR_LIGHTBLUE,"Администратор %s удалил все ваши объекты",PlayerInfo[playerid][pNames]);
						SendMes(playerid,COLOR_LIGHTBLUE,"Вы удалили все объекты игроку %s",PlayerInfo[objectplayerid][pNames]);
						return true;
					}
				}
			}
		}
Затем. Ставим команду.
PHP:
}
	else if(strcmp(cmd, "/object", true) == 0)
	{
		if(PlayerInfo[playerid][playerAdminka] < 5) return SendClientMessage(playerid, COLOR_WHITE, "[x] Ошибка: Данная команда доступна администраторам с 5 ранга.");
		tmp = strcharsplit(cmdtext, idx);
		if(!strlen(tmp)) return SendClientMessage(playerid, COLOR_BLUE, "[x] Используйте: /object [playerid]");
		objectplayerid = ReturnUser(tmp);
		if(IsPlayerConnected(objectplayerid)) SPD(playerid,8000,DIALOG_STYLE_LIST,"Обьекты","{FFFFFF}Шляпа курицы\nОгонек на голову\nМигалка на голову\nЧерная маска\nБандана №1\nБандана №2\nБандана №3\nБандана №4\nБандана №5\nМаска дракона\nЛазер на голову\nКомплект всемогущий\nПопугай на плечо\nЯркий свет\nБольшой М4 в руку\nПенис\nКостюм попугая\nУдалить все объекты","Выбрать","Закрыть");
	}
Готова. Если кому помог от + не откажаусь )
 
Статус
В этой теме нельзя размещать новые ответы.
Сверху Снизу