I am trying to make it so on player spawn it will update the players trail rgb but I am getting some funny error.
[CODE]function GM:PlayerInitialSpawn( ply )
if (ply.Trail) then
ply.Trail = util.SpriteTrail(ply, 0, Color(red, green, blue), false, 50, 30, 4, 1/(15+1)*0.5, "trails/laser.vmt")
end
print("Player: " .. ply:Nick() .. ", has spawned.")
ply:SetModel("models/player/kleiner.mdl")
ply:SetTeam( 1 )
ply:ConCommand( "sv_gravity 300" )
ply:ConCommand( "sv_sticktoground 0" )
ply:SetWalkSpeed( 500 )
ply.Trail
end
function GM:PlayerSpawn( ply )
SafeRemoveEntity( ply.Trail )
ply.Trail
end[/CODE]
and the error is:
[CODE]init.lua:44: '=' expected near 'end'
1. unknown - ______/________/gamemode/init.lua:0
[/CODE]
plz help
?bump?
Dont bump between a 4 hour diffrence..
Which line is line 44?
I think the issue is that you just have "ply.Trail" twice in your code, which you don't need, because if you're using that to create the trail, you don't need it since ply.Trail = util.SpriteTrail already created it.
Sorry, you need to Log In to post a reply to this thread.