SetPlayerAdmin
注意
这个函数是在omp v1.1.0.2612中添加的,在以前的版本中不起作用!
描述
设置玩家为 RCON 管理员。
参数名 | 说明 |
---|---|
playerid | 要设置的玩家 ID |
bool:admin | true设置为 RCON 管理员,false移除权限 |
返回值
本函数没有返回值。
示例代码
public OnPlayerCommandText(playerid, cmdtext[])
{
if (!strcmp(cmdtext, "/admin", true))
{
SetPlayerAdmin(playerid, true);
SendClientMessage(playerid, -1, "SERVER: You are now RCON admin!");
return 1;
}
return 0;
}
相关函数
- IsPlayerAdmin: 检测玩家是否为 RCON 管理员
相关回调
- OnRconLoginAttempt: RCON 登录尝试回调