0 Members and 1 Guest are viewing this topic.
Hey guys, what's wrong with my code?Code: [Select]for i,1 maxplayers docurtime = myvariableend
for i,1 maxplayers docurtime = myvariableend
Dude, that's terrible. Do it like this:Code: [Select]For i,1 MaxPayers doCurTime = MySuperTable[i] = 2 * (const*5)return loop false;end;
For i,1 MaxPayers doCurTime = MySuperTable[i] = 2 * (const*5)return loop false;end;
You guys are so stupid, watch and learn, noobs.Code: [Select]GDPTLastPos = {}GDPTLastPart = {}GDPTParticle = {}GDParticleTimes = 0.02for k,v in pairs(player.GetAll()) doGDPTLastPos[v] = Vector(0,0,0)GDPTLastPart[v] = 0GDPTParticle[v] = nilendfunction GDDecipher(ply, command, argv, args) if #argv < 1 then ULib.tsay( ply, ulx.LOW_ARGS ) return endlocal matpassed = nilif argv == "fire" then matpassed = "gd_fire" endif argv == "bluefire" then matpassed = "gd_blueflame" endif argv == "plasmablue" then matpassed = "gd_plasmablue" endif argv == "plasmared" then matpassed = "gd_plasmared" endif argv == "plasmagreen" then matpassed = "gd_plasmagreen" endif argv == "plasmateal" then argvpassed = "gd_plasmateal" endif argv == "plasmapurple" then matpassed = "gd_plasmapurple" endif argv == "bloodblue" then matpassed = "gd_bloodblue" endif argv == "bloodred" then matpassed = "gd_bloodred" endif argv == "bloodgreen" then matpassed = "gd_bloodgreen" endif argv == "bloodteal" then matpassed = "gd_bloodteal" endif argv == "bloodpurple" then matpassed = "gd_bloodpurple" endif argv == "ring" then matpassed = "gd_ring" endif argv == "whiteshine" then matpassed = "gd_whitelight" endif argv == "striderball" then matpassed = "gd_strider" endif argv == "beam" then matpassed = "gd_beam" endif argv == "flash" then matpassed = "gd_flash" endif argv == "plasmarainbow" then matpassed = "gd_plasmaall" endif argv == "bloodrainbow" then matpassed = "gd_bloodall" endif argv == "light" then matpassed = "gd_light" endif argv == "none" then GDParticle[ply] = nil endGDParticle[ply] = matpassedendfunction GDParticleDraw()for k,v in pairs(player.GetAll()) doMsg(GDPTParticle[v])if GDParticle[v] == nil then return;endif GDPTLastPos[v] ~= v:GetPos() thenif GDPTLastPart[v] + GDParticleTimes < CurTime() then local effectdata = EffectData() effectdata:SetStart(v:GetPos()) effectdata:SetOrigin(v:GetPos()) effectdata:SetScale( 1 ) util.Effect( GDPTParticle[v], effectdata ) GDPTLastPos[v] = v:GetPos() GDPTLastPart[v] = CurTime() end end end endhook.Add( "Think", "GD Part Think", GDParticleDraw ) ulx.concommand( "trail", GDDecipher, "<choice> - Gives you a particle trail.", ULib.ACCESS_ALL )ulx.concommand( "trailhelp", GDHelp, "- Displays all valid particles you can use.", ULib.ACCESS_ALL )
GDPTLastPos = {}GDPTLastPart = {}GDPTParticle = {}GDParticleTimes = 0.02for k,v in pairs(player.GetAll()) doGDPTLastPos[v] = Vector(0,0,0)GDPTLastPart[v] = 0GDPTParticle[v] = nilendfunction GDDecipher(ply, command, argv, args) if #argv < 1 then ULib.tsay( ply, ulx.LOW_ARGS ) return endlocal matpassed = nilif argv == "fire" then matpassed = "gd_fire" endif argv == "bluefire" then matpassed = "gd_blueflame" endif argv == "plasmablue" then matpassed = "gd_plasmablue" endif argv == "plasmared" then matpassed = "gd_plasmared" endif argv == "plasmagreen" then matpassed = "gd_plasmagreen" endif argv == "plasmateal" then argvpassed = "gd_plasmateal" endif argv == "plasmapurple" then matpassed = "gd_plasmapurple" endif argv == "bloodblue" then matpassed = "gd_bloodblue" endif argv == "bloodred" then matpassed = "gd_bloodred" endif argv == "bloodgreen" then matpassed = "gd_bloodgreen" endif argv == "bloodteal" then matpassed = "gd_bloodteal" endif argv == "bloodpurple" then matpassed = "gd_bloodpurple" endif argv == "ring" then matpassed = "gd_ring" endif argv == "whiteshine" then matpassed = "gd_whitelight" endif argv == "striderball" then matpassed = "gd_strider" endif argv == "beam" then matpassed = "gd_beam" endif argv == "flash" then matpassed = "gd_flash" endif argv == "plasmarainbow" then matpassed = "gd_plasmaall" endif argv == "bloodrainbow" then matpassed = "gd_bloodall" endif argv == "light" then matpassed = "gd_light" endif argv == "none" then GDParticle[ply] = nil endGDParticle[ply] = matpassedendfunction GDParticleDraw()for k,v in pairs(player.GetAll()) doMsg(GDPTParticle[v])if GDParticle[v] == nil then return;endif GDPTLastPos[v] ~= v:GetPos() thenif GDPTLastPart[v] + GDParticleTimes < CurTime() then local effectdata = EffectData() effectdata:SetStart(v:GetPos()) effectdata:SetOrigin(v:GetPos()) effectdata:SetScale( 1 ) util.Effect( GDPTParticle[v], effectdata ) GDPTLastPos[v] = v:GetPos() GDPTLastPart[v] = CurTime() end end end endhook.Add( "Think", "GD Part Think", GDParticleDraw ) ulx.concommand( "trail", GDDecipher, "<choice> - Gives you a particle trail.", ULib.ACCESS_ALL )ulx.concommand( "trailhelp", GDHelp, "- Displays all valid particles you can use.", ULib.ACCESS_ALL )
Um.. what?