So, My code is not working, I putted a file named FreeRunnerSpeed.lua in the lua/autorun/server directory
this is the code:
[CODE]hook.Add("PlayerSpawn", "FreeRunnerSpeed", function(ply)
if ply:Team() == TEAM_FREERUNNER then
ply:SetRunSpeed( 400 )
else
ply:SetRunSpeed( GAMEMODE.Config.runspeed )
end
end)[/CODE]
That didn't work, I also modified the gamemode_functions.lua in the gamemode/darkrp/gamemode directory
this is what I edited:
[CODE] GAMEMODE:SetPlayerSpeed(ply, GAMEMODE.Config.walkspeed, GAMEMODE.Config.runspeed)
if ply:Team() == TEAM_FREERUNNER then
GAMEMODE:SetPlayerSpeed(ply, GAMEMODE.Config.walkspeed, GAMEMODE.Config.runspeed + 100)
end[/CODE]
And i tried this in the gamemode_functions:
[CODE] local t = ply:Team()
if t == TEAM_FREERUNNER then
ply:SetRunSpeed( 400 )
end [/CODE]
stop using darkrp
[QUOTE=tyguy;39688238]stop using darkrp[/QUOTE]
Nope.avi
[QUOTE=tyguy;39688238]stop using darkrp[/QUOTE]
If you're not here to help the guy I don't see why you are posting a reply. He can use whatever he wants, although DarkRP is not exactly fabled it's an alright starting point for a person beginning to program in Lua.
As for the question 3nforc3r, replace your gamemode_functions code with [URL="http://pastebin.com/0PmS1155"]this[/URL]. gamemode_functions is the only .lua file that you need to edit in this case. Revert all of the changes that you have made in other files to prevent corruption.
[QUOTE=Keydose;39689593]If you're not here to help the guy I don't see why you are posting a reply. He can use whatever he wants, although DarkRP is not exactly fabled it's an alright starting point for a person beginning to program in Lua.
As for the question 3nforc3r, replace your gamemode_functions code with [URL="http://pastebin.com/0PmS1155"]this[/URL]. gamemode_functions is the only .lua file that you need to edit in this case. Revert all of the changes that you have made in other files to prevent corruption.[/QUOTE]
Ok where do I put this? Just on bottom of the .lua file?
[QUOTE=Keydose;39689593]If you're not here to help the guy I don't see why you are posting a reply. He can use whatever he wants, although DarkRP is not exactly fabled it's an alright starting point for a person beginning to program in Lua.
As for the question 3nforc3r, replace your gamemode_functions code with [URL="http://pastebin.com/0PmS1155"]this[/URL]. gamemode_functions is the only .lua file that you need to edit in this case. Revert all of the changes that you have made in other files to prevent corruption.[/QUOTE]
It didnt work
Sorry, you need to Log In to post a reply to this thread.