• Can't jump in DarkRP
    8 replies, posted
Hi i am having a problem on my server in DarkRP were i am unable to jump for some reason also i am trying too get the taser swep working in a class but whenever i launch up the game too see if its in the class i assigned it too its not there you can download taser here:[url]http://www.garrysmod.org/downloads/?a=view&id=48781[/url]
Is it one server, your server or someone elses? if its someone else, they might have done this [code]if CLIENT then --Prevents clients from calling the +jump console command, but doesn't remove it function BlockJump( ply, bind ) if string.find(bind, "+jump") then return true end end hook.Add( "PlayerBindPress", "BlockJump", BlockJump ) else --Send file to clients AddCSLuaFile( "autorun/nojump.lua" ) --Also set their jump power to 0, so they can't get around the above code by typing +jump in the console function BlockJump( ply ) ply:SetJumpPower( 0 ) end hook.Add( "PlayerInitialSpawn", "BlockJump", BlockJump ) end [/code]
Thanks also how can i make it so players are allowed to pick up rp stuff such as guns money and all that stuff? for some reason its not working
[QUOTE=nofear1999;16220473]Is it one server, your server or someone elses? if its someone else, they might have done this [code]if CLIENT then --Prevents clients from calling the +jump console command, but doesn't remove it function BlockJump( ply, bind ) if string.find(bind, "+jump") then return true end end hook.Add( "PlayerBindPress", "BlockJump", BlockJump ) else --Send file to clients AddCSLuaFile( "autorun/nojump.lua" ) --Also set their jump power to 0, so they can't get around the above code by typing +jump in the console function BlockJump( ply ) ply:SetJumpPower( 0 ) end hook.Add( "PlayerInitialSpawn", "BlockJump", BlockJump ) end [/code][/QUOTE] Ok but what do i add that code too
[QUOTE=jocktalk;16228255]Ok but what do i add that code too[/QUOTE] Oh wait nvm the above post but this is my server and i have not set that command
*sighs* Read the code please? it will NOT allow you to jump... I said look for a code SIMILAR to that.
Lose some weight fatty then you'll jump
I had this problem too. I figured that my server was running on 100tic. Change it to 66tic and it should allow you to jump.
I found the problem darkrp\gamemode\main.lua [code] /*--------------------------------------------------------- Drugs ---------------------------------------------------------*/ function DrugPlayer(ply) if not ValidEntity(ply) then return end local RP = RecipientFilter() RP:RemoveAllPlayers() RP:AddPlayer(ply) umsg.Start("DarkRPEffects", RP) umsg.String("Drugged") umsg.String("1") umsg.End() RP:AddAllPlayers() ply:SetJumpPower(300) GAMEMODE:SetPlayerSpeed(ply, CfgVars["wspd"] * 2, CfgVars["rspd"] * 2) local IDSteam = string.gsub(ply:SteamID(), ":", "") if not timer.IsTimer(IDSteam.."DruggedHealth") and not timer.IsTimer(IDSteam) then ply:SetHealth(ply:Health() + 100) timer.Create(IDSteam.."DruggedHealth", 60/(100 + 5), 100 + 5, function() ply:SetHealth(ply:Health() - 1) end) timer.Create(IDSteam, 60, 1, UnDrugPlayer, ply) end end function UnDrugPlayer(ply) if not ValidEntity(ply) then return end local RP = RecipientFilter() RP:RemoveAllPlayers() RP:AddPlayer(ply) local IDSteam = string.gsub(ply:SteamID(), ":", "") timer.Remove(IDSteam.."DruggedHealth") timer.Remove(IDSteam) umsg.Start("DarkRPEffects", RP) umsg.String("Drugged") umsg.String("0") umsg.End() RP:AddAllPlayers() ply:SetJumpPower(190) GAMEMODE:SetPlayerSpeed(ply, CfgVars["wspd"], CfgVars["rspd"] ) end [/code] Something with the drug effects is messed up, i don't understand lua. But i removed this bit (just drug effect part) from my main.lua and it worked. But when you use drugs u get errors. So anyone that understands lua, mess with this and find a solution please. [editline]09:06PM[/editline] Hmm =/ My friend said it didn't work for his so I'm not sure. Still worth a try though :P
Sorry, you need to Log In to post a reply to this thread.