• What do you need help with? V3
    6,419 replies, posted
[QUOTE=hellguy;39499847]I tried using "resource.AddFile", also tried using this script [url]http://pastebin.com/qkMtWr6B[/url] , but nothing works, the players even seem to be downloading stuff(materials, sounds, models, and textures) from my server(dedicated), but they don't.[/QUOTE] If you are using FastDL make sure they are uploaded to your fastdl server.
[QUOTE=ZachPL;39499867]If you are using FastDL make sure they are uploaded to your fastdl server.[/QUOTE] They are, I even tried using ulx "downloads.txt" at ulx/data/ulx folder, but nothing works.
Does anyone know what would cause an error message to derp... [code] [ERROR] )' 1. unknown - addons/evolve/lua/ev_plugins/sv_restriction.lua:0 [/code]
[QUOTE=Pandaman09;39500161]Does anyone know what would cause an error message to derp... [code] [ERROR] )' 1. unknown - addons/evolve/lua/ev_plugins/sv_restriction.lua:0 [/code][/QUOTE] Give the entire lua error + your lua script please
I would first like to say that I am updating evolve for some un-god forsaken reason. I would also like to state that i haven't looked at this yet, since i'm trying to fix the loader first. [url]http://pastebin.com/2qY1Y7gF[/url] P.s. the pastebin is only good for 1 day EDIT: i can tell you it's not the file.Find which i just fixed... :P
Players do not spawn on my gamemode. Help? [QUOTE]function GM:PlayerInitialSpawn( ply ) ply:PrintMessage( HUD_PRINTTALK, "Welcome, to my first gamemode" .. ply:Name() .. "!" ) ply:SetGravity ( 1 ) ply:SetMaxHealth( 100, true ) ply:SetWalkSpeed( 150 ) ply:SetRunSpeed ( 200 ) end local Team == math.random( 4, 5 ) end if Team == 4 ply:SetTeam( 2 ) elseif Team == 5 then ply:SetTeam( 3 ) end[/QUOTE]
[QUOTE=fryguy334;39500573]Players do not spawn on my gamemode. Help?[/QUOTE] [code] function GM:PlayerInitialSpawn( ply ) ply:PrintMessage( HUD_PRINTTALK, "Welcome, to my first gamemode " .. ply:Name() .. " !" ) ply:SetGravity ( 1 ) ply:SetMaxHealth( 100, true ) ply:SetWalkSpeed( 150 ) ply:SetRunSpeed ( 200 ) ply:SetTeam( math.random( 2, 3 ) ) end [/code] You don't just randomly use end's. Also, the thing you did to randomly set the team was kinda unnecessary.
-snip- not needed anymore.
[CODE] if CLIENT then return end for k,v in pairs( weapons.GetList() ) do print( v.PrintName ) end [/CODE] Hello! Why this code prints in console "nil" many times? Thanks.
[QUOTE=Pyroman06;39503916][CODE] if CLIENT then return end for k,v in pairs( weapons.GetList() ) do print( v.PrintName ) end [/CODE] Hello! Why this code prints in console "nil" many times? Thanks.[/QUOTE] [url]http://maurits.tv/data/garrysmod/wiki/wiki.garrysmod.com/index4b29.html[/url] .PrintName is Client side only
I'll be able to get server weapons names using this script?
Question, how would someone make in lua a box where certain people go in and or detect entities in it ? I cant find a function for it
I think there's a way to get the table with the tablekey being a string and having the * wildcard. Right? [lua] -- How it is being loaded right now. MapLib[MapCycleList[k]] --Table Format MapLib["zs_asylum*"] = { Name = "Asylum", Description = "An abandoned asylum.", Author = nil, MinPlayers = 0 } [/lua]
[CODE] --Chat Tags by Tyguy CreateClientConVar("chat_tags_color_r", 255, true, false) CreateClientConVar("chat_tags_color_g", 0, true, false) CreateClientConVar("chat_tags_color_b", 0, true, false) CreateClientConVar("chat_tags_color_a", 255, true, false) CreateClientConVar("chat_tags_color_c", 124, true, false) CreateClientConVar("chat_tags_color_d", 252, true, false) CreateClientConVar("chat_tags_color_e", 255, true, false) CreateClientConVar("chat_tags_color_f", 215, true, false) local Tags = { --Group --Tag --Color {"admin", "[ADMIN] ", Color(0, 0, 255, 255) }, {"superadmin", "[SUPERADMIN] ", Color(0, 255, 255) }, } hook.Add("OnPlayerChat", "Tags", function(ply, strText, bTeamOnly) for k,v in pairs(Tags) do if ply:IsUserGroup(v[1]) then local R = GetConVarNumber("chat_tags_color_r") local G = GetConVarNumber("chat_tags_color_g") local B = GetConVarNumber("chat_tags_color_b") local A = GetConVarNumber("chat_tags_color_a") local A = GetConVarNumber("chat_tags_color_c") local A = GetConVarNumber("chat_tags_color_d") local A = GetConVarNumber("chat_tags_color_e") local A = GetConVarNumber("chat_tags_color_f") local nickteam = team.GetColor(ply:Team()) if !bTeamOnly then chat.AddText(v[3], v[2], nickteam, ply:Nick(), color_white, ": ", strText) return true else chat.AddText(v[3], v[2], nickteam, "(TEAM) ", ply:Nick(), color_white, ": ", strText) return true end end end end ) [/CODE] Client-side script. SOMETIMES (not always) it kicks player with: [IMG]http://puu.sh/1YO7U.gif[/IMG] How can I fix it? Thanks.
[QUOTE=Pandaman09;39494773]change the colon ":" after ignite to a space (maybe a semi colon ";") EDIT: it might have to be wrapped in a function.[/QUOTE] That worked, thanks!
[QUOTE=Pyroman06;39504961][CODE] --Chat Tags by Tyguy CreateClientConVar("chat_tags_color_r", 255, true, false) CreateClientConVar("chat_tags_color_g", 0, true, false) CreateClientConVar("chat_tags_color_b", 0, true, false) CreateClientConVar("chat_tags_color_a", 255, true, false) CreateClientConVar("chat_tags_color_c", 124, true, false) CreateClientConVar("chat_tags_color_d", 252, true, false) CreateClientConVar("chat_tags_color_e", 255, true, false) CreateClientConVar("chat_tags_color_f", 215, true, false) local Tags = { --Group --Tag --Color {"admin", "[ADMIN] ", Color(0, 0, 255, 255) }, {"superadmin", "[SUPERADMIN] ", Color(0, 255, 255) }, } hook.Add("OnPlayerChat", "Tags", function(ply, strText, bTeamOnly) for k,v in pairs(Tags) do if ply:IsUserGroup(v[1]) then local R = GetConVarNumber("chat_tags_color_r") local G = GetConVarNumber("chat_tags_color_g") local B = GetConVarNumber("chat_tags_color_b") local A = GetConVarNumber("chat_tags_color_a") local A = GetConVarNumber("chat_tags_color_c") local A = GetConVarNumber("chat_tags_color_d") local A = GetConVarNumber("chat_tags_color_e") local A = GetConVarNumber("chat_tags_color_f") local nickteam = team.GetColor(ply:Team()) if !bTeamOnly then chat.AddText(v[3], v[2], nickteam, ply:Nick(), color_white, ": ", strText) return true else chat.AddText(v[3], v[2], nickteam, "(TEAM) ", ply:Nick(), color_white, ": ", strText) return true end end end end ) [/CODE] Client-side script. SOMETIMES (not always) it kicks player with: [IMG]http://puu.sh/1YO7U.gif[/IMG] How can I fix it? Thanks.[/QUOTE] I think that this function is used by ULX or ULib .
-snip-
[QUOTE=Pyroman06;39504961]SOMETIMES (not always) it kicks player with: [IMG]http://puu.sh/1YO7U.gif[/IMG] How can I fix it? Thanks.[/QUOTE] If it is only kicking them sometimes with that error message, it could be that someone on the console is using "say" in which case ply will be nil or a null entity. You should do a check so your if statement looks something like this: [lua]if ply and IsValid(ply) and ply:IsPlayer() and ply:IsUserGroup(v[1])[/lua]
[QUOTE=Matt-;39505735]If it is only kicking them sometimes with that error message, it could be that someone on the console is using "say" in which case ply will be nil or a null entity. You should do a check so your if statement looks something like this: [lua]if ply and IsValid(ply) and ply:IsPlayer() and ply:IsUserGroup(v[1])[/lua][/QUOTE] Actually it means the usergroup he's / they're trying to call is nil, caused by a none admin possibly.
[QUOTE=RetTurtl3;39505767]Actually it means the table he's / they're trying to call is nil, caused by a none admin possibly.[/QUOTE] No it doesn't, read the error, "attempt to call method 'IsUserGroup' ( a nil value )". This means IsUserGroup is nil, this usually occurs when dealing with an entity object that isn't a player. Please don't try to help if you have no idea what you're talking about.
[QUOTE=Matt-;39505815]No it doesn't, read the error, "attempt to call method 'IsUserGroup' ( a nil value )". This means IsUserGroup is nil, this usually occurs when dealing with an entity object that isn't a player. Please don't try to help if you have no idea what you're talking about.[/QUOTE] Which is what i just said.
[QUOTE=RetTurtl3;39505851]Which is what i just said.[/QUOTE] Then why did you rate me disagree initially and make a post disagreeing with it? :smug:
Question: I've create a HUD I have added an Avatar and I want to put the nickname in front of the avatar. But the problem is that I can't, the nick name is always behind the avatar. UPDATE : 21:30 07/12/2013 The informative rate doesn't really help me.And I said this because i know you can help me.
Show us the code, and we might help.
Is there a way to temporarily disable a players movement when they use an NPC?
[QUOTE=Triple-X;39509908]Is there a way to temporarily disable a players movement when they use an NPC?[/QUOTE] Player:Lock() and Player:UnLock()
[QUOTE=Persious;39509795]Show us the code, and we might help.[/QUOTE] [LUA] function CoolHUD() //Avatar local Avatar = vgui.Create("AvatarImage") Avatar:SetPos(40, ScrH()-150) Avatar:SetSize(128, 128) Avatar:SetPlayer( LocalPlayer(), 64 ) AvatarShouldDraw = 0 //Avatar Background draw.RoundedBox(0, 35, ScrH() - 155, 140, 139, Color (0,0,0,220)) //--Avatar //Background Name draw.RoundedBox(0, 35, ScrH() - 55, 140, 40, Color (0,0,0,10)) //--Name draw.SimpleText(LocalPlayer():Nick(),"TargetID", 70,ScrH() - 180, Color(255,255,255)) end hook.Add("HUDPaint","CoolHUD",CoolHUD) [/LUA]
I can't get my Weapon's Hold Type to change, I'm trying to do it runtime and recently read it has to done clientside too, so I put [lua] if ( CLIENT ) then self:SetWeaponHoldType("fist") end [/lua] So I put that but it doesn't seem to fix it.
dear god are you creating a vgui element in a HUDPaint? don't do that
[QUOTE=Banana Lord.;39510562]dear god are you creating a vgui element in a HUDPaint? don't do that[/QUOTE] So I should create that outside the HUDPaint, right ??
Sorry, you need to Log In to post a reply to this thread.