Your Ad Here

Subscribe
 Post #1
 17th April 2008
Dennab
August 2007
1,045 Posts
CakeScript is a new modular, pluggable, general roleplaying script (and/or gamemode, in technical terms).


Generic Coding

All presently released/leaked gamemodes (original copies) were designed for one RP in mind, making it a tedious task to change it for your personal needs. While people may have somewhat accomplished changing TacoScript for things like Real Life RP and Stalker RP in the past, it was never very stable and it took some time to do it.

CakeScript will be a general roleplaying script that can be modified by the use of plugins, explained in a later section.

The ID Card - Not Implemented (into a swep)
Pull out a SWEP and see your personal details on the card that you are holding. No more HUD, instead your information will be displayed on the front of an ID card by using the 'Toolgun Technology'. As seen in Sandbox, when you pull out your toolgun, it will scroll the STOOL name on it. Same rules apply, instead it is your character info.

Personal Wristwatch - Not Implemented (into a swep)
Enhanced with Foszor's Day/Night script, the server will have it's own time and date, of which can be seen on yet another SWEP, except it's a wristwatch. The server progresses by a 'server' minute, and will progress hours, days, months, and years. The timescale is also changeable, and I have calculated that 0 is a server minute per frame, 30 is a real second for a server minute, and every extra 30 is one extra real second per server minute. Cut 30 in half and it's one real second for two server minutes.

