It seems that only the client sees the animations (no one else can see the player doing animations, they can only see themselves do it when using a camera)
Concerning rp_setmoney and restricting it to super admins, all you have to do is THIS:
[lua]function CCSetMoney(ply, cmd)
if ply:IsUserGroup( "superadmin" ) then
--rp_setmoney code goes here.
else
print("Ohohoho you cannot use this command.")
return end --This I'm not too sure about, does the rp_setmoney command actually return something or not?
end[/lua]
And that's it. Far as I know, Falco or someone else may correct my statement here but that's basically how you perform a super admin check, given that you haven't changed the settings file.
As for the animations, I can only wonder how you actually went about making them. I'd love to learn how you did that :D.
[QUOTE=Killer_Steel;21925853]Concerning rp_setmoney and restricting it to super admins, all you have to do is THIS:
[lua]function CCSetMoney(ply, cmd)
if ply:IsUserGroup( "superadmin" ) then
--rp_setmoney code goes here.
else
print("Ohohoho you cannot use this command.")
return end --This I'm not too sure about, does the rp_setmoney command actually return something or not?
end[/lua]
And that's it. Far as I know, Falco or someone else may correct my statement here but that's basically how you perform a super admin check, given that you haven't changed the settings file.
As for the animations, I can only wonder how you actually went about making them. I'd love to learn how you did that :D.[/QUOTE]
He didn't make them, they are animations in HL2 - he just made them play once things are done (although it doesn't work perfectly, and only client right now. I fixed it on my DarkRP but he'll probably fix it soon.)
Hey when i add a new shipment my entities just disappear but i can still use /buyshipment for the shipment i added. Is there any way to show entities by a command or something? I doubt i did something wrong.. Alot of people has this problem tho.. here's the full code I added to Addentities.lua (The custom shipment is the m249 at the bottom!) Also.. even if i change a single letter anywhere it fails and doesn't show my entities. same with jobs, i can change the description for a job and it all just screws up and doesn't show my jobs in the F4 menu but i can still use /cp etc..
[lua]AddCustomShipment("Desert eagle", "models/weapons/w_pist_deagle.mdl", "weapon_deagle2", 215, 10, true, 215, true, {})
AddCustomShipment("Fiveseven", "models/weapons/w_pist_fiveseven.mdl", "weapon_fiveseven2", 0, 10, true, 205, true, {})
AddCustomShipment("Glock", "models/weapons/w_pist_glock18.mdl", "weapon_glock2", 0, 10, true, 160, true, {})
AddCustomShipment("P228", "models/weapons/w_pist_p228.mdl", "weapon_p2282", 0, 10, true, 185, true, {})
AddCustomShipment("AK47", "models/weapons/w_rif_ak47.mdl", "weapon_ak472", 2450, 10, false, nil, false, {TEAM_GUN})
AddCustomShipment("MP5", "models/weapons/w_smg_mp5.mdl", "weapon_mp52", 2200, 10, false, nil, false, {TEAM_GUN})
AddCustomShipment("M4", "models/weapons/w_rif_m4a1.mdl", "weapon_m42", 2450, 10, false, nil, false, {TEAM_GUN})
AddCustomShipment("Mac 10", "models/weapons/w_smg_mac10.mdl", "weapon_mac102", 2150, 10, false, nil, false, {TEAM_GUN})
AddCustomShipment("Pump shotgun", "models/weapons/w_shot_m3super90.mdl", "weapon_pumpshotgun2", 1750, 10, false, nil, false, {TEAM_GUN})
AddCustomShipment("Sniper rifle", "models/weapons/w_snip_g3sg1.mdl", "ls_sniper", 3750, 10, false, nil, false, {TEAM_GUN})
AddEntity("Drug lab", "drug_lab", "models/props_lab/crematorcase.mdl", 400, 3, "/buydruglab", {TEAM_GANG, TEAM_MOB})
AddEntity("Money printer", "money_printer", "models/props_c17/consolebox01a.mdl", 1000, 2, "/buymoneyprinter")
AddEntity("Microwave", "microwave", "models/props/cs_office/microwave.mdl", 400, 1, "/buymicrowave", TEAM_COOK)
AddEntity("Gun lab", "gunlab", "models/props_c17/TrapPropeller_Engine.mdl", 500, 1, "/buygunlab", TEAM_GUN)
/*
How to add custom vehicles:
FIRST
go ingame, type rp_getvehicles for available vehicles!
then:
AddCustomVehicle(<One of the vehicles from the rp_getvehicles list>, <Price of the vehicle>, <OPTIONAL jobs that can buy the vehicle>)
Examples:
AddCustomVehicle("Jeep", "models/buggy.mdl", 100 )
AddCustomVehicle("Airboat", "models/airboat.mdl", 600, {TEAM_GUN})
AddCustomVehicle("Airboat", "models/airboat.mdl", 600, {TEAM_GUN, TEAM_MEDIC})
Add those lines under your custom shipments. At the bottom of this file or in data/CustomShipments.txt
HOW TO ADD CUSTOM SHIPMENTS:
AddCustomShipment("<Name of the shipment(no spaces)>"," <the model that the shipment spawns(should be the world model...)>", "<the classname of the weapon>", <the price of one shipment>, <how many guns there are in one shipment>, <OPTIONAL: true/false sold seperately>, <OPTIONAL: price when sold seperately>, < true/false OPTIONAL: /buy only = true> , OPTIONAL which classes can buy the shipment, OPTIONAL: the model of the shipment)
Notes:
MODEL: you can go to Q and then props tab at the top left then search for w_ and you can find all world models of the weapons!
CLASSNAME OF THE WEAPON
there are half-life 2 weapons you can add:
weapon_pistol
weapon_smg1
weapon_ar2
weapon_rpg
weapon_crowbar
weapon_physgun
weapon_357
weapon_crossbow
weapon_slam
weapon_bugbait
weapon_frag
weapon_physcannon
weapon_shotgun
gmod_tool
But you can also add the classnames of Lua weapons by going into the weapons/ folder and look at the name of the folder of the weapon you want.
Like the player possessor swep in addons/Player Possessor/lua/weapons You see a folder called weapon_posessor
This means the classname is weapon_posessor
YOU CAN ADD ITEMS/ENTITIES TOO! but to actually make the entity you have to press E on the thing that the shipment spawned, BUT THAT'S OK!
YOU CAN MAKE GUNDEALERS ABLE TO SELL MEDKITS!
true/false: Can the weapon be sold seperately?(with /buy name) if you want yes then say true else say no
the price of sold seperate is the price it is when you do /buy name. Of course you only have to fill this in when sold seperate is true.
EXAMPLES OF CUSTOM SHIPMENTS(remove the // to activate it): */
//AddCustomShipment("HL2pistol", "models/weapons/W_pistol.mdl", "weapon_pistol", 500, 10, false, 200, false, {TEAM_GUN, TEAM_MEDIC})
--EXAMPLE OF AN ENTITY(in this case a medkit)
--AddCustomShipment("bball", "models/Combine_Helicopter/helicopter_bomb01.mdl", "sent_ball", 100, 10, false, 10, false, {TEAM_GUN}, "models/props_c17/oildrum001_explosive.mdl")
--EXAMPLE OF A BOUNCY BALL: NOTE THAT YOU HAVE TO PRESS E REALLY QUICKLY ON THE BOMB OR YOU'LL EAT THE BALL LOL
--AddCustomShipment("bball", "models/Combine_Helicopter/helicopter_bomb01.mdl", "sent_ball", 100, 10, true, 10, true)
-- ADD CUSTOM SHIPMENTS HERE(next line):
AddCustomShipment("M249", "models/weapons/w_mach_m249para.mdl", "weapon_real_cs_m249", 6000, 10, false, nil, false, {TEAM_GUN}) [/lua]
EDIT: Whatever i change screws the entities up... like nothing works, I try to use the HL2Pistol and I removed the // but still, NO entities.. Whatever i change it screws up. Even if I do a new line and write -- lol it all just doesn't work. Can this be to my files somewhere? models?
[QUOTE=Killer_Steel;21925853]Concerning rp_setmoney and restricting it to super admins, all you have to do is THIS[/QUOTE]
I just don't see why you should make a superadmin only function superadmin only.
when i look in the Entities/weapons tab all classes have got all single weapons that only gundelaer could spawn, you know why?
here is the addentities.lua code:
[code] AddEntity("Drug lab", "drug_lab", "models/props_lab/crematorcase.mdl", 400, 3, "/buydruglab", {TEAM_GANG, TEAM_MOB})
AddEntity("Money printer", "money_printer", "models/props_c17/consolebox01a.mdl", 1000, 2, "/buymoneyprinter")
AddEntity("Microwave", "microwave", "models/props/cs_office/microwave.mdl", 400, 1, "/buymicrowave", TEAM_COOK)
AddEntity("Gun lab", "gunlab", "models/props_c17/TrapPropeller_Engine.mdl", 500, 1, "/buygunlab", TEAM_GUN)
/*
How to add custom vehicles:
FIRST
go ingame, type rp_getvehicles for available vehicles!
then:
AddCustomVehicle(<One of the vehicles from the rp_getvehicles list>, <Price of the vehicle>, <OPTIONAL jobs that can buy the vehicle>)
Examples:
AddCustomVehicle("Jeep", "models/buggy.mdl", 100 )
AddCustomVehicle("Airboat", "models/airboat.mdl", 600, {TEAM_GUN})
AddCustomVehicle("Airboat", "models/airboat.mdl", 600, {TEAM_GUN, TEAM_MEDIC})
Add those lines under your custom shipments. At the bottom of this file or in data/CustomShipments.txt
HOW TO ADD CUSTOM SHIPMENTS:
AddCustomShipment("<Name of the shipment(no spaces)>"," <the model that the shipment spawns(should be the world model...)>", "<the classname of the weapon>", <the price of one shipment>, <how many guns there are in one shipment>, <OPTIONAL: true/false sold seperately>, <OPTIONAL: price when sold seperately>, < true/false OPTIONAL: /buy only = true> , OPTIONAL which classes can buy the shipment, OPTIONAL: the model of the shipment)
Notes:
MODEL: you can go to Q and then props tab at the top left then search for w_ and you can find all world models of the weapons!
CLASSNAME OF THE WEAPON
there are half-life 2 weapons you can add:
weapon_pistol
weapon_smg1
weapon_ar2
weapon_rpg
weapon_crowbar
weapon_physgun
weapon_357
weapon_crossbow
weapon_slam
weapon_bugbait
weapon_frag
weapon_physcannon
weapon_shotgun
gmod_tool
But you can also add the classnames of Lua weapons by going into the weapons/ folder and look at the name of the folder of the weapon you want.
Like the player possessor swep in addons/Player Possessor/lua/weapons You see a folder called weapon_posessor
This means the classname is weapon_posessor
YOU CAN ADD ITEMS/ENTITIES TOO! but to actually make the entity you have to press E on the thing that the shipment spawned, BUT THAT'S OK!
YOU CAN MAKE GUNDEALERS ABLE TO SELL MEDKITS!
true/false: Can the weapon be sold seperately?(with /buy name) if you want yes then say true else say no
the price of sold seperate is the price it is when you do /buy name. Of course you only have to fill this in when sold seperate is true.
EXAMPLES OF CUSTOM SHIPMENTS(remove the // to activate it): */
//AddCustomShipment("HL2pistol", "models/weapons/W_pistol.mdl", "weapon_pistol", 500, 10, false, 200, false, {TEAM_GUN, TEAM_MEDIC})
--EXAMPLE OF AN ENTITY(in this case a medkit)
--AddCustomShipment("bball", "models/Combine_Helicopter/helicopter_bomb01.mdl", "sent_ball", 100, 10, false, 10, false, {TEAM_GUN}, "models/props_c17/oildrum001_explosive.mdl")
--EXAMPLE OF A BOUNCY BALL: NOTE THAT YOU HAVE TO PRESS E REALLY QUICKLY ON THE BOMB OR YOU'LL EAT THE BALL LOL
--AddCustomShipment("bball", "models/Combine_Helicopter/helicopter_bomb01.mdl", "sent_ball", 100, 10, true, 10, true)
-- ADD CUSTOM SHIPMENTS HERE(next line):
AddCustomShipment("M249", "models/weapons/w_mach_m249para.mdl", "weapon_real_cs_m249", 2000, 10, true, 1400, false, {TEAM_GUN})
AddCustomShipment("Galil", "models/weapons/w_rif_galil.mdl", "weapon_real_cs_galil", 2700, 10, true, 700, false, {TEAM_GUN})
AddCustomShipment("AK47", "models/weapons/w_rif_ak47.mdl", "weapon_real_cs_ak47", 2500, 10, true, 650, false, {TEAM_GUN, TEAM_MOB, TEAM_GANG, TEAM_DRUG})
AddCustomShipment("M4A1", "models/weapons/w_rif_m4a1.mdl", "weapon_real_cs_m4a1", 2400, 10, true, 650, false, {TEAM_GUN})
AddCustomShipment("Famas", "models/weapons/w_rif_famas.mdl", "weapon_real_cs_famas", 1900, 10, true, 550, false, {TEAM_GUN})
AddCustomShipment("AWP", "models/weapons/w_snip_awp.mdl", "weapon_real_cs_awp", 2000, 10, true, 750, false, {TEAM_GUN})
AddCustomShipment("Scout", "models/weapons/w_snip_scout.mdl", "weapon_real_cs_scout", 2000, 10, true, 950, false, {TEAM_GUN})
AddCustomShipment("SteyrAug", "models/weapons/w_rif_aug.mdl", "weapon_real_cs_aug", 2600, 10, true, 850, false, {TEAM_GUN})
AddCustomShipment("SG552", "models/weapons/w_rif_sg552.mdl", "weapon_real_cs_sg552", 2400, 10, true, 850, false, {TEAM_GUN})
AddCustomShipment("G3SG1", "models/weapons/w_snip_g3sg1.mdl", "weapon_real_cs_g3sg1", 2600, 10, true, 880, false, {TEAM_GUN})
AddCustomShipment("SG550", "models/weapons/w_snip_sg550.mdl", "weapon_real_cs_sg550", 2700, 10, true, 880, false, {TEAM_GUN})
AddCustomShipment("UMP45", "models/weapons/w_smg_ump45.mdl", "weapon_real_cs_ump_45", 1900, 10, true, 750, false, {TEAM_GUN})
AddCustomShipment("P90", "models/weapons/w_smg_p90.mdl", "weapon_real_cs_p90", 2600, 10, true, 450, false, {TEAM_GUN})
AddCustomShipment("TMP", "models/weapons/w_smg_tmp.mdl", "weapon_real_cs_tmp", 2000, 10, v, 450, false, {TEAM_GUN})
AddCustomShipment("MP5", "models/weapons/w_smg_mp5.mdl", "weapon_real_cs_mp5a5", 2200, 10, true, 400, false, {TEAM_GUN})
AddCustomShipment("Mac10", "models/weapons/w_smg_mac10.mdl", "weapon_real_cs_mac10", 1900, 10, true, 300, false, {TEAM_GUN})
AddCustomShipment("AutoShotgun", "models/weapons/w_shot_xm1014.mdl", "weapon_real_cs_xm1014", 2600, 10, true, 850, false, {TEAM_GUN})
AddCustomShipment("Shotgun", "models/weapons/w_shot_m3super90.mdl", "weapon_real_cs_pumpshotgun", 2100, 10, true, 750, false, {TEAM_GUN})
AddCustomShipment("DualElites", "models/weapons/w_pist_elite_dropped.mdl", "weapon_real_cs_elites", 1900, 10, true, 240, false, {TEAM_GUN})
AddCustomShipment("Deagle", "models/weapons/w_pist_deagle.mdl", "weapon_real_cs_desert_eagle", 2300, 10, true, 230, false, {TEAM_GUN, TEAM_MOB})
AddCustomShipment("USP", "models/weapons/w_pist_usp.mdl", "weapon_real_cs_usp", 2200, 10, true, 140, false, {TEAM_GUN, TEAM_MOB, TEAM_GANG, TEAM_DRUG})
AddCustomShipment("P228", "models/weapons/w_pist_p228.mdl", "weapon_real_cs_p228", 2100, 10, true, 110, false, {})
AddCustomShipment("Glock", "models/weapons/w_pist_glock18.mdl", "weapon_real_cs_glock18", 2000, 10, true, 110, false, {})
AddCustomShipment("FiveSeven", "models/weapons/w_pist_fiveseven.mdl", "weapon_real_cs_five-seven", 1900, 10, true, 170, false, {TEAM_GUN, TEAM_MOB, TEAM_GANG, TEAM_DRUG})
AddCustomShipment("Knife", "models/weapons/w_knife_t.mdl", "weapon_real_cs_knife", 2000, 10, true, 350, false, {TEAM_GUN})
AddCustomShipment("Can of Beer", "models/drug_mod/alcohol_can.mdl", "durgz_alcohol", 50, 1, true, 50, true, {TEAM_DRUG})
AddCustomShipment("Beer", "models/drug_mod/alcohol_can.mdl", "durgz_alcohol", 500, 12, false, 500, false, {TEAM_DRUG})
AddCustomShipment("Bag of Weed", "models/katharsmodels/contraband/zak_wiet/zak_wiet.mdl", "durgz_weed", 200, 1, true, 200, true, {TEAM_DRUG})
AddCustomShipment("Weed", "models/katharsmodels/contraband/zak_wiet/zak_wiet.mdl", "durgz_weed", 2000, 12, false, 2000, false, {TEAM_DRUG})
AddCustomShipment("Cigarette", "models/boxopencigshib.mdl", "durgz_cigarette", 30, 1, true, 30, true, {TEAM_DRUG})
AddCustomShipment("Cigarettes", "models/boxopencigshib.mdl", "durgz_cigarette", 300, 12, false, 300, false, {TEAM_DRUG})
AddCustomShipment("Cocaine", "models/cocn.mdl", "durgz_cocaine", 300, 1, true, 300, true, {TEAM_DRUG})
AddCustomShipment("Cocaine", "models/cocn.mdl", "durgz_cocaine", 3000, 12, false, 3000, false, {TEAM_DRUG})
AddCustomShipment("Heroine", "models/katharsmodels/syringe_out/syringe_out.mdl", "durgz_heroine", 100, 1, true, 100, true, {TEAM_DRUG})
AddCustomShipment("Heroine", "models/katharsmodels/syringe_out/syringe_out.mdl", "durgz_heroine", 1000, 12, false, 1000, false, {TEAM_DRUG})
AddCustomShipment("LSD strip", "models/smile/smile.mdl", "durgz_lsd", 250, 1, true, 250, true, {TEAM_DRUG})
AddCustomShipment("LSD", "mode
AddCustomShipment("M249", "models/weapons/w_mach_m249para.mdl", "weapon_real_cs_m249", 2000, 10, true, 1400, false, {TEAM_GUN})
Should be:
AddCustomShipment("M249", "models/weapons/w_mach_m249para.mdl", "weapon_real_cs_m249", 2000, 10, false, 1400, false, {TEAM_GUN})
Same for all of them. Try and read what FPtje wrote..
[QUOTE=Trivkz;21941601]AddCustomShipment("M249", "models/weapons/w_mach_m249para.mdl", "weapon_real_cs_m249", 2000, 10, true, 1400, false, {TEAM_GUN})
Should be:
AddCustomShipment("M249", "models/weapons/w_mach_m249para.mdl", "weapon_real_cs_m249", 2000, 10, false, 1400, false, {TEAM_GUN})
Same for all of them. Try and read what FPtje wrote..[/QUOTE]
Pertect Thanks
Falco are you working on fixing the rp_ values, I have temporarily shut down my server because its such a pain.
moskis,
Did you make any other change to DarkRP aside from that shipment? Double check the file extension, make sure it is ".lua", [b]not[/b] ".lua.txt".
Exam week, expect very few to no updates in the next two weeks.
Well I have everything working, I sended it back to the FTP server as a .lua. And when im using the SVN version it's Sandbox for everyone except me. All i did to make it work for me was to add the DarkRP svn to my gamemodes folder(listen server) and launched it. Then it worked on the dedicated one. But it doesn't work for anyone else
[editline]01:44PM[/editline]
Also, when i wanna make a custom shipment an get the CSS realistic weapons, is it enough if they are in my addons? Or do i have to copy the real_cs_blablabla to gamemodes/darkrp/entities/weapons?
Forgot to say that 2.4.1 works without any problems but still, shipment doesn't work.
[QUOTE=moskis;21960423]Well I have everything working, I sended it back to the FTP server as a .lua. And when im using the SVN version it's Sandbox for everyone except me. All i did to make it work for me was to add the DarkRP svn to my gamemodes folder(listen server) and launched it. Then it worked on the dedicated one. But it doesn't work for anyone else
[editline]01:44PM[/editline]
Also, when i wanna make a custom shipment an get the CSS realistic weapons, is it enough if they are in my addons? Or do i have to copy the real_cs_blablabla to gamemodes/darkrp/entities/weapons?
Forgot to say that 2.4.1 works without any problems but still, shipment doesn't work.[/QUOTE]
It's fine if they're in addons.
Falco, Do you think you can make some money converger thing.
Like, If two certain amounts of money come to contact with each other they both add up into one amount?
ex. There's 50 dollars on the floor and another 50 comes in contact with it one of the 50 disappears and then the other 50 gets added to the other resulting in 100 dollars.
another ex. 250 dollars spawn out of a printer and then another 250 comes out later one of the 250 dollars disappears while the other one becomes 500.
That could seriously reduce the lag of an server. Peoples are trying to spam money to crash servers so I think that should be made. Just my opinion.
Try spamming money, they don't collide with one another.
Well think if an person has 10000$ and drops the minimum amount, until the 10k$ are out?
Off-Topic:
Going to play Modern Warfare 2 so no Replay from me right now.
I wasn't really trying to prevent lag with the idea..I just thought it was something neat/useful to add, so you think you could consider it Falco?
i'm having some problems with the add extrateam function.
Apparantly they dont appear in game.
[code]/*--------------------------------------------------------
Default teams. If you make a team above the citizen team, people will spawn with that team!
--------------------------------------------------------*/
TEAM_CITIZEN = AddExtraTeam("Worker", Color(20, 150, 20, 255), {
"models/player/Group01/Female_01.mdl",
"models/player/Group01/Female_02.mdl",
"models/player/Group01/Female_03.mdl",
"models/player/Group01/Female_04.mdl",
"models/player/Group01/Female_06.mdl",
"models/player/Group01/Female_07.mdl",
"models/player/group01/male_01.mdl",
"models/player/Group01/Male_02.mdl",
"models/player/Group01/male_03.mdl",
"models/player/Group01/Male_04.mdl",
"models/player/Group01/Male_05.mdl",
"models/player/Group01/Male_06.mdl",
"models/player/Group01/Male_07.mdl",
"models/player/Group01/Male_08.mdl",
"models/player/Group01/Male_09.mdl"},
[[The Worker is the most basic level of society you can hold.
You have no specific role in city life other than commit labor.]], {}, "worker", 0, 0, 0, false, false)
TEAM_POLICE = AddExtraTeam("NPA Enforcer", Color(25, 25, 170, 255), "models/player/urban.mdl",
[[The protector of every citizen that lives in the city .
You have the power to arrest criminals and protect innocents.
Hit them with your arrest baton to put them in jail
Bash them with a stunstick and they might learn better than to disobey
the law.
The Battering Ram can break down the door of a criminal with a warrant
for his/her arrest.
The Battering Ram can also unfreeze frozen props(if enabled).
Type /wanted <name> to alert the public to this criminal
OR go to tab and warrant someone by clicking the warrant button]], {"arrest_stick", "unarrest_stick", "weapon_real_cs_usp", "stunstick", "door_ram", "weaponchecker"}, "cop", 4, 50, 1, false, false)
TEAM_CHIEF = AddExtraTeam("NPA Chief", Color(20, 20, 255, 255), "models/player/urban.mdl",
[[The Chief is the leader of the Civil Protection unit.
Coordinate the National Protection Agency forces to bring law
to the city.
Hit them with arrest baton to put them in jail
Bash them with a stunstick and they might learn better than to
disobey the law.
The Battering Ram can break down the door of a criminal with a
warrant for his/her arrest.
Type /wanted <name> to alert the public to this criminal
Type /jailpos to set the Jail Position]], {"arrest_stick", "unarrest_stick", "weapon_real_cs_deagle", "stunstick", "door_ram", "weaponchecker"}, "chief", 1, 75, 2, false, false, TEAM_POLICE)
TEAM_MAYOR = AddExtraTeam("The Overmind", Color(150, 20, 20, 255), "models/Player/suits/male_07.mdl", [[The Overmind of the city creates laws to serve the greater good
of the people.
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.
Everyone must be inside during a lockdown.
The cops patrol the area
/unlockdown to end a lockdown]], {"weapon_real_cs_desert_eagle"}, "overmind", 1, 80, 1, false, false/*, {TEAM_CHIEF, TEAM_POLICE}*/)
/*
--------------------------------------------------------
HOW TO MAKE AN EXTRA CLASS!!!!
--------------------------------------------------------
You can make extra classes here. Set everything up here and the rest will be done for you! no more editing 100 files without knowing what you're doing!!!
Ok here's how:
To make an extra class do this:
AddExtraTeam( "<NAME OF THE CLASS>", Color(<red>, <Green>, <blue>, 255), "<Player model>" , [[<the description(it can have enters)>]], { "<first extra weapon>","<second extra weapon>", etc...}, "<chat command to become it(WITHOUT THE /!)>", <maximum amount of this team> <the salary he gets>, 0/1/2 = public /admin only / superadmin only, <1/0/true/false Do you have to vote to become it>, true/false DOES THIS TEAM HAVE A GUN LICENSE?, TEAM: Which team you need to be to become this team)
The real example is here: it's the Hobo: */
--VAR without /!!! The name the color(what you see in tab) the player model The description
TEAM_HOBO = AddExtraTeam("Hobo", Color(80, 45, 0, 255), "models/player/corpse1.mdl", [[The lowest member of society. All people see you laugh.
You have no home.
Beg for your food and money
Sing for everyone who passes to get money
Make your own wooden home somewhere in a corner or
outside someone else's door]], {"weapon_bugbait"}, "hobo", 0, 0, 0, false)
//No extra weapons say /hobo to become hobo Maximum hobo's = 5 his salary = 0 because hobo's don't earn money. 0 = everyone can become hobo , false = you don't have to vote to become hobo
// MAKE SURE THAT THERE IS NO / IN THE TEAM NAME OR IN THE TEAM COMMAND:
// TEAM_/DUDE IS WROOOOOONG !!!!!!
// HAVING "/dude" IN THE COMMAND FIELD IS WROOOOOOOONG!!!!
//ADD TEAMS UNDER THIS LINE:
TEAM_ADMINISTRATOR = AddExtraTeam("Labor Administrator", Color(51, 153, 255, 255), "models/player/odessa.mdl",
[[You make sure that the workers and scientists know what to do and how to behave.
You can punish them with your sunstick.]], {"sunstick","weaponchecker"}, "administrator", 1, 45, 1, false, true, {})
TEAM_SCIENTIST = AddExtraTeam("Scientist", Color(153, 51, 255, 255), {
"models/player/kleiner.mdl",
"models/player/hostage_01.mdl",
"models/player/hostage_02.mdl",
"models/player/hostage_03.mdll",
"models/player/hostage_04.mdl"},
[[You have been chosen to make scientific breakthroughs for the NPA and to research on how to improve society.]], {}, "scientist", 5, 25, 0, true, false, {})
/*
--------------------------------------------------------
HOW TO MAKE A DOOR GROUP
--------------------------------------------------------
AddDoorGroup("NAME OF THE GROUP HERE, you see this when looking at a door", Team1, Team2, team3, team4, etc.)
WARNING: THE DOOR GROUPS HAVE TO BE UNDER THE TEAMS IN SHARED.LUA. IF THEY ARE NOT, IT MIGHT MUCK UP!
The default door groups, can also be used as examples:
*/
AddDoorGroup("cops and mayor only", TEAM_CHIEF, TEAM_POLICE, TEAM_MAYOR)
/*
--------------------------------------------------------
HOW TO MAKE An agenda
--------------------------------------------------------
AddAgenda(Title of the agenda, Manager (who edits it), Listeners (the ones who just see and follow the agenda))
WARNING: THE AGENDAS HAVE TO BE UNDER THE TEAMS IN SHARED.LUA. IF THEY ARE NOT, IT MIGHT MUCK UP!
The default agenda's, can also be used as examples:
*/
AddAgenda("NPA Agenda", TEAM_MAYOR, {TEAM_CHIEF, TEAM_POLICE})
AddAgenda("Public Message", TEAM_ADMINISTRATOR, {TEAM_CITIZEN, TEAM_SCIENTIST})[/code]
Here:
[CODE]TEAM_ADMINISTRATOR = AddExtraTeam("Labor Administrator", Color(51, 153, 255, 255), "models/player/odessa.mdl",
[[You make sure that the workers and scientists know what to do and how to behave.
You can punish them with your sunstick.]], {"sunstick","weaponchecker"}, "administrator", 1, 45, 1, false, true, false)
TEAM_SCIENTIST = AddExtraTeam("Scientist", Color(153, 51, 255, 255), {
"models/player/kleiner.mdl",
"models/player/hostage_01.mdl",
"models/player/hostage_02.mdl",
"models/player/hostage_03.mdll",
"models/player/hostage_04.mdl"},
[[You have been chosen to make scientific breakthroughs for the NPA and to research on how to improve society.]], {}, "scientist", 5, 25, 0, true, false, false)
[/CODE]
i need help i made this custom class
TEAM_ADMINSWAT = AddExtraTeam("admin swat", Color(0, 0, 255, 255), "models/player/riot.mdl", [[pwn some noobs]], {"weapon_riotshield ","weapon_deagle","weapon_m4a1"}, "adminswat", 1, 5000, 2, false, true, {})
but when i type in /adminswat to become it a little triangle with a exclimation mark appers but i did not switch to that job
can anyone explain to me why that is did. i screw up? i used classmaker to make it [url]http://darkrp.megagamer.net/kit/index.php?i=classmaker[/url]
The class maker fucks up the last part.
TEAM_ADMINSWAT = AddExtraTeam("admin swat", Color(0, 0, 255, 255), "models/player/riot.mdl", [[pwn some noobs]], {"weapon_riotshield ","weapon_deagle","weapon_m4a1"}, "adminswat", 1, 5000, 2, false, true, false)
it makes {} and not false.
Thank You so much
[QUOTE=Superfastblast;21985491]Thank You so much[/QUOTE]
By chance, did you use my classmaker? The web based one? Is so :ohdear: I probably should fix that. I'll go check now.
[editline]12:13AM[/editline]
Okay, turns out the issue was on my class maker :ohdear: I went ahead and fixed the problem. If there is no "prior team", then it will just return false instead of creating the empty table. Don't be afraid to report any bugs with the class maker to me, I will always try to fix it ASAP.
[QUOTE=deadeye536;21997269]By chance, did you use my classmaker? The web based one? Is so :ohdear: I probably should fix that. I'll go check now.
[editline]12:13AM[/editline]
Okay, turns out the issue was on my class maker :ohdear: I went ahead and fixed the problem. If there is no "prior team", then it will just return false instead of creating the empty table. Don't be afraid to report any bugs with the class maker to me, I will always try to fix it ASAP.[/QUOTE]
Deadeye is awesome.
how do you make custom money printers?
[QUOTE=FPtje;21938153]I just don't see why you should make a superadmin only function superadmin only.[/QUOTE]
Been seven to nine months since I've gone over DarkRP code, and I was making the function myself back then. Didn't realize that it already did the check :/.
[QUOTE=bananaslicer;22014560]how do you make custom money printers?[/QUOTE]
Copy the current money printer code into a differently named folder in the entities folder, like, money_printer2, then edit to code to however you want it, and add the entity to the F4 menu in addentities.lua
I added two extra money printers, a shit one that costs $500, prints $100 and is likely to explode, and a good one that costs $2000, prints $500, and is less likely to explode. And they have different models.
I'll upload them if you'd like..
nah, upload isn't needed. thank you though.
Sorry, you need to Log In to post a reply to this thread.