13.02.2018, 01:13
(This post was last modified: 13.02.2018, 01:18 by Profesores.)
Correct
Squirrel Script
- local items =
- [
- "ITMI_GOLD",
- "ITFO_APPLE",
- "ITFO_MILK",
- "ITFO_BEER", // this comma is optional
- ];
-
- addEventHandler("onPlayerJoin",function(pid)
- { // below code will be executed when player join to the server
- local item = rand() % items.len();
-
- giveItem(pid, Items.id(items[item]), 1);
- });