Realistic Death
Having a good RP, and you get loaded with a few bullets by the local SWAT team and suddenly your in that good old train station yet again? Well, in CakeScript you won't instantly die. You'll turn into a ragdoll, look through the eyes of that ragdoll, and be able to talk. Eventually you will die (there's a meter showing the progress of your death), but there's some time to say your goodbyes or for a teammate to save your life once you're down. Don't worry, you can give up and just type !acceptdeath to respawn. Another factor to this is that your body will stay there to be taken away, but if someone doesn't get your body you'll eventually rot/decay progressively.

Typing...
Sick of it when you are trying to interactively roleplay but you can't finish what you wanted to do because of your TYPING SPEED? Well, other people can now see when you are typing, as Typing... will appear over your head if the chat window is open.

Modular and Pluggable
Release your custom plugins to the community and be able to modify the gamemode functionality and roleplay. Hook into the CakeScript and gamemode functions, and modify the script to what you need it to be, or just download already-made plugins, by just throwing them into the plugins folder.

Doors
Each team can have any number of 'Door Groups', which will enable the script to make certain doors exclusively able to be opened only by certain teams. All you have to do is fly around the map and execute rp_adddoor # while looking at doors in their open and closed positions. Any team with the specified # in their DoorGroups table will be able to open that door.

Credits
  • LuaBanana - Gamemode Coding
  • Foszor - Day/Night Script
  • Rick Darkoliono - NPC Animations
  • FacePunch Community - Ideas, support, etc



An Example of a Roleplay Scheme
-- RLRP CakeScript Plugin
PLUGIN.Name = "Real Life RP"

if(SERVER) then
-- Create RLRP teams
CAKE.AddTeam("Police", Color(0, 0, 255, 255), true, "models/humans/group03/", true, {"weapon_glock"}, {}, "police", "1");
CAKE.AddTeam("SWAT", Color(0, 0, 255, 255), true, "models/police.mdl", false, {"weapon_glock", "weapon_mp5"}, {}, "swat", "1");

-- Add selectable characters
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"});
end
The above is the default plugin for the Real Life Roleplay schematic (Very basic, but proof of concept.)

CAKE.AddTeam(string TeamName, color Color, boolean DefaultModel, string DefaultModelPath, boolean PartialModel, table Weapons, table Ammo, string FlagKey, table DoorGroups);
The above is the team adding function.

Teams[1] = {};
	Teams[1]["name"] = "Citizen"; -- Team Name
	Teams[1]["color"] = Color( 0, 255, 0, 255 ); -- Team Color, will show up when someone is talking in OOC/when you look at them.
	Teams[1]["DefaultModel"] = false; -- Do they have a default model that they get when they spawn?
	Teams[1]["DefaultModelPath"] = ""; -- What's the path to their default model?
	Teams[1]["PartialModel"] = false; -- Is their model path PARTIAL?
	Teams[1]["Weapons"] = {}; -- What weapons do they spawn with?
	Teams[1]["Ammo"] = {}; -- What ammo do they spawn with?
	Teams[1]["FlagKey"] = "citizen"; -- What flag key is used when using rp_flag?
	Teams[1]["DoorGroup"] = {}; -- What doors can they open?
is the equivalent of..
CAKE.AddTeam("Citizen", Color( 0, 255, 0, 255 ), false, "", false, {}, {}, "citizen", {});

Whereas
Teams[1] = {};
	Teams[1]["name"] = "SWAT"; -- Team Name
	Teams[1]["color"] = Color(0, 0, 255, 255); -- Team Color, will show up when someone is talking in OOC/when you look at them.
	Teams[1]["DefaultModel"] = true; -- Do they have a default model that they get when they spawn?
	Teams[1]["DefaultModelPath"] = "models/police.mdl"; -- What's the path to their default model?
	Teams[1]["PartialModel"] = false; -- Is their model path PARTIAL?
	Teams[1]["Weapons"] = {"weapon_glock", "weapon_mp5"}; -- What weapons do they spawn with?
	Teams[1]["Ammo"] = {}; -- What ammo do they spawn with?
	Teams[1]["FlagKey"] = "swat"; -- What flag key is used when using rp_flag?
	Teams[1]["DoorGroup"] = {1}; -- What doors can they open?
is the equivalent of..
CAKE.AddTeam("SWAT", Color(0, 0, 255, 255), true, "models/police.mdl", false, {"weapon_glock", "weapon_mp5"}, {}, "swat", {1});

This
Teams[2] = {};
	Teams[2]["name"] = "United Militia"; -- Team Name
	Teams[2]["color"] = Color( 255, 0, 0, 255 ); -- Team Color, will show up when someone is talking in OOC/when you look at them.
	Teams[2]["DefaultModel"] = true; -- Do they have a default model that they get when they spawn?
	Teams[2]["DefaultModelPath"] = "models/humans/group03/"; -- What's the path to their default model?
	Teams[2]["PartialModel"] = true; -- Is their model path PARTIAL?
	Teams[2]["Weapons"] = {}; -- What weapons do they spawn with?
	Teams[2]["Ammo"] = {}; -- What ammo do they spawn with?
	Teams[2]["FlagKey"] = "um"; -- What flag key is used when using rp_flag?
	Teams[2]["DoorGroup"] = {}; -- What doors can they open?
is the equivalent of..
CAKE.AddTeam("United Militia", Color( 255, 0, 0, 255 ), true, "models/humans/group03/", true, {}, {}, "swat", {});

Everything else is pretty easy to understand.

Commands
Please note all console commands starting with rp_ can be said in chat by replacing rp_ with !

CVARS:
daytime_speed <timescale> - Basically says how fast the sun and clock go. 30 is one real second to server minute, 60 is two real seconds to server minute, 15 is half a real second to server minute, 0 is a server minute per frame.

Admin Commands:
rp_adddoor <doorgroup> - Adds a door to a doorgroup, you must do this for both the door's opened and closed positions.
rp_setflags <rp name> <flag keys> - Set someones flags
rp_tooltrust <rp name> <0/1> - Give someone tooltrust
rp_setteam <rp name> <team number> - Will make someone be set to a certain team and respawn

Player Commands:
rp_flag <flag key> - Flags you
rp_charmenu - Brings up character creation/loading menu
rp_equip - Equips you with the things you need, just incase you don't get them.
rp_acceptdeath - If you died, this will automatically set your respawn timer down to 0 seconds left.
rp_changename - Sets your RP name.
rp_job - Sets your job.




Creating an RP Schema
As a tutorial was requested, I will be showing you a more in-depth example of making a Roleplay Scheme for CakeScript.

Ok, so you've downloaded CakeScript and you want to make your own scheme.

First off, you need to create a lua file within the plugins directory of the gamemode. My example will be hl2rp.lua, and it will be stored in garrysmod/gamemodes/CakeScript/gamemode/plugins/hl2rp.lua

To start out the plugin, you should begin by putting this at the top of the file.

-- HL2 RP CakeScript Plugin
PLUGIN.Name = "Half-Life 2 RP"
PLUGIN.Type = "Scheme"

Now we will begin the team creation.

The syntax for adding a team via a function is the following:
CAKE.AddTeam(string TeamName, color Color, boolean DefaultModel, string DefaultModelPath, boolean PartialModel, table Weapons, table Ammo, string FlagKey, table DoorGroup);

Now, what we need to know first off is the team name. Considering this is an HL2 RP schematic, the name probably will be "Civil Protection".

The team color is generally the color of the persons name. Civil Protection and Combine in general usually like a darkish blue. Now remember, color consists of red, green, blue and alpha. So, if we wanted a darkish blue we would have red=0, green=0, blue=200, and alpha=255. 255 is the max value of color in RGB scales. Alpha represents the transparency, of which we will not be using. In 'GLua' terms, a color would be like so:
Color( r, g, b, a )
In our case it would be
Color( 0, 0, 200, 255 )

Now we have our color, so lets move on to other variables.

DefaultModel basically means, does the player spawn with his default character that he selected when he made his character, or does the team set a model for him. In this case we will be setting this to true, because a CP has the models/police.mdl.

DefaultModelPath is the path to the default model. If you don't have a default model, just set this to "". In our case we will be setting this to models/police.mdl

PartialModel is used for citizen model reskins such as City 08 or Group03. It takes the original model of the player, cuts it down to its suffix (for example male_07.mdl), and appends it (puts it at the end of) the DefaultModelPath. We won't be using this, but in the case of a rebel this would be set to true, and DefaultModelPath would be set to models/humans/Group03/

The weapons variable is basically a list of what weapons the person spawns with. Now you MUST remember that this is a table, thus it must begin with { and end with }. Our Civil Protection unit will spawn with a pistol and a stunstick. So, set this variable to..
{"weapon_pistol, "weapon_stunstick"}

The ammo variable isn't really functioning so we'll skip that part. Just put {} in place of it.

The flagkey is basically what is used in the rp_flag command and rp_setflags command. We'll make the flagkey cp.

DoorGroup is a table as well. This is what enables a team to have it's own doors that only they (or teams that have the same doorgroup number) can open. We'll set this to 1, and afterwards you'll need to go around the map you are going to use and run rp_adddoor 1 in console (A bind is usually better), for both the opened and closed door positions. You must be looking at the door. Don't worry, it saves it by map name.

Ok, so now that we have all our variables, let's get to it!

The variables all put together will equal this:
CAKE.AddTeam("Civil Protection", Color( 0, 0, 200, 255 ), true, "models/police.mdl", false, {"weapon_pistol", "weapon_stunstick"}, {}, "cp", {1});

Adding it to the plugin file is pretty simple. Just throw it in there, but make sure it's enclosed within if(SERVER), otherwise it may just run on clientside!

Also, remember, to add 'selectable' models when a character is created, just put this in there.
CAKE.AddModels(table Models);

Put a table of the models you'd like to add.
In HL2RP it's usually like this..
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"}); 
That will enable players to select the City 07 citizen models when creating their character.

So, all in all, the full plugin code is as such.
-- HL2 RP CakeScript Plugin
PLUGIN.Name = "Half-Life 2 RP"
PLUGIN.Type = "Scheme"

if( SERVER ) then
  CAKE.AddTeam("Civil Protection", Color( 0, 0, 200, 255 ), true, "models/police.mdl", false, {"weapon_pistol", "weapon_stunstick"}, {}, "cp", {1});
  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"}); 
end

Thanks for reading. Enjoy your RP scheme.

Please note though, it's generally a good idea to only have one RP plugin in the folder at a time, because they WILL both be run, thus combining the teams and models.




Name:
CakeScript

Version:
Public Beta RC2

Description:
Second release of CakeScript

Requirements:
None, but don't use ULX with this version.

Screenshots:





Download:






Name:
CakeScript

Version:
Public Beta RC1

Description:
First release of CakeScript

Requirements:
None, but don't use ULX with this version.

Screenshots:





Download:





Due for Next Release
  • GUI color changeable by plugins
  • Auto adding models to the animations system
  • Toggleable HUD
  • Broadcast fix
  • Compatibility with ULX (The PlayerSay is being overriden by ULX hooks)


Animations aren't broken by my script. Upload all HL2 models from the GCF to your server, along with any other models that will be used. ALL models that will be used MUST be located on the server!


SVN Info
URL: http://38.100.236.40:8080/svn/cakescript/trunk/
user: anon
pass: anon
 Post #2
 17th April 2008
Asstron's Avatar
August 2007
237 Posts
*Ugh* Hurry up! Itchy pants... :excited:
 Post #3
 17th April 2008
Dennab
August 2007
1,045 Posts
Asstron posted:
*Ugh* Hurry up! Itchy pants... :excited:
GOING AS FAST AS I CAN CAP'N!

Edit:

RELEASED! GO GO GO!
 Post #4
 17th April 2008
Gold Member
Sgt.Sgt's Avatar
January 2006
3,678 Posts
Yay it is here. Time to play. Thank you LuaBanana.
 Post #5
 17th April 2008
Dennab
August 2007
1,045 Posts
Sgt.Sgt posted:
Yay it is here. Time to play. Thank you LuaBanana.
You're welcome. :excited:
 Post #6
 17th April 2008
Dennab
August 2007
978 Posts
LuaBanana posted:
You're welcome. :excited:
I love you
 Post #7
 17th April 2008
stewsta's Avatar
April 2005
315 Posts
Wow... that was quickly made - I haven't been following the WIP/Idea thread for like 3 weeks and its already released... nice work LB :)
 Post #8
 17th April 2008
OverwatchTM's Avatar
March 2007
196 Posts
This is wonderful.
A very useful base for making your own RP gamemodes.
Well done Banana.
 Post #9
 17th April 2008
GooeyChicken's Avatar
April 2008
90 Posts
Snerks posted:
I love you
?!??!!?!?
 Post #10
 17th April 2008
FrostSheep's Avatar
December 2006
12 Posts
This might sound dumb but i forgot how to be a cp and yes i am flaged.
 Post #11
 17th April 2008
Dennab
August 2007
978 Posts
Whats a server we can play on?
 Post #12
 17th April 2008
FrostSheep's Avatar
December 2006
12 Posts
Snerks posted:
Whats a server we can play on?
I have one but its only 8 slots

The ip is 69.12.76.78:27016

But it is not all ways going to be on rp
 Post #13
 17th April 2008
KillaDilla's Avatar
July 2007
61 Posts
Can someone make a tutorial for someone with no lua knowledge? It's a high request but this script looks really cool!
 Post #14
 17th April 2008
Gold Member
foszor's Avatar
April 2005
2,215 Posts
I wouldn't expect any credits, but adding your name to my daynight script is pretty disappointing.

Nonetheless it is nice to see it being implemented into a gamemode.
 Post #15
 17th April 2008
Gold Member
Dennab
October 2007
2,619 Posts
Awesome
 Post #16
 17th April 2008
Botman's Avatar
May 2007
138 Posts
Looks good.
 Post #17
 17th April 2008
Dennab
August 2007
1,045 Posts
foszor posted:
I wouldn't expect any credits, but adding your name to my daynight script is pretty disappointing.

Nonetheless it is nice to see it being implemented into a gamemode.
Oh crap, sorry man. I'll add it in.
 Post #18
 17th April 2008
Gold Member
Catdaemon's Avatar
February 2005
11,603 Posts
All presently released/leaked gamemodes (original copies) were designed for one RP in mind
Nope, although I didn't hype mine at all so I wouldn't be surprised if you've never seen it.
 Post #19
 17th April 2008
Dennab
August 2007
1,045 Posts
Catdaemon posted:
Nope, although I didn't hype mine at all so I wouldn't be surprised if you've never seen it.
I was thinking that perhaps your gamemode was general, but I never checked. I'm just speaking of the popular gamemodes that everyone uses. :)
 Post #20
 17th April 2008
Gold Member
DarKSunrise's Avatar
July 2006
4,341 Posts
Awesome, thanks for the release.
 Post #21
 17th April 2008
Dennab
August 2007
1,045 Posts
Please note that the plugin system isn't exactly perfected, so in the mean time just create RP Schemas.
 Post #22
 17th April 2008
zulrak's Avatar
March 2008
21 Posts
Hi Lua Banana ;)

How can i add the Name script into mine DarkRP Mod? If people connected that they can enter their RP - Name . and how i add the ID - Card in my DarkrP?
 Post #23
 17th April 2008
salveitor's Avatar
February 2007
14 Posts
I'm stuck in the Citizenship Application Menu, What I have to do? I can't select my playermodel or close the menu!
 Post #24
 17th April 2008
Editpir's Avatar
April 2008
23 Posts
Damn, times like this I wish I could run a server. I want to make a server with this script, to show people that there is a thing known as "Good RP".
 Post #25
 17th April 2008
Dennab
August 2007
1,045 Posts
salveitor posted:
I'm stuck in the Citizenship Application Menu, What I have to do? I can't select my playermodel or close the menu!
Press submit after entering your name and clicking on a model?

Edit:

zulrak posted:
Hi Lua Banana ;)

