RU/setPedFightingStyle

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

Изменяет стиль драки педа. Большинство стилей влияют только на специальную атаку, которая выполняется по связке кнопок прицеливания (правая кнопка мыши) и Enter (F).

Синтакс

bool setPedFightingStyle ( ped thePed, int style )

Обязательные аргументы

  • thePed: Пед, у которого вы хотите изменить стиль драки.
  • style: ID стиля.

Fighting Styles:

Fighting Style ID
STYLE_STANDARD 4
STYLE_BOXING 5
STYLE_KUNG_FU 6
STYLE_KNEE_HEAD 7
STYLE_GRAB_KICK 15
STYLE_ELBOWS 16

Возвращения

Возвращает true при успешном выполнении, false при ошибке.

Пример

Этот пример устанавливает стиль драки у игрока командой "setstyle" в консоли.

function consoleSetFightingStyle ( thePlayer, commandName, id )
	if thePlayer and id then                                                     -- If player and ID are specified
		local status = setPedFightingStyle ( thePlayer, tonumber(id) )       -- set the fighting style
		if not status then                                                   -- if that failed
			outputConsole ( "Failed to set fighting style.", thePlayer ) -- show a message
		end
	end
end
addCommandHandler ( "setstyle",  consoleSetFightingStyle )

Смотрите также