• Step Size + Invisibility - Not working
    10 replies, posted
[CODE]ITEM.Name = 'Step Size' ITEM.Price = 1500 ITEM.Model = 'models/props_junk/GlassBottle01a.mdl' ITEM.NoPreview = true function ITEM:OnEquip(player, modifications) player:SetStepSize(250) end function ITEM:OnHolster(ply) player:SetStepSize(18)end[/CODE] [CODE]ITEM.Name = 'Invisible Potion' ITEM.Price = 1000 ITEM.Model = 'models/props_junk/GlassBottle01a.mdl' ITEM.NoPreview = true function ITEM:OnEquip(ply, modifications) ply:SetColor(255, 255, 255, 200) end function ITEM:OnHolster(ply) ply:SetColor(255, 255, 255, 255) end[/CODE] Issue with both. Invisible potion makes player purple, and step size just doesn't work at all.
Instead of ply:SetColor(255, 255, 255, 200) do [code] ply:SetColor(Color(255, 255, 255, 0)) ply:SetRenderMode(RENDERMODE_TRANSALPHA)[/code]
Will that make them completely invisible? I only want it to be partial.
[lua] ply:SetColor(Color(255, 255, 255, 200)) ply:SetRenderMode(RENDERMODE_TRANSALPHA) [/lua] Use this instead then
If something is ever purple, you need to add Color(). You can no longer do SetColor(255,255,255,255). You have to do SetColor(Color(255,255,255,255)). Also, what do you plan to accomplish with step size? [url]http://gmodwiki.net/Lua/Classes/Player/SetStepSize[/url] That's what step size does. Lets them step higher.
I just want them to step higher. It's powerups for my TTT server.
player:SetStepSize(number stepHeight) works ( I just tested it ), try walking over players.
ITEM.Name = 'Step Size' ITEM.Price = 1500 ITEM.Model = 'models/props_junk/GlassBottle01a.mdl' ITEM.NoPreview = true function ITEM:OnEquip(player, modifications) player:SetStepSize(250) end function ITEM:OnHolster(ply) player:SetStepSize(18)end It didn't work on this.
(18)end should be (18) end with a space in between them or enter or something, right?
[QUOTE=pkhzor;40844899](18)end should be (18) end with a space in between them or enter or something, right?[/QUOTE] It doesn't really matter. But it will look better if he would put end on the next line.
[LUA] ITEM.Price = 1500 ITEM.Model = 'models/props_junk/GlassBottle01a.mdl' ITEM.NoPreview = true function ITEM:OnEquip(ply, modifications) ply:SetStepSize(250) end function ITEM:OnHolster(ply) ply:SetStepSize(18) end [/LUA] Make sure this stuff is called serverside.
Sorry, you need to Log In to post a reply to this thread.