How can i add the Name script into mine DarkRP Mod? If people connected that they can enter their RP - Name . and how i add the ID - Card in my DarkrP?
Wow...
 Post #26
 17th April 2008
Dennab
July 2005
1,539 Posts
There are no player animations...
 Post #27
 17th April 2008
nofearkid's Avatar
April 2007
482 Posts
zulrak posted:
Hi Lua Banana ;)

How can i add the Name script into mine DarkRP Mod? If people connected that they can enter their RP - Name . and how i add the ID - Card in my DarkrP?
Uhm.... Please tell me you have mental troubles...
 Post #28
 17th April 2008
KillaDilla's Avatar
July 2007
61 Posts
I didn't understand your explanation on how to modify this, any extra help would be appreciated.
 Post #29
 17th April 2008
Jeffman12's Avatar
July 2005
1,760 Posts
I can't wait for you to finish. Would it be possible to use Counter-Strike Source models in this though?
Without too much hassle, that is.
 Post #30
 17th April 2008
Dennab
July 2005
1,539 Posts
Jeffman12 posted:
I can't wait for you to finish. Would it be possible to use Counter-Strike Source models in this though?
Without too much hassle, that is.
Not for HL2 RP, But in other plugins I guess.
 Post #31
 18th April 2008
tmalo10's Avatar
April 2008
11 Posts
I've tested it; it's interesting... however I can't make a valid judgement until I've seen the final version. Could you give me an ETA?
 Post #32
 18th April 2008
