Changing Ammo Types, Default Jail Positions, and Door Owners questions!

If you saw my previous thread, I’m kind of new to coding LUA and editing it and what not. Now I have a DarkRP server all set up and I was wondering how I would change what weapons take what kind of ammo? Like I have the real cs weapons mod for my server, and the desert eagle takes .357 ammo, I want it to take the Pistol ammo that the gun dealer can spawn. How would I go about doing that?

And whenever I start the server up on the map(Really any map)RP_Downtown_V2 it doesn’t make the police headquarters say OWNED BY GOVERNMENT OFFICIALS and so only the mayor and police groups can open it with keys. How do I go about doing that, and making it so whenever I restart the server for whatever reason they will default to that?

Also, I know I can set jail positions as a police chief, but I want them to default to that position forever. How would I go about doing that?

Sorry for maybe some stupid questions, but I’m new and I really want to learn more so any help would be GREATLY appreciated!

(PS: Sorry for creating a new thread)

For weapons the default ammo is in the weapon’s file shared.lua and the ammo type is called from
[lua]SWEP.Primary.Ammo = “pistol”
SWEP.Secondary.Ammo = “pistol”
[/lua]
Here are some ammo types I found.
AR2 - Ammunition of the AR2/Pulse Rifle
AlyxGun - (name in-game “5.7mm Ammo”)
Pistol - Ammunition of the 9MM Pistol
SMG1 - Ammunition of the SMG/MP7
357 - Ammunition of the .357 Magnum
XBowBolt - Ammunition of the Crossbow
Buckshot - Ammunition of the Shotgun
RPG_Round - Ammunition of the RPG/Rocket Launcher
SMG1_Grenade - Ammunition for the SMG/MP7 grenade launcher (secondary fire)
SniperRound
SniperPenetratedRound - (name in-game “.45 Ammo”)
Grenade - Note you must be given the grenade weapon (weapon_frag) before you can throw grenades.
Thumper - Ammunition cannot exceed 2 (name in-game “Explosive C4 Ammo”)
Gravity - (name in-game “4.6MM Ammo”)
Battery - (name in-game “9MM Ammo”)
GaussEnergy
CombineCannon - (name in-game “.50 Ammo”)
AirboatGun - (name in-game “5.56MM Ammo”)
StriderMinigun - (name in-game “7.62MM Ammo”)
HelicopterGun
AR2AltFire - Ammunition of the AR2/Pulse Rifle ‘combine ball’ (secondary fire)
slam - Like Grenade, but for the Selectable Lightweight Attack Munition (S.L.A.M)

I would just make the deagle ammo pistol so go in the weapon_deagle2’s shared.lua or w/e mod you are using I think it was realistic weapons and edit to : SWEP.Primary.Ammo = “pistol”

I’m sure that the door names for the police are mySQL aka Saved to files so if you go up to a door and press f2 as an admin/superadmin you can change it to the group you want and it should save.(Worked on my old server)

The same thing happens with jail positions. Make yourself the chief of police and reset all jail positions, then set them to the ones you’d like and leave it. It should save by itself.

p.s. HI WOOT! Inferno :smiley:

For the ammo type just change it to “pistol” in the lua file for it. Yes it’s really that easy.

If you edit the doors on the server as an admin (F2 if I remember) it SHOULD stay that. They’re kept in the DB file.

As for the jail positions, look at the static_data.lua file in darkrp/gamemode/ . It will explain how to keep custom jail positions and have some entries for rp_downtown_v2 already that you can edit.

There are console commands/chat commands you can use, check the SVN.

Thanks, I will try. But another question, door ownership, how do I set that up to default what doors are owned by government officials? I understand that you can set them up yourself but how do I make it so that only Mayor and Police can open it?

If you’re an admin when you F2 them there should be an option to reset door permissions and “Mayor and Police” should be in there.

Hmm, okay, I’ll try it. Thanks!

Woot you need to learn how to read :stuck_out_tongue: It was posted two times…

I’m sure that the door names for the police are mySQL aka Saved to files so if you go up to a door and press f2 as an admin/superadmin you can change it to the group you want and it should save.(Worked on my old server)

If you edit the doors on the server as an admin (F2 if I remember) it SHOULD stay that. They’re kept in the DB file.