简体   繁体   中英

How to make a command require RCON login

How can I make a command require the player to be logged in via RCON in order to execute it? I wish to do this for security reasons.

The method IsPlayerAdmin(playerid) will return 1 if the player is logged in via RCON and 0 if the player isn't. To use this for a command, go into the command body and add an if-statement around the part of the command you wish to protect. For example:

if(IsPlayerAdmin(playerid))
{
    //do stuff here
}
else
{
    //do nothing, explain security settings to user
}

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM