Skip to content

Instantly share code, notes, and snippets.

View Renzbo's full-sized avatar

Renz Bo Renzbo

View GitHub Profile
@Renzbo
Renzbo / gist:9701924
Created March 22, 2014 05:53
DarkRP Job
-- How to make a basic DarkRP job
-- Here is an example of a default one from my server
TEAM_HOBO = DarkRP.createJob("Hobo", {
-- TEAM_HOBO is the name for the team used in the code, it wont be seen by players in game
-- ("Hobo" is the name that will be seen by players in the game
color = Color(80, 45, 0, 255),
-- This is the color for the team in the F4 menu and tab menu
-- The first nubmer is red, then green, then blue
-- Always leave the last number to 255, it is transparency
model = "models/player/corpse1.mdl",
@Renzbo
Renzbo / gist:9701871
Created March 22, 2014 05:46
Mayor demoted upon death DarkRP Garry's Mod
-- Here is the finished code for the whole job
-- Now I will explain
TEAM_MAYOR = DarkRP.createJob("Mayor", {
color = Color(150, 20, 20, 255),
model = "models/player/breen.mdl",
description = [[The Mayor of the city creates laws to govern the city.
If you are the mayor you may create and accept warrants.
Type /wanted <name> to warrant a player.
Type /jailpos to set the Jail Position.
Type /lockdown initiate a lockdown of the city.
@Renzbo
Renzbo / gist:9701841
Created March 22, 2014 05:42
Basic Java Game
// This is a comment, the two dashes mean that it will not be read by the computer
alert("Welcome to game!")
// This will present a message, in which the user must hit ok to continue.
confirm ("I am ready to play this game")
// This line asks the user if they are ready, it will present a pop up message, with the only option being to continue or quit.
// Now for something a little more difficult.
var age = prompt("What's Your Age?")
// A variable is something that the computer will save for later.
// We have named the variable age
// We have told the computer, that the variable age, is equal to whatever the user puts into the prompt.