|
Оффлайн
Воскресенье, 25.08.2013, 17:51 | Сообщение # 1
|
|
Здравствуйте ув.пользователи http://isamp.3dn.ru Сегодня я покажу как сделать "Рандомный Spawn" и как поставить себе на Server.
1. Добавляем ко всем new Цитата (Код) new Float:gRandomPlayerSpawns[15][6] = { (105, 2519.6433, -1678.9954, 14.7948, 71.7835, 22) (106, 2519.6433, -1678.9954, 14.7948, 71.7835, 22); (107, 2519.6433, -1678.9954, 14.7948, 71.7835, 22); (195, 2519.6433, -1678.9954, 14.7948, 71.7835); (13, 2232.2529, -1179.5453, 25.8971, 35.103); (102, 2232.2529, -1179.5453, 25.8971, 35.103); (103, 2232.2529, -1179.5453, 25.8971, 35.103); (104, 2232.2529, -1179.5453, 25.8971, 35.103); (108, 2754.3366, -1399.8333, 39.3722, 83.5179); (109, 2754.3366, -1399.8333, 39.3722, 83.5179); (110, 2754.3366, -1399.8333, 39.3722, 83.5179); (298, 2754.3366, -1399.8333, 39.3722, 83.5179); (115, 1809.8403, -1940.4466, 13.5468, 41.8457); (116, 1809.8403, -1940.4466, 13.5468, 41.8457); (114, 1809.8403, -1940.4466, 13.5468, 41.8457); };
2. Добавляем в public OnGameModeInit
Цитата (Код) AddPlayerClass(1156, 1809.8403, -1940.4466, 13.5468, 41.8457, 22, 500, 18, 3, 33, 500); AddPlayerClass(255, 1552.9593, -1675.6552, 16.1952, 90.5799, 22, 500, 31, 500, 16, 3); AddPlayerClass(284, 1552.9593, -1675.6552, 16.1952, 90.5799, 22, 500, 34, 500, 18, 3); AddPlayerClass(285, 1552.9593, -1675.6552, 16.1952, 90.5799, 22, 500, 27, 500, 16, 3); AddPlayerClass(286, 1552.9593, -1675.6552, 16.1952, 90.5799, 22, 500, 27, 500, 18, 3); AddPlayerClass(190, 1552.9593, -1675.6552, 16.1952, 90.5799, 22, 500, 31, 500, 16, 3); AddPlayerClass(124, 1123.7535, -2036.818, 69.8862, 266.0568, 24, 500, 18, 3, 31, 500); AddPlayerClass(125, 1123.7535, -2036.818, 69.8862, 266.0568, 24, 500, 16, 3, 27, 500); AddPlayerClass(126, 1123.7535, -2036.818, 69.8862, 266.0568, 24, 500, 34, 500, 16, 3); AddPlayerClass(127, 1123.7535, -2036.818, 69.8862, 266.0568, 24, 500, 27, 500, 18, 3); AddPlayerClass(150, 1123.7535, -2036.818, 69.8862, 266.0568, 24, 500, 27, 500, 18, 3); AddPlayerClass(211, 1123.7535, -2036.818, 69.8862, 266.0568, 24, 500, 34, 500, 16, 3); AddPlayerClass(111, 2129.9758, -2280.9144, 20.6643, 314.1781, 27, 500, 16, 3, 23, 500); AddPlayerClass(112, 2129.9758, -2280.9144, 20.6643, 314.1781, 34, 500, 18, 3, 23, 500); AddPlayerClass(113, 2129.9758, -2280.9144, 20.6643, 314.1781, 30, 500, 16, 3, 23, 500); 3. Добавляем в public OnPlayerSpawn
Цитата (Код) new randspawn = random(sizeof(gRandomPlayerSpawns)); SetPlayerPos(playerid, gRandomPlayerSpawns[randspawn][0], gRandomPlayerSpawns[randspawn][1], gRandomPlayerSpawns[rrandspawn][2]); SetPlayerFacingAngle(playerid, gRandomPlayerSpawns[randspawn][3]); Во 2. коде
1. ( ID 114 ) - это ид скина 2. ( Координаты ) - координаты позиций 3. ( ID оружия ) - ид оружия |
|