Category:脚本函数

From SA-MP Wiki

Jump to: navigation, search


This page contains an overview of the hundreds of functions available in San Andreas: Multiplayer. All functions have received their own page with extended information about the function, the required parameters, possible usage and other functions you might want to look at.

Functions get added with every new release of San Andreas: Multiplayer. The 服务器插件 can also add a lot of extra functions to the multiplayer mod, click on the link for more information about the server plugins. There currently are 273 native functions available.

Scroll down for a full list of functions ordered alphabetically.

Contents

分类

载具

函数 描述
AddStaticVehicle 添加一个固有的载具
AddStaticVehicleEx 添加一个固有的载具
AddVehicleComponent 给一个载具添加部件
AttachTrailerToVehicle 给一个载具附加上一辆拖车
ChangeVehicleColor 改变载具的颜色
ChangeVehiclePaintjob 改变载具的喷漆
CreateVehicle 创建一个载具
DestroyVehicle 销毁一个载具
DetachTrailerFromVehicle 分离载具的拖车
GetPlayerSurfingVehicleID 获取玩家正冲浪着的 载具ID
GetPlayerVehicleID 获取玩家正在乘坐的 载具ID
GetVehicleComponentInSlot 获取载具某个部件槽的部件
GetVehicleComponentType 获得某个部件的类型
GetVehicleDamageStatus 获得载具的损坏情况 (看得见的损坏)
GetVehicleHealth 获得载具的耐久度 (包括引擎)
GetVehicleModel 获得载具的模型号
GetVehiclePos 获得载具的位置
GetVehicleTrailer 获得载具的拖车的ID
GetVehicleVelocity 获得载具的速度
GetVehicleVirtualWorld 获得载具的虚拟世界值 (virtual world)
GetVehicleZAngle 获取载具的旋转角度
IsPlayerInAnyVehicle 检查玩家是否在任意载具内
IsPlayerInVehicle 检查玩家是否在特定载具内
IsTrailerAttachedToVehicle 检查载具是否被拖车拖着
IsVehicleStreamedIn 检查一个特定的玩家是否已缓冲了某个载具
LinkVehicleToInterior 链接载具到一个内部世界
PlayerSpectateVehicle 让玩家观看一个载具
PutPlayerInVehicle 将玩家放入一辆载具中
RemovePlayerFromVehicle 把玩家从所在载具中移除
RemoveVehicleComponent 移除载具上的部件
RepairVehicle 修理一个载具 (看得见的损坏 + 引擎)
SetVehicleHealth 设置载具的耐久度 (包括引擎)
SetVehicleParamsForPlayer 设置载具对玩家的属性 (是否锁住, 跟踪目标)
SetVehiclePos 设置载具的位置
SetVehicleToRespawn 重新刷新一个载具
SetVehicleVelocity 设置载具的速度
SetVehicleVirtualWorld 设置载具的虚拟世界值
SetVehicleZAngle 设置一个载具的旋转角度
UpdateVehicleDamageStatus 更新载具的损坏状态 (看得见的损坏)


物件 (Object)

全局物件 (Object)

玩家专属物件 (PlayerObject)

文本图形 (TextDraw)

帮派区域 (GangZone)

3D文本标签 (3DText)

检查点

一般检查点 (Checkpoint)

赛车检查点 (RaceCheckpoint)


玩家专属变量 (PVar)

  • DeletePVar - 删除一个玩家的专属变量
  • GetPVarFloat - 获得玩家的一个浮点型的专属变量
  • GetPVarInt - 获得玩家的一个整数型的专属变量
  • GetPVarString - 获得玩家的一个字符串型的专属变量
  • SetPVarFloat - 设置玩家的一个浮点型的专属变量
  • SetPVarInt - 设置玩家的一个整数型的专属变量
  • SetPVarString - 设置玩家的一个字符串型的专属变量

玩家观看 (Spectate)

管理员

  • Ban - 封禁一个玩家使其无法再连接服务器
  • BanEx - 封禁一个玩家 (可填写操作理由的)
  • IsPlayerAdmin - 检查一个玩家是否已登录RCON
  • Kick - 将一个玩家踢出服务器
  • SendRconCommand - 通过脚本发送RCON命令给服务器

Articles in category "脚本函数"

There are 6 articles in this category.

B

K

S

U