Оружие: Difference between revisions
		
		
		
		
		
		Jump to navigation
		Jump to search
		
				
		
		
	
m (→Также смотрите)  | 
				No edit summary  | 
				||
| Line 1: | Line 1: | ||
'''Функциям скриптинга, которые запрашивают ID оружия, требуется целое число, взятое из списка ID оружий GTASA.   | {{Translate|ru}}  | ||
'''Функциям скриптинга, которые запрашивают ID оружия, требуется целое число, взятое из списка ID оружий GTASA. Они перечислены ниже.'''  | |||
<br>  | <br>  | ||
*''  | *''ПРИМЕЧАНИЯ:  | ||
**''Вместимость обоймы, указанная внутри (),   | **''Вместимость обоймы, указанная внутри (), указывает общую вместимость обойм, когда оружие находится в двух руках. Оружие без этой характеристики - не двуручное оружие.''  | ||
**''[[Weapon_skill_levels|  | **''[[Weapon_skill_levels|Навыки владения оружием]] GTASA влияет на передвижение, точность, урон и возможность брать оружие в две руки. Смотрите [[RU/setPedStat|setPedStat]], чтобы узнать как их изменять.<br/>Сервер MTA поставляется вместе с ресурсом "defaultStats", который устанавливает все навыки владения оружием GTASA на 999. Смотрите [[Weapon_skill_levels|Навыки владения оружием]] для получения подробной информации.''  | ||
**''Для получения информации по причинам смерти, в особенности при использовании обработчиков события onPlayerWasted   | **''Для получения информации по причинам смерти, в особенности при использовании обработчиков события onPlayerWasted и ему подобных, также взгляните на [[Причины смерти]].  | ||
<br>  | <br>  | ||
{|  | {|class="wikitable" style="text-align:center; margin: 1em auto 1em auto;"  | ||
|-  | |-  | ||
| style="background:#  | | width="230" style="background:#8f8f8f;"|  | ||
!   | ! width="150" scope="col" style="background:#8f8f8f;"| Оружие  | ||
! width="50" scope="col" style="background:#8f8f8f;"| ID  | |||
!   | ! width="70" scope="col" style="background:#8f8f8f;"| Обойма  | ||
! width="70" scope="col" style="background:#8f8f8f;"| ID модели  | |||
! width="300" scope="col" style="background:#8f8f8f;"| Slot ammo shared?  | |||
! scope="col" style="background:#  | |||
!   | |||
|-  | |-  | ||
! scope="row" style="background:#cfcfcf;"| Слот 0: Нет оружия  | ! rowspan="2" scope="row" style="background:#cfcfcf;"| Слот 0: Нет оружия  | ||
|style="background:#cfcfcf;"|  | |style="background:#cfcfcf;"|Кулак  | ||
|style="background:#cfcfcf;"|0  | |style="background:#cfcfcf;"|0  | ||
|style="background:#cfcfcf;" align="center" scope="col" |  | |||
|style="background:#cfcfcf;"|  | |style="background:#cfcfcf;"|  | ||
|style="background:#cfcfcf;"  | |style="background:#cfcfcf;" rowspan="2" |  | ||
|-  | |-  | ||
|style="background:#cfcfcf;"|Кастет  | |||
|style="background:#cfcfcf;"|  | |||
|style="background:#cfcfcf;"|1  | |style="background:#cfcfcf;"|1  | ||
|style="background:#cfcfcf;"|  | |style="background:#cfcfcf;"|  | ||
|style="background:#cfcfcf;"|331  | |style="background:#cfcfcf;"|331  | ||
|-  | |-  | ||
! scope="row" style="background:#efefef;"| Слот 1: Холодное оружие  | ! rowspan="8" scope="row" style="background:#efefef;"| Слот 1: Холодное оружие  | ||
|style="background:#efefef;"|  | |style="background:#efefef;"|Клюшка для гольфа  | ||
|style="background:#efefef;"|2  | |style="background:#efefef;"|2  | ||
|style="background:#efefef;"|  | |style="background:#efefef;"|  | ||
|style="background:#efefef;"|333  | |style="background:#efefef;"|333  | ||
|rowspan="8" style="background:#efefef;" |  | |||
|  | |||
|-  | |-  | ||
|style="background:#efefef;"|Nightstick  | |style="background:#efefef;"|Nightstick  | ||
|style="background:#efefef;"|3  | |style="background:#efefef;"|3  | ||
|style="background:#efefef;"|  | |style="background:#efefef;"|  | ||
|style="background:#efefef;"|334  | |style="background:#efefef;"|334  | ||
|-  | |-  | ||
|style="background:#efefef;"|Нож  | |||
|style="background:#efefef;"|  | |||
|style="background:#efefef;"|4  | |style="background:#efefef;"|4  | ||
|style="background:#efefef;"|  | |style="background:#efefef;"|  | ||
|style="background:#efefef;"|335  | |style="background:#efefef;"|335  | ||
|-  | |-  | ||
|style="background:#efefef;"|Бейсбольная бита  | |||
|style="background:#efefef;"|  | |||
|style="background:#efefef;"|5  | |style="background:#efefef;"|5  | ||
|style="background:#efefef;"|  | |style="background:#efefef;"|  | ||
|style="background:#efefef;"|336  | |style="background:#efefef;"|336  | ||
|-  | |-  | ||
|style="background:#efefef;"|Лопата  | |||
|style="background:#efefef;"|  | |||
|style="background:#efefef;"|6  | |style="background:#efefef;"|6  | ||
|style="background:#efefef;"|  | |style="background:#efefef;"|  | ||
|style="background:#efefef;"|337  | |style="background:#efefef;"|337  | ||
|-  | |-  | ||
|style="background:#efefef;"|Кий  | |||
|style="background:#efefef;"|  | |||
|style="background:#efefef;"|7  | |style="background:#efefef;"|7  | ||
|style="background:#efefef;"|  | |style="background:#efefef;"|  | ||
|style="background:#efefef;"|338  | |style="background:#efefef;"|338  | ||
|-  | |-  | ||
|style="background:#efefef;"|Катана  | |||
|style="background:#efefef;"|  | |||
|style="background:#efefef;"|8  | |style="background:#efefef;"|8  | ||
|style="background:#efefef;"|  | |style="background:#efefef;"|  | ||
|style="background:#efefef;"|339  | |style="background:#efefef;"|339  | ||
|-  | |-  | ||
|style="background:#efefef;"|Бензопила  | |||
|style="background:#efefef;"|  | |||
|style="background:#efefef;"|9  | |style="background:#efefef;"|9  | ||
|style="background:#efefef;"|  | |style="background:#efefef;"|  | ||
|style="background:#efefef;"|341  | |style="background:#efefef;"|341  | ||
|-  | |-  | ||
! scope="row" style="background:#cfcfcf;"| Слот 2: Пистолеты  | ! rowspan="3" scope="row" style="background:#cfcfcf;"| Слот 2: Пистолеты  | ||
|style="background:#cfcfcf;"|  | |style="background:#cfcfcf;"|Пистолет  | ||
|style="background:#cfcfcf;"|22  | |style="background:#cfcfcf;"|22  | ||
|style="background:#cfcfcf;"|17 (34)  | |style="background:#cfcfcf;"|17 (34)  | ||
|style="background:#cfcfcf;"|346  | |style="background:#cfcfcf;"|346  | ||
|rowspan="3" style="background:#cfcfcf;" | '''Нет'''<br/>''Replacing handgun resets slot 2 ammo''  | |||
|-  | |-  | ||
|style="background:#cfcfcf;"|Пистолет с глушителем  | |||
|style="background:#cfcfcf;"|  | |||
|style="background:#cfcfcf;"|23  | |style="background:#cfcfcf;"|23  | ||
|style="background:#cfcfcf;"|17  | |style="background:#cfcfcf;"|17  | ||
|style="background:#cfcfcf;"|347  | |style="background:#cfcfcf;"|347  | ||
|-  | |-  | ||
|style="background:#cfcfcf;"|Desert Eagle    | |style="background:#cfcfcf;"|Desert Eagle    | ||
|style="background:#cfcfcf;"|24  | |style="background:#cfcfcf;"|24  | ||
|style="background:#cfcfcf;"|7  | |style="background:#cfcfcf;"|7  | ||
|style="background:#cfcfcf;"|348  | |style="background:#cfcfcf;"|348  | ||
|-  | |-  | ||
! scope="row" style="background:#efefef;"| Слот 3: Дробовики  | ! rowspan="3" scope="row" style="background:#efefef;"| Слот 3: Дробовики  | ||
|style="background:#efefef;"|  | |style="background:#efefef;"|Дробовик  | ||
|style="background:#efefef;"|25  | |style="background:#efefef;"|25  | ||
|style="background:#efefef;"|1  | |style="background:#efefef;"|1  | ||
|style="background:#efefef;"|349  | |style="background:#efefef;"|349  | ||
|rowspan="3" style="background:#efefef;" | Да  | |||
|-  | |-  | ||
|style="background:#efefef;"|Обрез  | |||
|style="background:#efefef;"|  | |||
|style="background:#efefef;"|26  | |style="background:#efefef;"|26  | ||
|style="background:#efefef;"|2 (4)  | |style="background:#efefef;"|2 (4)  | ||
|style="background:#efefef;"|350  | |style="background:#efefef;"|350  | ||
|-  | |-  | ||
|style="background:#efefef;"|SPAZ-12 Combat Shotgun  | |style="background:#efefef;"|SPAZ-12 Combat Shotgun  | ||
|style="background:#efefef;"|27  | |style="background:#efefef;"|27  | ||
|style="background:#efefef;"|7  | |style="background:#efefef;"|7  | ||
|style="background:#efefef;"|351  | |style="background:#efefef;"|351  | ||
|-  | |-  | ||
! scope="row" style="background:#cfcfcf;"| Слот 4: Пистолеты-  | ! rowspan="3" scope="row" style="background:#cfcfcf;"| Слот 4: Пистолеты-пулемёты  | ||
|style="background:#cfcfcf;"|Uzi  | |style="background:#cfcfcf;"|Uzi  | ||
|style="background:#cfcfcf;"|28  | |style="background:#cfcfcf;"|28  | ||
|style="background:#cfcfcf;"|50 (100)  | |style="background:#cfcfcf;"|50 (100)  | ||
|style="background:#cfcfcf;"|352  | |style="background:#cfcfcf;"|352  | ||
|rowspan="3" style="background:#cfcfcf;" | Да  | |||
|-  | |-  | ||
|style="background:#cfcfcf;"|MP5  | |style="background:#cfcfcf;"|MP5  | ||
|style="background:#cfcfcf;"|29  | |style="background:#cfcfcf;"|29  | ||
|style="background:#cfcfcf;"|30  | |style="background:#cfcfcf;"|30  | ||
|style="background:#cfcfcf;"|353  | |style="background:#cfcfcf;"|353  | ||
|-  | |-  | ||
|style="background:#cfcfcf;"|TEC-9  | |style="background:#cfcfcf;"|TEC-9  | ||
|style="background:#cfcfcf;"|32  | |style="background:#cfcfcf;"|32  | ||
|style="background:#cfcfcf;"|50 (100)  | |style="background:#cfcfcf;"|50 (100)  | ||
|style="background:#cfcfcf;"|372  | |style="background:#cfcfcf;"|372  | ||
|-  | |-  | ||
! scope="row" style="background:#efefef;"| Слот 5: Штурмовые винтовки  | ! rowspan="2" scope="row" style="background:#efefef;"| Слот 5: Штурмовые винтовки  | ||
|style="background:#efefef;"|AK-47  | |style="background:#efefef;"|AK-47  | ||
|style="background:#efefef;"|30  | |style="background:#efefef;"|30  | ||
|style="background:#efefef;"|30  | |style="background:#efefef;"|30  | ||
|style="background:#efefef;"|355  | |style="background:#efefef;"|355  | ||
|rowspan="2" style="background:#efefef;" | Да  | |||
|-  | |-  | ||
|style="background:#efefef;"|M4  | |style="background:#efefef;"|M4  | ||
|style="background:#efefef;"|31  | |style="background:#efefef;"|31  | ||
|style="background:#efefef;"|50  | |style="background:#efefef;"|50  | ||
|style="background:#efefef;"|356  | |style="background:#efefef;"|356  | ||
! scope="row" style="background:#efefef;"|  | |-  | ||
|style="background:#efefef;"|  | ! rowspan="2" cope="row" style="background:#cfcfcf;"| Слот 6: Винтовки  | ||
|style="background:#cfcfcf;"|Деревенская винтовка  | |||
|style="background:#cfcfcf;"|33  | |||
|style="background:#cfcfcf;"|1  | |||
|style="background:#cfcfcf;"|357  | |||
|rowspan="2" style="background:#cfcfcf;" | '''Нет'''<br/>''Replacing rifle resets slot 6 ammo''  | |||
|-  | |||
|style="background:#cfcfcf;"|Снайперская винтовка  | |||
|style="background:#cfcfcf;"|34  | |||
|style="background:#cfcfcf;"|1  | |||
|style="background:#cfcfcf;"|358  | |||
|-  | |||
! rowspan="4" scope="row" style="background:#efefef;"| Слот 7: Тяжёлое оружие  | |||
|style="background:#efefef;"|Гранатомёт  | |||
|style="background:#efefef;"|35  | |||
|style="background:#efefef;"|1  | |||
|style="background:#efefef;"|359  | |||
|rowspan="4" style="background:#efefef;" | '''Нет'''<br/>''Replacing heavy weapon resets slot 7 ammo''  | |||
|-  | |||
|style="background:#efefef;"|Heat-Seeking RPG  | |||
|style="background:#efefef;"|36  | |||
|style="background:#efefef;"|1  | |||
|style="background:#efefef;"|360  | |||
|-  | |||
|style="background:#efefef;"|Огнемёт  | |||
|style="background:#efefef;"|37  | |||
|style="background:#efefef;"|50  | |||
|style="background:#efefef;"|361  | |||
|-  | |||
|style="background:#efefef;"|Minigun  | |||
|style="background:#efefef;"|38  | |||
|style="background:#efefef;"|500  | |||
|style="background:#efefef;"|362  | |||
|-  | |||
! rowspan="4" scope="row" style="background:#cfcfcf;"| Слот 8: Снаряды  | |||
|style="background:#cfcfcf;"|Граната  | |||
|style="background:#cfcfcf;"|16  | |||
|style="background:#cfcfcf;"|1  | |||
|style="background:#cfcfcf;"|342  | |||
|rowspan="4" style="background:#cfcfcf;" | '''Нет'''<br/>''Replacing projectile resets slot 8 ammo''  | |||
|-  | |||
|style="background:#cfcfcf;"|Слезоточивый газ  | |||
|style="background:#cfcfcf;"|17  | |||
|style="background:#cfcfcf;"|1  | |||
|style="background:#cfcfcf;"|343  | |||
|-  | |||
|style="background:#cfcfcf;"|Коктейль Молотова  | |||
|style="background:#cfcfcf;"|18  | |||
|style="background:#cfcfcf;"|1  | |||
|style="background:#cfcfcf;"|344  | |||
|-  | |||
|style="background:#cfcfcf;"|Satchel Charges  | |||
|style="background:#cfcfcf;"|39  | |||
|style="background:#cfcfcf;"|1  | |||
|style="background:#cfcfcf;"|363  | |||
|-  | |||
! rowspan="3" scope="row" style="background:#efefef;"| Слот 9: Специальное 1  | |||
|style="background:#efefef;"|Газовый баллончик  | |||
|style="background:#efefef;"|41  | |||
|style="background:#efefef;"|500  | |||
|style="background:#efefef;"|365  | |||
|rowspan="3" style="background:#efefef;" | '''Нет'''<br/>''Replacing slot 9 weapon resets slot 9 ammo''  | |||
|-  | |||
|style="background:#efefef;"|Огнетушитель  | |||
|style="background:#efefef;"|42  | |||
|style="background:#efefef;"|500  | |||
|style="background:#efefef;"|366  | |||
|-  | |||
|style="background:#efefef;"|Камера  | |||
|style="background:#efefef;"|43  | |||
|style="background:#efefef;"|36  | |||
|style="background:#efefef;"|367  | |||
|-  | |||
! rowspan="5" scope="row" style="background:#cfcfcf;"| Слот 10: Подарки/Другое  | |||
|style="background:#cfcfcf;"|Длинный фиолетовый дилдо  | |||
|style="background:#cfcfcf;"|10  | |||
|style="background:#cfcfcf;"|  | |||
|style="background:#cfcfcf;"|321  | |||
|rowspan="5" style="background:#cfcfcf;" |  | |||
|-  | |||
|style="background:#cfcfcf;"|Короткий дилдо  | |||
|style="background:#cfcfcf;"|11  | |||
|style="background:#cfcfcf;"|  | |||
|style="background:#cfcfcf;"|322  | |||
|-  | |||
|style="background:#cfcfcf;"|Вибратор  | |||
|style="background:#cfcfcf;"|12  | |||
|style="background:#cfcfcf;"|  | |||
|style="background:#cfcfcf;"|323  | |||
|-  | |||
|style="background:#cfcfcf;"|Цветы  | |||
|style="background:#cfcfcf;"|14  | |||
|style="background:#cfcfcf;"|  | |||
|style="background:#cfcfcf;"|325  | |||
|-  | |||
|style="background:#cfcfcf;"|Трость  | |||
|style="background:#cfcfcf;"|15  | |||
|style="background:#cfcfcf;"|  | |||
|style="background:#cfcfcf;"|326  | |||
|-  | |||
! rowspan="3" scope="row" style="background:#efefef;"| Slot 11: Специальное 2  | |||
|style="background:#efefef;"|Очки ночного видения  | |||
|style="background:#efefef;"|44  | |||
|style="background:#efefef;"|  | |||
|style="background:#efefef;"|368  | |||
|rowspan="3" style="background:#efefef;" |  | |||
|-  | |||
|style="background:#efefef;"|Инфракрасные очки  | |||
|style="background:#efefef;"|45  | |||
|style="background:#efefef;"|  | |||
|style="background:#efefef;"|369  | |||
|-  | |||
|style="background:#efefef;"|Парашют  | |||
|style="background:#efefef;"|46  | |style="background:#efefef;"|46  | ||
|style="background:#efefef;"|  | |style="background:#efefef;"|  | ||
|style="background:#efefef;"|371  | |style="background:#efefef;"|371  | ||
|-  | |-  | ||
!   | ! rowspan="1" scope="row" style="background:#cfcfcf;"| Слот 12: Satchel детонатор  | ||
|style="background:#cfcfcf;"|Satchel детонатор  | |||
|style="background:#cfcfcf;"|Satchel   | |||
|style="background:#cfcfcf;"|40  | |style="background:#cfcfcf;"|40  | ||
|style="background:#cfcfcf;"|  | |style="background:#cfcfcf;"|  | ||
|style="background:#cfcfcf;"|364  | |style="background:#cfcfcf;"|364  | ||
|rowspan="1" style="background:#cfcfcf;" |  | |||
|}  | |}  | ||
==  | ==Функции клиента==  | ||
{{RU/Client_weapon_functions}}  | |||
[[Category:ID   | ==Функции сервера==  | ||
{{RU/Weapon functions}}  | |||
[[Category:Списки ID]]  | |||
[[en:Weapons]]  | [[en:Weapons]]  | ||
[[it:Armi]]  | [[it:Armi]]  | ||
[[de:Waffen]]  | |||
Revision as of 09:27, 20 September 2014
| 
 Статью необходимо перевести на русский язык. Если страница не будет переведена в разумные сроки, она будет удалена.  | 
Функциям скриптинга, которые запрашивают ID оружия, требуется целое число, взятое из списка ID оружий GTASA. Они перечислены ниже.
- ПРИМЕЧАНИЯ:
- Вместимость обоймы, указанная внутри (), указывает общую вместимость обойм, когда оружие находится в двух руках. Оружие без этой характеристики - не двуручное оружие.
 - Навыки владения оружием GTASA влияет на передвижение, точность, урон и возможность брать оружие в две руки. Смотрите setPedStat, чтобы узнать как их изменять.
Сервер MTA поставляется вместе с ресурсом "defaultStats", который устанавливает все навыки владения оружием GTASA на 999. Смотрите Навыки владения оружием для получения подробной информации. - Для получения информации по причинам смерти, в особенности при использовании обработчиков события onPlayerWasted и ему подобных, также взгляните на Причины смерти.
 
 
| Оружие | ID | Обойма | ID модели | Slot ammo shared? | |
|---|---|---|---|---|---|
| Слот 0: Нет оружия | Кулак | 0 | |||
| Кастет | 1 | 331 | |||
| Слот 1: Холодное оружие | Клюшка для гольфа | 2 | 333 | ||
| Nightstick | 3 | 334 | |||
| Нож | 4 | 335 | |||
| Бейсбольная бита | 5 | 336 | |||
| Лопата | 6 | 337 | |||
| Кий | 7 | 338 | |||
| Катана | 8 | 339 | |||
| Бензопила | 9 | 341 | |||
| Слот 2: Пистолеты | Пистолет | 22 | 17 (34) | 346 | Нет Replacing handgun resets slot 2 ammo  | 
| Пистолет с глушителем | 23 | 17 | 347 | ||
| Desert Eagle | 24 | 7 | 348 | ||
| Слот 3: Дробовики | Дробовик | 25 | 1 | 349 | Да | 
| Обрез | 26 | 2 (4) | 350 | ||
| SPAZ-12 Combat Shotgun | 27 | 7 | 351 | ||
| Слот 4: Пистолеты-пулемёты | Uzi | 28 | 50 (100) | 352 | Да | 
| MP5 | 29 | 30 | 353 | ||
| TEC-9 | 32 | 50 (100) | 372 | ||
| Слот 5: Штурмовые винтовки | AK-47 | 30 | 30 | 355 | Да | 
| M4 | 31 | 50 | 356 | ||
| Слот 6: Винтовки | Деревенская винтовка | 33 | 1 | 357 | Нет Replacing rifle resets slot 6 ammo  | 
| Снайперская винтовка | 34 | 1 | 358 | ||
| Слот 7: Тяжёлое оружие | Гранатомёт | 35 | 1 | 359 | Нет Replacing heavy weapon resets slot 7 ammo  | 
| Heat-Seeking RPG | 36 | 1 | 360 | ||
| Огнемёт | 37 | 50 | 361 | ||
| Minigun | 38 | 500 | 362 | ||
| Слот 8: Снаряды | Граната | 16 | 1 | 342 | Нет Replacing projectile resets slot 8 ammo  | 
| Слезоточивый газ | 17 | 1 | 343 | ||
| Коктейль Молотова | 18 | 1 | 344 | ||
| Satchel Charges | 39 | 1 | 363 | ||
| Слот 9: Специальное 1 | Газовый баллончик | 41 | 500 | 365 | Нет Replacing slot 9 weapon resets slot 9 ammo  | 
| Огнетушитель | 42 | 500 | 366 | ||
| Камера | 43 | 36 | 367 | ||
| Слот 10: Подарки/Другое | Длинный фиолетовый дилдо | 10 | 321 | ||
| Короткий дилдо | 11 | 322 | |||
| Вибратор | 12 | 323 | |||
| Цветы | 14 | 325 | |||
| Трость | 15 | 326 | |||
| Slot 11: Специальное 2 | Очки ночного видения | 44 | 368 | ||
| Инфракрасные очки | 45 | 369 | |||
| Парашют | 46 | 371 | |||
| Слот 12: Satchel детонатор | Satchel детонатор | 40 | 364 | 
Функции клиента
Функции сервера
Серверные функции
- giveWeapon - дает указанное оружие игроку или пешеходу
 - takeAllWeapons - удаляет всё оружие с указанного игрока или пешехода
 - takeWeapon - удаляет указанное оружие или боеприпасы с игрока или пешехода
 
Клиентские функции
Общие функции
- getOriginalWeaponProperty - получает исходное свойство указанного типа оружия
 - getPickupWeapon - получает ID оружия из указанного пикапа
 - getSlotFromWeapon - получает слот к которому принадлежит оружие
 - getWeaponIDFromName - получает ID оружия из его названия
 - getWeaponNameFromID - получает название оружия или причину смерти из его ID
 - getWeaponProperty - получает свойство указанного оружия
 - setWeaponAmmo - устанавливает определенное кол-во боеприпасов для указанного оружия
 - setWeaponProperty - устанавливает свойство указанного типа оружия