RU/setPedFightingStyle: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
No edit summary
No edit summary
Line 12: Line 12:
*'''thePed:''' Пед, у которого вы хотите изменить стиль драки.
*'''thePed:''' Пед, у которого вы хотите изменить стиль драки.
*'''style:''' ID стиля.
*'''style:''' ID стиля.
{{Fighting Styles}}
{{RU/Fighting Styles}}


===Возвращения===
===Возвращения===

Revision as of 18:33, 10 August 2012

Warning.png This page requires local translation. If page will remain not translated in reasonable period of time it would be deleted.
After translating the page completely, please remove the ‎{{translate}}‎ tag from the page.

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

Синтакс

bool setPedFightingStyle ( ped thePed, int style )

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

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

Template:RU/Fighting Styles

Возвращения

Возвращает 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 )

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