uEditU
uEdit Unturned
  • uEdit
  • Home
  • uEdit
    • News
    • FAQ
  • Sources
    • Plugin Sources
    • Other Sources
    • Server Hosting
  • Tools
    • Color Codes
    • RandomKeygen
  • Unturned
  • Unturned
    • Information
    • Official Wiki
    • Commands
  • Tools
    • Server Settings
    • Workshop Config
  • Items & Vehicles
    • Vanilla
      • Items 1075
      • Vehicles 189
      • Objects 1155
      • Resources 49
      • Animals 7
    • Escalation
      • Items 782
      • Vehicles 29
      • Objects 873
      • Resources 12
      • Animals 4
    • Elver
      • Items 737
      • Vehicles 36
      • Objects 1243
      • Resources 18
      • Animals 8
    • Arid
      • Items 986
      • Vehicles 42
      • Objects 1270
      • Resources 63
    • Kuwait
      • Items 643
      • Vehicles 49
      • Objects 641
      • Resources 29
      • Animals 6
    • Hawaii
      • Items 21
      • Vehicles 48
      • Objects 351
      • Resources 27
    • France
      • Items 127
      • Vehicles 41
      • Objects 309
      • Resources 12
    • A6 Polaris
      • Items 647
      • Vehicles 59
      • Objects 1214
      • Resources 29
      • Animals 9
    • Buak
      • Items 2500
      • Vehicles 123
      • Objects 1270
      • Resources 49
      • Animals 12
    • Skins
  • RocketMod
  • RocketMod
    • Editors
      • Commands.config.xml
      • Permissions.config.xml
    • Libraries 249
    • Commands
    • Documentation
  • Plugins 846
  • Plugin Editor
    • Advanced Regions
      • Command Builder
    • Spawns Manager
      • Duplicate Cleaner
  • OpenMod
  • OpenMod
    • Editors
      • logging.yaml
      • unturned.yaml
      • autoexec.yaml
    • Documentation
  • Plugins 281
  • uScript
  • uScript
    • Information
    • Documentation
      • Getting Started
      • Scripts
        • How To
        • Events
  • Scripts
  • Modules 15
Looking for quality Plugins? Restore Monarchy - Simplicity over Complexity!
Login

uScript - Events

onAccuracyUpdated(player)


Event:
onAccuracyUpdated(player)

onAid(player, target, item, *cancel)


Event:
onAid(player, target, item, *cancel)

onAnimalKilled(player)


Event:
onAnimalKilled(player)

onArenaWin(player)


Event:
onArenaWin(player)

onBarricadeBuild(player, id, position, *cancel)


Event:
onBarricadeBuild(player, id, position, *cancel)

onBarricadeDestroy(player, barricade, *cancel)


Event:
onBarricadeDestroy(player, barricade, *cancel)

onClothingUpdated(player, item, slot)


Event:
onClothingUpdated(player, item, slot)

onEffectButtonClicked(player, buttonName)


Event:
onEffectButtonClicked(player, buttonName)

onEffectTextCommitted(player, buttonName, text)


Event:
onEffectTextCommitted(player, buttonName, text)

onFishCaught(player)


Event:
onFishCaught(player)

onHeadShot(player)


Event:
onHeadShot(player)

onInterval(timeInSeconds)


Event:
onInterval(timeInSeconds)

You should replace timeInSeconds without the number of seconds you want between each interval

onLoad()


Event:
onLoad()
Example:
// This example will send an discord embed when the plugin has been loaded
event onLoad(){
    embed = discordEmbed();
    embed.description = "Plugin has been loaded";
    discord.sendEmbed(cfg["DiscordWebHook"], embed);
}

// This example will send a message to the console
event onLoad(){
    server.log("Plugin has been loaded");
}

onMegaZombieKilled(player)


Event:
onMegaZombieKilled(player)

onPlantHarvested(player)


Event:
onPlantHarvested(player)

onPlayerChatted(player, message, mode, *color, *cancel)


Event:
onPlayerChatted(player, message, mode, *color, *cancel)

onPlayerCrafted(player, itemId, *cancel)


Event:
onPlayerCrafted(player, itemId, *cancel)

onPlayerDamaged(victim, killer, *cancel, *damage, cause, limb)


Event:
onPlayerDamaged(victim, killer, *cancel, *damage, cause, limb)

onPlayerDeath(victim, killer, cause)


Event:
onPlayerDeath(victim, killer, cause)

onPlayerEquipped(player, item, *cancel)


Event:
onPlayerEquipped(player, item, *cancel)

onPlayerExperienceUpdated(player)


Event:
onPlayerExperienceUpdated(player)

onPlayerGestured(player, gesture)


Event:
onPlayerGestured(player, gesture)

onPlayerInventoryAdded(player, item)


Event:
onPlayerInventoryAdded(player, item)

onPlayerInventoryRemoved(player, item)


Event:
onPlayerInventoryRemoved(player, item)

onPlayerJoined(player)


Event:
onPlayerJoined(player)

onPlayerQuit(player)


Event:
onPlayerQuit(player)

onPlayerRespawned(player)


Event:
onPlayerRespawned(player)

onRockMined(player)


Event:
onRockMined(player)

onSignModify(player, sign, *text, *cancel)


Event:
onSignModify(player, sign, *text, *cancel)

onStructureBuild(player, id, position, *cancel)


Event:
onStructureBuild(player, id, position, *cancel)

onStructureDestroy(player, structure, *cancel)


Event:
onStructureDestroy(player, structure, *cancel)

onTreeChopped(player)


Event:
onTreeChopped(player)

onUnload()


Event:
onUnload()

onVehicleDamaged(vehicle, player, cause, *damage, *cancel)


Event:
onVehicleDamaged(vehicle, player, cause, *damage, *cancel)

onVehicleEnter(player, vehicle, *cancel)


Event:
onVehicleEnter(player, vehicle, *cancel)

onVehicleExit(player, vehicle, *cancel)


Event:
onVehicleExit(player, vehicle, *cancel)

onZombieKilled(player)


Event:
onZombieKilled(player)
Not all events have an example, because I'm not very familiar with uScript and just started. If you have an example or would like to create one, then feel free to share it with me and I'll post it here. Discord: TeemoCell#2160
© Unturned - uEdit
Terms of Service • Privacy Policy