Dark RP Help

A couple questions guys. :smiley:

  1. I downloaded a weapon from garrysmod.org and I put the weapon in garrysmod/lua/weapons file. It’s called ice magic and when I type “ice magic” in the shared.lua where the jobs are being edited, it just doesn’t work.

  2. Where does content like Drugzmod for the drug dealer class go in?

  3. I made a car dealer class, but I want ONLY the care dealer to spawn bikes from the vehicles menu . How would I go around doing that?

  4. Players in my server can use their phys guns to move the doors. How can I prevent them from doing that?

Thank you guys in advanced!

  1. It’s probably “ice_magic”, not “ice magic”.

  2. You can put it in your addons.

  3. [lua]hook.Add(“PlayerSpawnSENT”,function(pl,class)
    if (class == “prop_vehicle_jeep” or class == “prop_vehicle_airboat”) and pl:Team() != TEAM_CARDEALER then return false end

Like that.

  1. Alas, you can’t stop this until there’s a PlayerCanFire hook. You would have to remove the physgun (or edit the door code). THere might be another way, but I dunno.

Thanks for the fast reply Entoros!

Another question:

Where would I put that script?

Main.lua or somewhere serverside.

Thank you ^

I tried the server out and I still don’t have the ice magic at my disposal.

Also, how do I make it so only the drug dealer can buy drugs from the F4 menu?

Look at the addentities.lua for adding drugs.

As for the ice magic, it’s possible that “ice_magic” isn’t the classname. Look at the name of the /addons/Ice Magic/lua/weapons folder. That should be the classname.

To make cars in the F4 menu only buyable by you team, Make sure your code looks like this:

AddCustomVehicle("Airboat", 600, {TEAM_GUN})

Ok I got the drugs down, but anyone can spawn drugs from the entities menu. How do I prevent people from doing that?

Also the car thing works perfectly thanks!.

Ice magic however is still unfortunately missing. :confused:

And as I mentioned, how do I add the bikes into the server so people can directly download it from the server rather than find the file on the internet?
Also what do I have to tweak so the car dealer can sell bikes only?

I plan changing the car dealer into a bicycle dealer.

The Icemagic foldername is ‘Ice Magic’, but the lua weapons folder name is weapon_icemagic, so put that.

And when adding the drugs, make the line of code look like this:

AddEntity("Drug lab", "drug_lab", "models/props_lab/crematorcase.mdl", 400, 3, "/buydruglab", {TEAM_GANG, TEAM_MOB})

I did that and still no go. :confused:

A new problem arises: On the F4 menu, players can not spawn weapons, moneyprinters, etc. Instead if they buy a moneyprinter they get /buymonetprinter in chat and nothing shows up. I think it is because of that code from cardealer in the main.lua. Can someone fix this?

Do you have assmod? :cheers:

No I have ULX.

hook.Add(“PhysgunPickup”, “ughdarkrp”, function(ply, ent)
local class = ent:GetClass()
if class == “func_door” or “func_door_rotating” or “prop_door” then
return false

Excuse me for any mistakes, it’s 0:05 AM.

To stop them movig doors edit the prop protection so they cant move Blocked or World entitys