HU/getPedAmmoInClip: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
|||
Line 1: | Line 1: | ||
__NOTOC__ | __NOTOC__ | ||
{{ | {{Shared function hu}} | ||
Ez a function visszaad egy integert, mely tartalmazza egy meghatározott [[ped]] fegyverének lőszerét. Lásd [[weapon|Weapon Info]] | |||
== | ==Szintaxis== | ||
<syntaxhighlight lang="lua"> | <syntaxhighlight lang="lua"> | ||
int getPedAmmoInClip ( ped thePed [, int weaponSlot = current ] ) | int getPedAmmoInClip ( ped thePed [, int weaponSlot = current ] ) | ||
Line 10: | Line 10: | ||
{{OOP||[[ped]]:getAmmoInClip|ammoInClip}} | {{OOP||[[ped]]:getAmmoInClip|ammoInClip}} | ||
=== | ===Kötelező paraméterek=== | ||
*'''thePed:''' | *'''thePed:''' A [[ped]], akinek a lőszerét ellenőrizni szeretné. | ||
=== | ===Tetszőleges paraméterek=== | ||
*'''weaponSlot:''' an integer representing the weapon slot (set to the ped's currently selected slot if not specified). | *'''weaponSlot:''' an integer representing the weapon slot (set to the ped's currently selected slot if not specified). | ||
=== | ===Visszatérési érték=== | ||
Returns an [[int]] containing the amount of ammo in the specified ped's currently selected or specified clip, or 0 if the ped specified is invalid. | Returns an [[int]] containing the amount of ammo in the specified ped's currently selected or specified clip, or 0 if the ped specified is invalid. | ||
== | ==Példa== | ||
This example outputs the amount of ammo the specified player has in his current slot. | This example outputs the amount of ammo the specified player has in his current slot. Például: 'ammo someguy'. | ||
<syntaxhighlight lang="lua"> | <syntaxhighlight lang="lua"> | ||
function showAmmo(thePlayer, command, who ) | function showAmmo(thePlayer, command, who ) | ||
Line 39: | Line 39: | ||
}} | }} | ||
== | ==Lásd még== | ||
{{Client_ped_functions_hu}} | {{Client_ped_functions_hu}} | ||
[[en:getPedAmmoInClip]] | [[en:getPedAmmoInClip]] | ||
==Fordította== | |||
* '''''[https://wiki.multitheftauto.com/wiki/User:Surge Surge]''''' |
Revision as of 16:53, 8 October 2018
Ez a function visszaad egy integert, mely tartalmazza egy meghatározott ped fegyverének lőszerét. Lásd Weapon Info
Szintaxis
int getPedAmmoInClip ( ped thePed [, int weaponSlot = current ] )
OOP Syntax Help! I don't understand this!
- Method: ped:getAmmoInClip(...)
- Variable: .ammoInClip
Kötelező paraméterek
- thePed: A ped, akinek a lőszerét ellenőrizni szeretné.
Tetszőleges paraméterek
- weaponSlot: an integer representing the weapon slot (set to the ped's currently selected slot if not specified).
Visszatérési érték
Returns an int containing the amount of ammo in the specified ped's currently selected or specified clip, or 0 if the ped specified is invalid.
Példa
This example outputs the amount of ammo the specified player has in his current slot. Például: 'ammo someguy'.
function showAmmo(thePlayer, command, who ) local targetPlayer = getPlayerFromName ( who ) if ( thePlayer ) then local ammo = getPedAmmoInClip ( targetPlayer ) outputChatBox ( who .. " has " .. ammo .. " ammo in his active clip" ) else outputChatBox ( "Player '" .. who .. "' not found." ) end end addCommandHandler( "ammo", showAmmo )
Issues
Issue ID | Description |
---|---|
#7719 | getPedTotalAmmo() & getPedAmmoInClip() serverside sometimes return invalid values |
Lásd még
- HU/addPedClothes
- HU/canPedBeKnockedOffBike
- HU/createPed
- HU/getPedAmmoInClip
- HU/getPedAnalogControlState
- HU/getPedAnimation
- HU/getPedArmor
- HU/getPedBonePosition
- HU/getPedCameraRotation
- HU/getPedClothes
- HU/getPedContactElement
- HU/getPedControlState
- HU/getPedMoveState
- HU/getPedOccupiedVehicle
- HU/getPedOccupiedVehicleSeat
- HU/getPedOxygenLevel
- HU/getPedSimplestTask
- HU/getPedStat
- HU/getPedTarget
- HU/getPedTargetCollision
- HU/getPedTargetEnd
- HU/getPedTargetStart
- HU/getPedTask
- HU/getPedTotalAmmo
- HU/getPedVoice
- HU/getPedWalkingStyle
- HU/getPedWeapon
- HU/getPedWeaponMuzzlePosition
- HU/getPedWeaponSlot
- HU/getValidPedModels
- HU/givePedWeapon
- HU/isPedChoking
- HU/isPedDead
- HU/isPedDoingGangDriveby
- HU/isPedDoingTask
- HU/isPedDucked
- HU/isPedHeadless
- HU/isPedInVehicle
- HU/isPedOnFire
- HU/isPedOnGround
- HU/isPedWearingJetpack
- HU/killPed
- HU/removePedClothes
- HU/removePedFromVehicle
- HU/setAnalogControlState
- HU/setPedAimTarget
- HU/setPedAnalogControlState
- HU/setPedAnimation
- HU/setPedAnimationProgress
- HU/setPedCameraRotation
- HU/setPedCanBeKnockedOffBike
- HU/setPedControlState
- HU/setPedDoingGangDriveby
- HU/setPedFootBloodEnabled
- HU/setPedHeadless
- HU/setPedLookAt
- HU/setPedOnFire
- HU/setPedOxygenLevel
- HU/setPedStat
- HU/setPedTargetingMarkerEnabled
- HU/setPedVoice
- HU/setPedWalkingStyle
- HU/setPedWeaponSlot
- HU/warpPedIntoVehicle