Scripting/Squirrel/Functions/Player.Admin

From Vice City Multiplayer
Revision as of 10:59, 26 April 2019 by Dracc (talk | contribs) (Restructure)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
Caution icon
This wiki is using an old backup from 2020
Some information may be old/missing

This function is just a variable. There are no built-in commands for admins, like they used to be in earlier versions.

Syntax

Player.Admin;
Player.Admin = toggle;

Arguments

  • bool toggle Set Admin true/false

Example

function onPlayerCommand(cmd, args, player) {
  if (cmd == "heal") {
    if(player.Admin) {
      player.Health = 100;
    }
  }
}

Notes

Call onPlayerCommand was used in this example.

Related Functions