RU/setPedFightingStyle

From Multi Theft Auto: Wiki
Revision as of 18:05, 8 July 2010 by Damage22 (talk | contribs) (Created page with '__NOTOC__ {{RU/Server function}} {{translate}} Изменяет стиль драки педа. Большинство стилей влияют только на специал…')
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

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).

Syntax

bool setPedFightingStyle ( ped thePed, int style )

Required Arguments

  • thePed: The ped whose fighting style to change.
  • style: The fighting style ID to apply.

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

Returns

Returns true in case of success, false otherwise.

Example

This example sets the player's fighting style to the desired style when he types "setstyle" followed by a number from 4 to 16 in console.

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 )

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