• CakeScript G2
    934 replies, posted
[release][b]CakeScript G2 1.0.3[/b] [b]Last Update:[/b] June 14, 2008 Latest Updates: [list]Permaflag[/list] [list]New GUI[/list] [img]http://www.garrysmod.org/img/dl/41551_1.jpg[/img] [b]Download:[/b] [url=http://www.garrysmod.org/downloads/?a=view&id=41551][img]http://www.garrysmod.org/img/?t=dll&id=41551[/img][/url] [/release][release][b]Requirements:[/b] • Half a brain • Basic LUA Knowledge (Not too much needed) • Global schema must always be loaded • Malawar's Tools [b]NOT[/b] installed on server/client. [/release][release][b]Upcoming Features:[/b] • Bug fixing [/release][release][b]Images:[/b] Getting some [/release][release] [b]FAQ:[/b] [b]Q: My Garry's Mod freaks out when I first spawn![/b] A: Still not sure why this happens, but in previous experiences apparently Malawar's Tools was doing it. If you experience this, please post screenshots and any LUA errors you find in your console. [b]Q: Where is the documentation? [/b] A: I'm creating a wiki. [b]Q: How easy is this to use? [/b] A: Let's just say for something that takes a month in TacoScript to make and massive gamemode modifications, you can make in CakeScript in under an hour without any gamemode modifications. [b]Q: Does this conflict with anything? [/b] A: Malawars tools (clientside), ULX sometimes conflicts (apparently the CID), still figuring out other things. [b]Q: Animations are screwed up![/b] A: Extract "source 2007 shared models.gcf" and upload/copy everything to your server. [/release] [release] [b]How to make a Team[/b] Teams are relatively easy to make, but you need to first make your own schema (Unless you are running an HL2RP server). To make a schema, you need a schema definition file (schemas/myrp.lua), a schema folder, (schemas/myrp/), and a plugins and items folder inside of the schema folder. Here is a basic schema definition file. [lua] SCHEMA.Name = "My Awesome RP"; SCHEMA.Description = "Omg!! My first RP schema!"; SCHEMA.Author = "LuaNoob"; SCHEMA.Base = "global"; function SCHEMA.SetUp() -- Team Initialization Functions Go Here end [/lua] For an easier way to make teams, I'd suggest you make team 'templates'. You can find an example set of templates in the hl2rp schema plugin, hl2rp_templates.lua There are other methods of adding teams which I will cover soon enough, but templates is the easiest way. Here would be an example template file [lua] PLUGIN.Name = "Team Templates"; PLUGIN.Author = "LuaNoob"; PLUGIN.Description = "My first template, yay!"; function PLUGIN.Init() -- Nothing going on in here end function CAKE.CitizenTeam(name, color, flag_key, business, public, item_groups, canvote) local team = CAKE.TeamObject(); team.name = name or "Citizen"; team.color = color or Color(0, 255, 0, 255); team.flag_key = flag_key or "citizen"; team.business = business or false; team.public = public or true; team.item_groups = item_groups or { }; -- This is used for the voteflags plugin. It isn't neccessary but I'm just putting it in here incase you need it team.canvote = canvote or true; return team; end [/lua] Now, we would go back into our schema definition file and add these lines. I'll make a pharmacist, grocery seller, black market, and regular citizen. (Item groups 1, 2, and 3 respectively, of which I will cover later) [lua] CAKE.AddTeam(CAKE.CitizenTeam()); CAKE.AddTeam(CAKE.CitizenTeam("Pharmacist", Color(255, 0, 0, 255), "pharmacist", true, true, { 1 }, false)); CAKE.AddTeam(CAKE.CitizenTeam("Grocery Seller", Color(0, 0, 255, 255), "grocery", true, true, { 2 }, false)); CAKE.AddTeam(CAKE.CitizenTeam("Gun Dealer", Color(255, 255, 0, 255), "gundealer", true, false, { 3 }, true)); [/lua] Please note, the FIRST team that is added will be the default team. Now we need to add selectable player models (for character creation). Here is every single citizen model. [lua] CAKE.AddModels({ "models/humans/group01/male_01.mdl", "models/humans/group01/male_02.mdl", "models/humans/group01/male_03.mdl", "models/humans/group01/male_04.mdl", "models/humans/group01/male_06.mdl", "models/humans/group01/male_07.mdl", "models/humans/group01/male_08.mdl", "models/humans/group01/male_09.mdl", "models/humans/group02/male_01.mdl", "models/humans/group02/male_02.mdl", "models/humans/group02/male_03.mdl", "models/humans/group02/male_04.mdl", "models/humans/group02/male_06.mdl", "models/humans/group02/male_07.mdl", "models/humans/group02/male_08.mdl", "models/humans/group02/male_09.mdl", "models/humans/group01/female_01.mdl", "models/humans/group01/female_02.mdl", "models/humans/group01/female_03.mdl", "models/humans/group01/female_04.mdl", "models/humans/group01/female_06.mdl", "models/humans/group01/female_07.mdl", "models/humans/group02/female_01.mdl", "models/humans/group02/female_02.mdl", "models/humans/group02/female_03.mdl", "models/humans/group02/female_04.mdl", "models/humans/group02/female_06.mdl", "models/humans/group02/female_07.mdl" }); [/lua] Please note, ALL models must be in lowercase. You'll need to add the models to the animations.lua file later if you want them to be animated. (Citizen models are already added, as well as NPC models) Now, items are pretty simple and straightforward. Here is an example item. [lua] ITEM.Name = "Watermelon"; ITEM.Class = "watermelon"; -- Classname, if this is a weapon it should be the weapon's classname so you can use rp_dropweapon ITEM.Description = "A ripe juicy watermelon"; ITEM.Model = "models/props_junk/watermelon01.mdl"; ITEM.Purchaseable = true; ITEM.Price = 3; ITEM.ItemGroup = 2; -- Our grocery seller, remember? function ITEM:Drop(ply) -- What happens when the player drops the item end function ITEM:Pickup(ply) -- What happens when the player picks up the item self:Remove(); end function ITEM:UseItem(ply) -- What happens when the player uses the item (TAB + RightClick) ply:ConCommand("say /me eats a watermelon."); self:Remove(); end [/lua] Just put that in schemas/myrp/items/! The lua file MUST be the same name as the classname. You can [b]always[/b] find the latest team table structure in teams.lua under the TeamObject function. [/release] Thanks to bios element for helping me here and there, as well as the community owners that run my script. :D
Sweet Jesus it's released! Now I need to figure out how to use CakeScriptG2.
[QUOTE=Kirad]Sweet Jesus it's released! Now I need to figure out how to use CakeScriptG2.[/QUOTE] At first I was like :geno: Then I lol'd :v:
I like cake. I Download now
[QUOTE=Cheater!]I like cake. I Download now[/QUOTE] Cake I like download I now.
This is pretty much sexy. I look forward to seeing this on some hot servers.
[QUOTE=Ugly]This is pretty much sexy. I look forward to seeing this on some hot servers.[/QUOTE] At first I lol'd :v: Then I was like :geno:
I really enjoyed beta testing this. :excited:
[QUOTE=Nori] And whoever those people were at Desert Roleplay, that WAS me. [/QUOTE] Woah It really is you I was all thinking you were an impostor of sorts coming to steal my soul.
[QUOTE=chucknorriz]Woah It really is you I was all thinking you were an impostor of sorts coming to steal my soul.[/QUOTE] :argh:
If your having a bug with items touching a door and spamming [code] Error: Function (Touch) not found! on Scripted Entity (item_prop) Error: Function (EndTouch) not found! on Scripted Entity (item_prop) [/code] in console, go to CakeScriptG2\entities\entities\item_prop\cl_init.lua and add this code. [code] function ENT:Touch( hitEnt ) end [/code]
how's about screenshots of it?
I can't make myself admin to become civil protection
Add your STEAMID to the SuperAdmins table, or Admins.. either way. (of which is in admins.lua)
Downloaded, Is there an SVN for it?
Nope.
No pictures or what's new on this release? I need to decide if I should update or not.
Oh shit, it's released.
AWESOME But shit, I have to remake all my old plugins, SSTRP is temporarily dead.
-snip-
[QUOTE=m0dUlator]No pictures or what's new on this release? I need to decide if I should update or not.[/QUOTE] I think there are obvious reasons why you should update.
[QUOTE=gamei56]I think there are obvious reasons why you should update.[/QUOTE] I know, but I have added a ton of features to RC5 on my server. I don't know if I WANT to update.
[QUOTE=m0dUlator]I know, but I have added a ton of features to RC5 on my server. I don't know if I WANT to update.[/QUOTE] Take one look through the code, and tell me that again, just to be sure you don't WANT to update.
[QUOTE=m0dUlator]I know, but I have added a ton of features to RC5 on my server. I don't know if I WANT to update.[/QUOTE] Added the list of new features (those aren't all of them) I'm pretty sure you'd want to upgrade. The features you added are 1000% easier with the new hook system/plugin system. [b]Edit:[/b] [QUOTE=hedhunta95]Take one look through the code, and tell me that again, just to be sure you don't WANT to update.[/QUOTE] At first I lol'd :v: Then I lol'd again. :v: [b]Edit:[/b] Excuse me while I upload the voteflags plugin. :3:
LB, after you left I got an Engine Error saying that the server doesn't support benchmarks, or something of the like. (I'm Combine)
Double toast. :(
Somebody hacked the server using sv_benchmark_force_start Fags :argh:
I'll post the fix for it in just a sec. [url]http://forums.facepunchstudios.com/showthread.php?t=533923[/url] There ya go. Tested and worked.
:lol:, bios is like my right hand fixitman.
[QUOTE=Nori]Somebody hacked the server using sv_benchmark_force_start Fags :argh:[/QUOTE] I thought you fixed that. I was about to take it down anyway to fix a few flags.
Sorry, you need to Log In to post a reply to this thread.