On one of the maps for my gamemode, people can cheat and surf to get to the end, but I need to prevent that.
This was my attempt, but sometimes it triggers when they are jumping too.
[code]
function preventSurf(ply, movedata)
if !ply:Alive() then
return false
end
if ply:IsOnGround() then
ply.isSurfing = false
return false
end
if movedata:GetVelocity( ).z <= 0 then
ply.isSurfing = false
return false
end
if movedata:GetVelocity( ).z > 50 then
ply.isSurfing = false
return false
end
if ply.isSurfing then
return false
end
ply.isSurfing = true
timer.Simple( 8, function()
if ply:GetVelocity().z < 50 and ply:GetVelocity().z > 0 and ply.isSurfing then
ply:KillSilent()
ply:ChatPrint("[red]Surfing is Prohibited!")
ply.isSurfing = false
return true
end
end)
return false
end
hook.Add("Move", "Prevent Surfing", preventSurf)
[/code]
Why don't you just block the surfable zone..?
put playerclip brushes on the slanted wall so it looks the same, but you cant go onto it.
Its not his map, he said on one of hte maps for my gamemode, it might be a random map, just for his gamemode.
Ever thought of getting the surface normal of whatever the player is running on? And do stuff when it's too steep.
Which part of the trace.HitNormal:Angle() would I compare to, and how much?
Get 'Falco Prop Protection'
[url=http://www.facepunch.com/showthread.php?t=786522]Click here[/url]
It has an anti-surf feature.
[lua]function preventSurf(ply, movedata)
if !ply:Alive() then
return false
end
if ply:IsOnGround() then
ply.isSurfing = false
return false
end
if movedata:GetVelocity( ).z <= 0 then
ply.isSurfing = false
return false
end
if movedata:GetVelocity( ).z > 50 then
ply.isSurfing = false
return false
end
if ply.isSurfing then
return false
end
ply.isSurfing = true
local x = 0
while ply:GetVelocity().z < 50 and ply:GetVelocity().z > 10 and ply.isSurfing do
if x >= 8 then
ply:KillSilent()
ply:ChatPrint("[red]Surfing is Prohibited!")
ply.isSurfing = false
return true
end
x += 1
end
return false
end
hook.Add("Move", "Prevent Surfing", preventSurf)[/lua]
This maybe?
Oh I apologize, I didn't mean prop surfing, I meant CSS-style surfing, along the map.
place in the init.lua
[lua]CreateClientConVar("gm_spawn","BlOCKED", true,true)[/lua]
That.. has nothing to do with this thread..
He said Prevent Surfing Dumbo so if people spawning props and using physgun because he didn't say what weapons are included so your the biggest idiot in the forum, skiddie.
[QUOTE=ecabc;16600805]He said Prevent Surfing Dumbo so if people spawning props and using physgun because he didn't say what weapons are included so your the biggest idiot in the forum, skiddie.[/QUOTE]
That was a dumb attempt to cover up your stupidity. As for the prop surfing, how about making it so if the prop isn't frozen by the physics gun, players can go through it?
I remember seeing a function that checks if a player is phsygunning or gravgunning a prop maybe you could check if that's true and then if it is check if the player is standing on it or if the props velocity is moving fast make it take 0 gravity so it wont kill anyone when released.
Also ecabc I don't know what your problem is but from what I can tell you need to get over yourself and realize your not the god of the lua section.....
[editline]03:54PM[/editline]
[QUOTE=ColePT;16564343]Oh I apologize, I didn't mean prop surfing, I meant CSS-style surfing, along the map.[/QUOTE]
I though those maps had to be made to surf on tho :/
Lets get this straight you have a gamemode that doesn't want people to be able to surf on the map, and your playing on a surf map tho? what map is it anyway.
Why not just nocollide the player's prop with the player [i]while[/i] they are holding it with the physics gun?
[QUOTE=ColePT;16564343]Oh I apologize, I didn't mean prop surfing, I meant CSS-style surfing, along the map.[/QUOTE]
/me facepalm
He allready said its not propsurfing he is dealing with.
[QUOTE=mcd1992;16608527]I remember seeing a function that checks if a player is phsygunning or gravgunning a prop maybe you could check if that's true and then if it is check if the player is standing on it or if the props velocity is moving fast make it take 0 gravity so it wont kill anyone when released.
Also ecabc I don't know what your problem is but from what I can tell you need to get over yourself and realize your not the god of the lua section.....
[editline]03:54PM[/editline]
I though those maps had to be made to surf on tho :/
Lets get this straight you have a gamemode that doesn't want people to be able to surf on the map, and your playing on a surf map tho? what map is it anyway.[/QUOTE]
Nor are you..
Like how Sassilization prevent surfing on XC_egypt.
[QUOTE=ColePT;16722506]Like how Sassilization prevent surfing on XC_egypt.[/QUOTE]
Ohh, you can kill them after soo many seconds like if there surfing making it trigger hurt.
[QUOTE=Mavrik;16634440]Why not just nocollide the player's prop with the player [i]while[/i] they are holding it with the physics gun?[/QUOTE]
There's your answer if he's talking about prop surfing, but I think he said CSS surfing whatever that is.
CSS Surfing is holding a strafe key while sliding along a slanted wall, kinda like wall running, but your pushing against gravity
Yes, but how do I prevent it, without editting the map.
Sorry, you need to Log In to post a reply to this thread.