Today, I tried to make a custom Cider RP job:
[CODE]TEAM_THIEF = cider.team.add("Thief", Color(204, 0, 204, 255), "models/player/barney.mdl", "models/player/barney.mdl", "Runs around the city, thieving.", 55, 3, nil, true);[/CODE]
I put that in core/plugins/generic/sh_init.lua
I also added it so when someone was that class, they would get a lockpick and a keypad cracker.
I put this in the gamemode init.lua
[CODE]if (LocalPlayer():Team() == TEAM_THIEF) then player:Give ("cider_lockpick");[/CODE]
[CODE]if (LocalPlayer():Team() == TEAM_THIEF) then player:Give ("keypad_cracker");[/CODE]
After doing so, we got frozen at the loading, jump if your stuck here, part of entering the server.
What did I do wrong?
if (LocalPlayer():Team() == TEAM_THIEF) then player:Give("cider_lockpick");
Not sure if that will fix the problem, is there any errors in the console?
Also, are you sure you got the weapon names right? They're case sensitive.
You just retyped exactly what I had. Also, yes I have them right, and there were no upper/lower case issues.
Meh I closed the condition and removed the space between the give and the name, just trying to help. No need to be hasty.
Sorry, I found the problem.
To make a class have a weapon when spawned it was this:
[CODE] -- Check if the player is a Thief
if (player:Team() == TEAM_THIEF) then
player:Give("cider_lockpick");
player:Give("keypad_cracker");
-- Add to the player's spawn weapons.
player._SpawnWeapons["cider_lockpick"] = true;
player._SpawnWeapons["keypad_cracker"] = true;
end;
[/CODE]
In core/plugins/generic/sv_init.lua
Sorry, you need to Log In to post a reply to this thread.