ZH-CN/Server Scripting Functions: Difference between revisions
Jump to navigation
Jump to search
Qwe7769611 (talk | contribs) No edit summary |
m (Добавление языков) |
||
(4 intermediate revisions by one other user not shown) | |||
Line 20: | Line 20: | ||
{{ACL_functions}} | {{ACL_functions}} | ||
== | ==管理员函数== | ||
{{Admin_functions}} | {{Admin_functions}} | ||
== | ==音频函数== | ||
{{Audio_functions}} | {{Audio_functions}} | ||
== | ==公告函数== | ||
{{Announce_functions}} | {{Announce_functions}} | ||
== | ==雷达图标函数== | ||
{{Blip_functions}} | {{Blip_functions}} | ||
== | ==摄像机函数== | ||
{{Camera_functions}} | {{Camera_functions}} | ||
== | ==衣服和身体函数== | ||
{{Clothes_and_body_functions}} | {{Clothes_and_body_functions}} | ||
== | ==立方体函数== | ||
{{Collision_shape_functions}} | {{Collision_shape_functions}} | ||
== | ==鼠标函数== | ||
{{Cursor_functions}} | {{Cursor_functions}} | ||
== | ==元素函数== | ||
{{Element_functions}} | {{Element_functions}} | ||
== | ==事件函数== | ||
{{Event_functions}} | {{Event_functions}} | ||
== | ==爆炸函数== | ||
{{Explosion_functions}} | {{Explosion_functions}} | ||
== | ==文件函数== | ||
{{File_functions}} | {{File_functions}} | ||
== | ==HTTP网页函数== | ||
{{HTTP_functions}} | {{HTTP_functions}} | ||
== | ==输入函数== | ||
{{Input_functions}} | {{Input_functions}} | ||
== | ==地图函数== | ||
{{Map_functions}} | {{Map_functions}} | ||
== | ==标记点函数== | ||
{{Marker_functions}} | {{Marker_functions}} | ||
== | ==矩阵函数== | ||
{{Shared_matrix_functions}} | {{Shared_matrix_functions}} | ||
== | ==模块函数== | ||
{{Module_functions}} | {{Module_functions}} | ||
== | ==Object函数== | ||
{{Object_functions}} | {{Object_functions}} | ||
== | ==输出函数== | ||
{{Output_functions}} | {{Output_functions}} | ||
== | ==行人函数== | ||
{{Ped_functions}} | {{Ped_functions}} | ||
== | ==拾取函数== | ||
{{Pickup_functions}} | {{Pickup_functions}} | ||
== | ==玩家函数== | ||
{{Player_functions}} | {{Player_functions}} | ||
== | ==射弹函数== | ||
{{Projectile_functions}} | {{Projectile_functions}} | ||
== | ==雷达区域函数== | ||
{{Radar_area_functions}} | {{Radar_area_functions}} | ||
== | ==资源函数== | ||
{{Resource_functions}} | {{Resource_functions}} | ||
== | ==服务端函数== | ||
{{Server_functions}} | {{Server_functions}} | ||
== | ==设置注册表函数== | ||
{{Settings_registry_functions}} | {{Settings_registry_functions}} | ||
== | ==SQL数据库函数== | ||
{{SQL_functions}} | {{SQL_functions}} | ||
== | ==团队函数== | ||
{{Team_functions}} | {{Team_functions}} | ||
== | ==文本函数== | ||
{{Text_functions}} | {{Text_functions}} | ||
== | ==效用函数== | ||
{{Utility_functions}} | {{Utility_functions}} | ||
== | ==UTF8库== | ||
{{UTF8_functions}} | {{UTF8_functions}} | ||
== | ==载具函数== | ||
{{Vehicle_functions}} | {{Vehicle_functions}} | ||
== | ==水函数== | ||
{{Water_functions}} | {{Water_functions}} | ||
== | ==武器函数== | ||
{{Weapon_functions}} | {{Weapon_functions}} | ||
== | ==世界物件函数== | ||
{{World_functions}} | {{World_functions}} | ||
== | ==XML函数== | ||
{{XML_functions}} | {{XML_functions}} | ||
[[en:Server Scripting Functions]] | |||
[[ru:Server Scripting Functions]] | |||
[[hu:Server Scripting Functions]] | [[hu:Server Scripting Functions]] | ||
[[de:Server-Seitige Scripting Funktionen]] | [[de:Server-Seitige Scripting Funktionen]] | ||
[[es:Funciones_del_Server]] | [[es:Funciones_del_Server]] | ||
[[pl:Server Scripting Functions]] | [[pl:Server Scripting Functions]] | ||
[[pt-br:Funções de Scripting do Servidor]] | [[pt-br:Funções de Scripting do Servidor]] | ||
[[tr:Server Scripting Functions]] | [[tr:Server Scripting Functions]] | ||
[[ar:Server Scripting Functions]] | |||
[[zh-cn:Server Scripting Functions]] | [[zh-cn:Server Scripting Functions]] |
Latest revision as of 16:18, 11 April 2021
Contributors: Did you create a page but it's not on this list? Confused? Read: Adding Pages to Categories and Templates
此页列出了所有已实现并可用作本机函数的服务器端脚本函数。要请求函数或事件, 请使用 Requested Functions and Events 或 https://bugs.mtasa.com.
请注意,还可以通过加载提供新功能的动态模块(如实用程序函数)来扩展脚本函数。这些脚本函数是非本机的,需要加载“模块”才能工作。
请转到Modules,查看可用的非本机服务器端函数和模块的列表.
有关更多函数, 请查看 useful functions page.
客户端脚本函数可以在这里找到: Client Scripting Functions.
账户函数
- addAccount
- copyAccountData
- getAccount
- getAccountData
- getAccountName
- getAccountPlayer
- getAccountSerial
- getAccounts
- getAccountsBySerial
- getAllAccountData
- getPlayerAccount
- isGuestAccount
- logIn
- logOut
- removeAccount
- setAccountData
- setAccountPassword
- getAccountByID
- getAccountID
- getAccountIP
- getAccountsByData
- getAccountsByIP
- setAccountName
ACL 函数
- aclCreate
- aclCreateGroup
- aclDestroy
- aclDestroyGroup
- aclGet
- aclGetGroup
- aclGetName
- aclGetRight
- aclGroupAddACL
- aclGroupAddObject
- aclGroupGetName
- aclGroupList
- aclGroupListACL
- aclGroupListObjects
- aclGroupRemoveACL
- aclGroupRemoveObject
- aclList
- aclListRights
- aclReload
- aclRemoveRight
- aclSave
- aclSetRight
- hasObjectPermissionTo
- isObjectInACLGroup
管理员函数
- addBan
- banPlayer
- getBanAdmin
- getBanIP
- getBanNick
- getBanReason
- getBanSerial
- getBanTime
- getBanUsername
- getBans
- getUnbanTime
- isBan
- kickPlayer
- setBanAdmin
- setBanNick
- setBanReason
- setUnbanTime
- reloadBans
- removeBan
音频函数
公告函数
雷达图标函数
- createBlip
- createBlipAttachedTo
- getBlipColor
- getBlipIcon
- getBlipOrdering
- getBlipSize
- getBlipVisibleDistance
- setBlipColor
- setBlipIcon
- setBlipOrdering
- setBlipSize
- setBlipVisibleDistance
摄像机函数
- fadeCamera
- getCameraInterior
- getCameraMatrix
- getCameraTarget
- setCameraInterior
- setCameraMatrix
- setCameraTarget
衣服和身体函数
- addPedClothes
- getBodyPartName
- getClothesByTypeIndex
- getClothesTypeName
- getPedClothes
- getTypeIndexFromClothes
- removePedClothes
立方体函数
- addColPolygonPoint
- createColCircle
- createColCuboid
- createColPolygon
- createColRectangle
- createColSphere
- createColTube
- getColPolygonHeight
- getColPolygonPoints
- getColPolygonPointPosition
- getColShapeType
- getColShapeRadius
- getColShapeSize
- getElementColShape
- getElementsWithinColShape
- isElementWithinColShape
- isInsideColShape
- removeColPolygonPoint
- setColPolygonHeight
- setColPolygonPointPosition
- setColShapeRadius
- setColShapeSize
鼠标函数
元素函数
- attachElements
- createElement
- destroyElement
- detachElements
- getAttachedElements
- getElementAlpha
- getElementAttachedOffsets
- getElementAttachedTo
- getElementByIndex
- getElementByID
- getElementChild
- getElementChildren
- getElementChildrenCount
- getElementCollisionsEnabled
- getElementColShape
- getElementData
- getAllElementData
- hasElementData
- getElementDimension
- getElementHealth
- getElementID
- getElementInterior
- getElementMatrix
- getElementModel
- getElementParent
- getElementPosition
- getElementRotation
- getElementsByType
- getElementsWithinColShape
- getElementsWithinRange
- getElementType
- getElementVelocity
- getLowLODElement
- getRootElement
- isElement
- isElementAttached
- isElementCallPropagationEnabled
- isElementDoubleSided
- isElementFrozen
- isElementInWater
- isElementLowLOD
- isElementWithinColShape
- isElementWithinMarker
- setElementAlpha
- setElementAngularVelocity
- getElementAngularVelocity
- setElementAttachedOffsets
- setElementCallPropagationEnabled
- setElementCollisionsEnabled
- setElementData
- setElementDimension
- setElementDoubleSided
- setElementFrozen
- setElementHealth
- setElementID
- setElementInterior
- setElementModel
- setElementParent
- setElementPosition
- setElementRotation
- setElementVelocity
- setLowLODElement
- getPedContactElement
- getResourceDynamicElementRoot
- getResourceRootElement
事件函数
- addEvent
- addEventHandler
- cancelEvent
- cancelLatentEvent
- getEventHandlers
- getLatentEventHandles
- getLatentEventStatus
- removeEventHandler
- triggerEvent
- wasEventCancelled
爆炸函数
文件函数
- fileClose
- fileCopy
- fileCreate
- fileDelete
- fileExists
- fileFlush
- fileGetPath
- fileGetPos
- fileGetSize
- fileIsEOF
- fileOpen
- fileRead
- fileRename
- fileSetPos
- fileWrite
HTTP网页函数
These functions can only be used from within lua blocks in HTML pages hosted by the server
- httpClear
- httpRequestLogin
- httpSetResponseCode
- httpSetResponseCookie
- httpSetResponseHeader
- httpWrite
输入函数
- addCommandHandler
- bindKey
- executeCommandHandler
- getCommandHandlers
- getFunctionsBoundToKey
- getKeyBoundToFunction
- isControlEnabled
- removeCommandHandler
- toggleAllControls
- toggleControl
- unbindKey
地图函数
标记点函数
- createMarker
- getMarkerColor
- getMarkerCount
- getMarkerIcon
- getMarkerSize
- getMarkerTarget
- getMarkerType
- setMarkerColor
- setMarkerIcon
- setMarkerSize
- setMarkerTarget
- setMarkerType
- isElementWithinMarker
矩阵函数
模块函数
Object函数
输出函数
行人函数
- addPedClothes
- getPedClothes
- removePedClothes
- createPed
- getPedAmmoInClip
- getPedArmor
- getPedFightingStyle
- getPedOccupiedVehicle
- getPedOccupiedVehicleSeat
- getPedStat
- getPedTarget
- getPedTotalAmmo
- getPedWalkingStyle
- getPedWeapon
- getPedWeaponSlot
- getPedContactElement
- getValidPedModels
- isPedChoking
- isPedDead
- isPedDoingGangDriveby
- isPedDucked
- isPedHeadless
- isPedInVehicle
- isPedOnFire
- isPedOnGround
- isPedWearingJetpack
- killPed
- removePedFromVehicle
- setPedAnimation
- setPedAnimationProgress
- setPedAnimationSpeed
- setPedArmor
- setPedDoingGangDriveby
- setPedFightingStyle
- setPedHeadless
- setPedOnFire
- setPedStat
- setPedWalkingStyle
- setPedWeaponSlot
- warpPedIntoVehicle
拾取函数
玩家函数
- getPlayerTeam
- getPlayerBlurLevel
- setPlayerBlurLevel
- getPlayerSerial
- forcePlayerMap
- getPlayerScriptDebugLevel
- getPlayerFromName
- getPlayerMoney
- getPlayerName
- getPlayerNametagColor
- getPlayerNametagText
- getPlayerPing
- getPlayerWantedLevel
- givePlayerMoney
- isPlayerMapForced
- isPlayerNametagShowing
- setPlayerHudComponentVisible
- setPlayerMoney
- setPlayerNametagColor
- setPlayerNametagShowing
- setPlayerNametagText
- takePlayerMoney
- countPlayersInTeam
- getPlayersInTeam
- isVoiceEnabled
- setControlState
- getControlState
射弹函数
雷达区域函数
- createRadarArea
- getRadarAreaColor
- getRadarAreaSize
- isInsideRadarArea
- isRadarAreaFlashing
- setRadarAreaColor
- setRadarAreaFlashing
- setRadarAreaSize
资源函数
- abortRemoteRequest
- call
- fetchRemote
- getResourceConfig
- getResourceDynamicElementRoot
- getResourceExportedFunctions
- getResourceFromName
- getResourceName
- getResourceRootElement
- getResourceState
- getThisResource
- getRemoteRequests
- getRemoteRequestInfo
服务端函数
- getMaxPlayers
- getServerConfigSetting
- getServerHttpPort
- getServerName
- getServerPassword
- getServerPort
- isGlitchEnabled
- setGlitchEnabled
- setMaxPlayers
- setServerConfigSetting
- setServerPassword
- shutdown
设置注册表函数
SQL数据库函数
团队函数
- countPlayersInTeam
- getPlayerTeam
- getPlayersInTeam
- getTeamColor
- getTeamFriendlyFire
- getTeamFromName
- getTeamName
文本函数
- textCreateDisplay
- textCreateTextItem
- textDestroyDisplay
- textDestroyTextItem
- textDisplayAddObserver
- textDisplayAddText
- textDisplayGetObservers
- textDisplayIsObserver
- textDisplayRemoveObserver
- textDisplayRemoveText
- textItemGetColor
- textItemGetPosition
- textItemGetPriority
- textItemGetScale
- textItemGetText
- textItemSetColor
- textItemSetPosition
- textItemSetPriority
- textItemSetScale
- textItemSetText
效用函数
- addDebugHook
- base64Decode
- base64Encode
- debugSleep
- decodeString
- encodeString
- fromJSON
- generateKeyPair
- getColorFromString
- getDevelopmentMode
- getDistanceBetweenPoints2D
- getDistanceBetweenPoints3D
- getEasingValue
- getNetworkStats
- getNetworkUsageData
- getPerformanceStats
- getRealTime
- getTickCount
- getTimerDetails
- getTimers
- getFPSLimit
- getUserdataType
- getVersion
- gettok
- isTransferBoxVisible
- setTransferBoxVisible
- hash
- inspect
- interpolateBetween
- iprint
- isOOPEnabled
- isTimer
- killTimer
- md5
- passwordHash
- passwordVerify
- pregFind
- pregMatch
- pregReplace
- removeDebugHook
- resetTimer
- setDevelopmentMode
- setFPSLimit
- setTimer
- ref
- deref
- sha256
- split
- teaDecode
- teaEncode
- toJSON
- tocolor
- getProcessMemoryStats
- utfChar
- utfCode
- utfLen
- utfSeek
- utfSub
- bitAnd
- bitNot
- bitOr
- bitXor
- bitTest
- bitLRotate
- bitRRotate
- bitLShift
- bitRShift
- bitArShift
- bitExtract
- bitReplace
UTF8库
- utf8.byte
- utf8.char
- utf8.charpos
- utf8.escape
- utf8.find
- utf8.fold
- utf8.gmatch
- utf8.gsub
- utf8.insert
- utf8.len
- utf8.lower
- utf8.match
- utf8.ncasecmp
- utf8.next
- utf8.remove
- utf8.reverse
- utf8.sub
- utf8.title
- utf8.upper
- utf8.width
- utf8.widthindex
载具函数
- addVehicleUpgrade
- attachTrailerToVehicle
- blowVehicle
- createVehicle
- detachTrailerFromVehicle
- fixVehicle
- getOriginalHandling
- getTrainDirection
- getTrainPosition
- getTrainSpeed
- getTrainTrack
- getVehicleColor
- getVehicleCompatibleUpgrades
- getVehicleController
- getVehicleDoorOpenRatio
- getVehicleDoorState
- getVehicleEngineState
- getVehicleHandling
- getVehicleHeadLightColor
- getVehicleLandingGearDown
- getVehicleLightState
- getVehicleMaxPassengers
- getVehicleModelFromName
- getVehicleName
- getVehicleNameFromModel
- getVehicleOccupant
- getVehicleOccupants
- getVehicleOverrideLights
- getVehiclePaintjob
- getVehiclePanelState
- getVehiclePlateText
- getVehicleSirenParams
- getVehicleSirens
- getVehicleSirensOn
- getVehicleTowedByVehicle
- getVehicleTowingVehicle
- getVehicleTurretPosition
- getVehicleType
- getVehicleUpgradeOnSlot
- getVehicleUpgradeSlotName
- getVehicleUpgrades
- getVehicleVariant
- getVehicleWheelStates
- isTrainDerailable
- isTrainDerailed
- isVehicleBlown
- isVehicleDamageProof
- isVehicleFuelTankExplodable
- isVehicleLocked
- isVehicleOnGround
- isVehicleTaxiLightOn
- removeVehicleUpgrade
- setTrainDerailable
- setTrainDerailed
- setTrainDirection
- setTrainPosition
- setTrainSpeed
- setTrainTrack
- setVehicleColor
- setVehicleDamageProof
- setVehicleDoorOpenRatio
- setVehicleDoorState
- setVehicleDoorsUndamageable
- setVehicleEngineState
- setVehicleFuelTankExplodable
- setVehicleHandling
- setVehicleHeadLightColor
- setVehicleLandingGearDown
- setVehicleLightState
- setVehicleLocked
- setVehicleOverrideLights
- setVehiclePaintjob
- setVehiclePanelState
- setVehiclePlateText
- setVehicleSirens
- setVehicleSirensOn
- setVehicleTaxiLightOn
- setVehicleTurretPosition
- setVehicleVariant
- setVehicleWheelStates
水函数
- createWater
- getWaterColor
- getWaterVertexPosition
- getWaveHeight
- resetWaterColor
- resetWaterLevel
- setWaterColor
- setWaterLevel
- setWaterVertexPosition
- setWaveHeight
武器函数
- getWeaponProperty
- getPickupWeapon
- getOriginalWeaponProperty
- getSlotFromWeapon
- getWeaponIDFromName
- getWeaponNameFromID
- setWeaponAmmo
- setWeaponProperty
世界物件函数
- areTrafficLightsLocked
- getAircraftMaxHeight
- getAircraftMaxVelocity
- getCloudsEnabled
- getFarClipDistance
- getFogDistance
- getGameSpeed
- getGravity
- getHeatHaze
- getInteriorSoundsEnabled
- getJetpackMaxHeight
- getMinuteDuration
- getMoonSize
- getOcclusionsEnabled
- getRainLevel
- getSunColor
- getSunSize
- getTime
- getTrafficLightState
- getWeather
- getWindVelocity
- getSkyGradient
- getPlayerBlurLevel
- getZoneName
- isGarageOpen
- removeWorldModel
- resetFarClipDistance
- resetFogDistance
- resetHeatHaze
- resetMoonSize
- resetRainLevel
- resetSkyGradient
- resetSunColor
- resetSunSize
- resetWindVelocity
- restoreAllWorldModels
- restoreWorldModel
- setAircraftMaxHeight
- setAircraftMaxVelocity
- setCloudsEnabled
- setFarClipDistance
- setFogDistance
- setGameSpeed
- setGarageOpen
- setGravity
- setHeatHaze
- setInteriorSoundsEnabled
- setMinuteDuration
- setMoonSize
- setOcclusionsEnabled
- setRainLevel
- setSkyGradient
- setSunColor
- setSunSize
- setTime
- setTrafficLightState
- setTrafficLightsLocked
- setWeather
- setWeatherBlended
- setWindVelocity
- setJetpackMaxHeight
- setPlayerBlurLevel