annoying problem

Hello

my clan started a RP server juss this month and im tryin to get everything set up in our server. using the rp map RP_EvoCity_v2d i placed a chair at the top level of nexus to make a mayors office and well everytime i sit in the chair then get out i get stuck in the roof!
i was wondering is there anyway to fix this problem…

ive seen in other servers that they dont have this problem
Ex: VentMob

will someone please help me will really apriciate it

http://www.garrysmod.org/img/?t=dll&id=48647

Try installing that.

thanks man

and a big thanks from The Seventh Division gmod clan

[editline]04:42PM[/editline]

I put it in autrorun and it didnt work :frowning:
were do i put it?

Where in the autorun folder did you put it: client, server, or just in the folder?

[editline]13:37[/editline]

Hold on, I’m gonna test it myself.

[editline]13:38[/editline]

Putting it in lua/autorun seemed to give the intended effect, however it came with a side-effect: instead of getting stuck in the ceiling, you’ll get stuck in the ground. I’m gonna see if I can modify the script so that that doesn’t happen.

[editline]13:39[/editline]

Move the script into lua/autorun, and replace the current code with the following:

[lua]
function PlayerExitedVehicle(ply,ent)
if
not ent:IsValid() then
return
end
if
not ply:Alive()
then return
end
if
not ply:IsValid() then
return
end
if
ent:GetClass() == “prop_vehicle_prisoner_pod” then
local ang = ply.PhxChairAng
local pos = ang:Forward() * 50 + ent:GetPos()
ang.p = ent:GetAngles().p
ang.r = ent:GetAngles().r
pos.z = ent:GetUp().z * -10 + ent:GetPos().z + 10
ply:SetPos(pos)
if
not ply.PhxChairAng then
return
end

end

end

hook.Add(“Think”,“GetVehicleState”,function()
for k, v in pairs(player.GetAll()) do
if v:InVehicle() then
if not v.PhxVehicle then
v.PhxVehicle = v:GetVehicle()
end
v.PhxChairAng = v:GetAimVector():Angle()
else
if v.PhxVehicle then
PlayerExitedVehicle(v,v.PhxVehicle)
v.PhxVehicle = nil
end
end
end
end)
[/lua]

[editline]13:40[/editline]

There’s something funny about the script, though.
For some reason, whoever wrote it wanted it to only affect the airboat seat, and two of the three PHX car seats.

[editline]13:41[/editline]

Alright, edited the script AGAIN. This time, it should affect ALL vehicles (with the exception of jeeps, airboats, and any vehicles derived herein).