Changing ownership - DarkRP

I am new to lua, I barely know anything about it, so I thought you guys could help me.

I want to make a class called “Engineer” for DarkRP, here is the string.

I want to make it so that the Engineer can give (or sell) all of their props to somebody else. When the engineer types /give “persons name to give props to”, all of the engineers props now belong to that person. This will be good for selling houses, etc. Can you guys tell me how I would do this? Thanks.

bump…?

bumpity bump bump

I think ASSMod can transfer ownership of props.
Not 100%, never used it myself.

How would this help me make a single class able to transfer their props to somebody else?

It wouldn’t, but they could transfer their props in the Q menu.

Wouldn’t it be like:

[lua]function GiveProps(giver,taker)
for _,v in ipairs(ents.FindByClass(“prop_physics”)) do
if v:GetNWString(“Owner”) == giver:Name() then v:SetNWString(“Owner”,taker:Name()) end
end
end[/lua]

I think that’s how you set the owner for props… not sure though.

My thoughts: Pitch DarkRP’s PP, its lame, then Install the ASSMod PP. I don’t see how having other classes transfer props is a problem. Unless, of course, you want them to stick solidly to their class.

Fix’d

Thanks a lot.