Gold Member
Spacew00t's Avatar
March 2006
4,425 Posts
This looks epic!
 Post #33
 18th April 2008
Dennab
July 2005
1,539 Posts
Animations are not working at the moment :(.
 Post #34
 18th April 2008
PC Camp's Avatar
July 2007
1,736 Posts
It's nice to see this released. :)

Seems like you didn't need that vgui help or HUD help. I'm still here if ya need it. ;)

Great job on the whole script.
 Post #35
 18th April 2008
Dennab
August 2007
1,045 Posts
Crypto posted:
Animations are not working at the moment :(.
What models are you using? Are there any errors?

I know about the CP model's animations being weird, BotMan just sent me an updated version of his fix, so I'll release it with the next release.

Edit:

Crypto posted:
Not for HL2 RP, But in other plugins I guess.
It can be used in anything, the gamemode really doesn't care what model you use, it all works.

You could use a MELON if you wanted to.

Edit:

Jeffman12 posted:
I can't wait for you to finish. Would it be possible to use Counter-Strike Source models in this though?
Without too much hassle, that is.
Like I said above, ANY model can be used. CAKE.AddModels() is only needed in the case that a player will be SELECTING a model when they create their character. Otherwise, if it's a team model, or you manually set it through their datafile, it will work just fine.

Although if it's a ragdoll (such as kleiner.mdl or overwatch), insert it into the animations.lua file. I'll make a plugin function that can do that for you in the next release.
 Post #36
 18th April 2008
sebihunter's Avatar
July 2007
121 Posts
Itīs finnaly here! I hope this script is great, if I had a server (if there would be a linux garrysmod server) then I choose this script. Nice job LuaBanana
 Post #37
 18th April 2008
Dennab
July 2005
1,539 Posts
LuaBanana posted:
What models are you using? Are there any errors?

I know about the CP model's animations being weird, BotMan just sent me an updated version of his fix, so I'll release it with the next release.

Edit:


It can be used in anything, the gamemode really doesn't care what model you use, it all works.

You could use a MELON if you wanted to.

Edit:


Like I said above, ANY model can be used. CAKE.AddModels() is only needed in the case that a player will be SELECTING a model when they create their character. Otherwise, if it's a team model, or you manually set it through their datafile, it will work just fine.

Although if it's a ragdoll (such as kleiner.mdl or overwatch), insert it into the animations.lua file. I'll make a plugin function that can do that for you in the next release.
When can we expect an update?
 Post #38
 18th April 2008
Ober's Avatar
November 2005
258 Posts
ps, to note that while the code for the NPC animations is by Rick dark. The original idea and concept is my work. I was the one to push him into doing it before he left DSRP and I'd like the credits to reflect this if possible.
 Post #39
 18th April 2008
Dennab
July 2005
1,539 Posts
-- HL2 RP CakeScript Plugin 
PLUGIN.Name = "Half-Life 2 RP" 
PLUGIN.Type = "Scheme" 
  
if( SERVER ) then 
  CAKE.AddTeam("Civil Protection", Color( 0, 0, 200, 255 ), true, "models/police.mdl", false, {"weapon_pistol", "weapon_stunstick", "weapon_smg1"}, {}, "cp", {1});
  CAKE.AddTeam("OverWatch Elite", Color(0, 0, 255, 255), true, "models/combine_super_soldier.mdl", false, {"weapon_glock", "weapon_smg1", "weapon_pistol", "weapon_stunstick", "weapon_ar2", "weapon_shotgun"}, {}, "owe", {1}); 
  CAKE.AddTeam("OverWatch", Color(0, 0, 150, 255), true, "models/Combine_Soldier.mdl", false, {"weapon_glock", "weapon_smg1", "weapon_pistol", "weapon_stunstick", "weapon_ar2", "weapon_frag"}, {}, "ow", {1}); 
  CAKE.AddTeam("City Administrator", Color( 255, 128, 0, 255 ), true, "models/breen.mdl", false, {"weapon_pistol"}, {}, "ca", {1});
  CAKE.AddTeam("Civil Protection Squad Leader", Color( 0, 255, 0, 255 ), true, "models/barney.mdl", false, {"weapon_pistol", "weapon_stunstick", "weapon_smg1", "weapon_shotgun","weapon_frag"}, {}, "sl", {1});
  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"}); 
end


My version of HL2-RP But something is wrong? I try to set the flags ow or even cp it does not even do anything "rp_setflags Crypto cp" and it does nothing :(.
 Post #40
 18th April 2008
Dennab
August 2007
1,045 Posts
Crypto posted:
-- HL2 RP CakeScript Plugin 
PLUGIN.Name = "Half-Life 2 RP" 
PLUGIN.Type = "Scheme" 
  
if( SERVER ) then 
  CAKE.AddTeam("Civil Protection", Color( 0, 0, 200, 255 ), true, "models/police.mdl", false, {"weapon_pistol", "weapon_stunstick", "weapon_smg1"}, {}, "cp", {1});
  CAKE.AddTeam("OverWatch Elite", Color(0, 0, 255, 255), true, "models/combine_super_soldier.mdl", false, {"weapon_glock", "weapon_smg1", "weapon_pistol", "weapon_stunstick", "weapon_ar2", "weapon_shotgun"}, {}, "owe", {1}); 
  CAKE.AddTeam("OverWatch", Color(0, 0, 150, 255), true, "models/Combine_Soldier.mdl", false, {"weapon_glock", "weapon_smg1", "weapon_pistol", "weapon_stunstick", "weapon_ar2", "weapon_frag"}, {}, "ow", {1}); 
  CAKE.AddTeam("City Administrator", Color( 255, 128, 0, 255 ), true, "models/breen.mdl", false, {"weapon_pistol"}, {}, "ca", {1});
  CAKE.AddTeam("Civil Protection Squad Leader", Color( 0, 255, 0, 255 ), true, "models/barney.mdl", false, {"weapon_pistol", "weapon_stunstick", "weapon_smg1", "weapon_shotgun","weapon_frag"}, {}, "sl", {1});
  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"}); 
end


My version of HL2-RP But something is wrong? I try to set the flags ow or even cp it does not even do anything "rp_setflags Crypto cp" and it does nothing :(.
It won't say anything. Use rp_flag cp afterwards.
Reply

All times are GMT. The time now is 07:47AM.

Facepunch Studios 2010 - Server 'MARGE'