I have a rank called “VIP” on my DarkRP server, and I would like them to spawn with a certain SWEP called buddy_finder. How would I go about doing this? I’ve tried searching for a code like this in the DarkRP files that I could edit (copied and pasted from gmod lua wiki), but to no avail:
[lua]function GM:PlayerLoadout( ply ) // What should the player recieve when joining a team?
if ply:Team() == 1 then //If he is team 1, then give him the following items ply:Give( "weapon_physcannon" ) // A Gravity gun ply:Give( "weapon_physgun" ) // A Physics gun ply:Give( "gmod_tool" ) // and don't forget the tool gun! elseif ply:Team() == 2 then // So if he isn't team 1, he could be team 2? ply:Give( "weapon_physcannon" ) //Assuming he is, then give him Gravity gun ply:Give( "weapon_physgun" ) // Physics gun ply:Give( "weapon_ar2" ) // AR2 ply:Give( "gmod_tool" ) // and the gmod tool end //right here.
end // End the function
I hardly have any Lua experience, so if you feel kind enough to answer, please tell me exactly what to do with the code Many thanks in advance! Also, if there’s an easier way to do this in DarkRP, please don’t keep it to yourself :D.
The “VIP” rank is a rank in ULX and Fadmin.