Displays the requested GUI on the player.
GUI Types:
1 - Alert
Payload = Dictionary:
Title = "Notification..";
Content = "Everything is working as it should, this is a default notification.";
ButtonText = "Okay";
2 - Countdown
Payload = Number (UnixTime);
3 - Notification
Payload = Dictionary:
Title = "Notification..";
Content = "Everything is working as it should, this is a default notification.";
Time = 5;
4 - Statistics
Payload = Dictionary:
Title = "Statistics..";
ButtonText = "Close";
Statistics = {"No Statistics"}
Returns the "Shared" folder.
Returns whether User has a higher rank than Harm. (Both should be Players)
This function performs a linear search through the given haystack until it finds a needle that starts with the same characters as element 'v' (for example, to find 'Alexplazz' from 'Ale'). If a list of items or non-strings is provided, the '.Name' attribute will be used.
Case will also be ignored.
Runs a command on the Client, Session is the argument passed to each command when it's executed, it looks like this:
local Execution = {
["Player"] = {
["Client"] = Owner.Player;
["Rank"] = Owner.HighestRank;
["SaveData"] = Owner.SaveData;
["LoadedAt"] = Owner.LoadedAt;
};
["Command"] = Command;
["Execution"] = {
["Arguments"] = EncodedArguments;
["RawArguments"] = Arguments;
["RawCommand"] = RawCommand;
}
}
And commands look like this:
{
["Name"] = "view";
["Aliases"] = {"watch", "spy", "camera", "setcam"};
["Permissions"] = {"Any", {
{"Rank", 1};
}};
["Arguments"] = {"Player"};
["Function"] = function(Session)
Session["Victim"] = Session.Execution.Arguments[1][1];
Modules.API.ClientCommand(Session.Player.Client, Session);
Modules.API.PromptGui(Session.Player.Client, "Notification", {
Title = "Switched View";
Content = "Watching "..Session["Victim"].Name.."."
})
end;
},
Starts the API service.