Alright so I started a gamemode recently that im using to practice lua as im learning it but for some reason when i try to test it, it gives me a error in console and says unable to locate garrysmod/gamemodes/copsandrobbers/cl_init.lua i checked to make sure it was in there and it was in there can someone hallp D:
If you cant solve this.
The fuck you making gamemodes for.
Originally Posted by Mundu
If you cant solve this.
The fuck you making gamemodes for.
Did you not see where i said im learning you dumb fuck open your Canadian eyes
I would've helped you but seeing as you took the ignorance of another member so seriously, you should probably learn Lua...and be less of a dick...
Originally Posted by Mundu
If you cant solve this.
The fuck you making gamemodes for.
Everyone has to start somewhere.
Originally Posted by YouDontKnowMeLikeReally
I would've helped you but seeing as you took the ignorance of another member so seriously, you should probably learn Lua...and be less of a dick...
wait so how was i wrong by defending my self and maybe you didnt see either but it says learning and im not being a dick..
Originally Posted by UrxHaxor
Alright so I started a gamemode recently that im using to practice lua as im learning it but for some reason when i try to test it, it gives me a error in console and says unable to locate garrysmod/gamemodes/copsandrobbers/cl_init.lua i checked to make sure it was in there and it was in there can someone hallp D:
for i=1, 3 do
Msg("Variable 'i' is equal to"..1..".Which Puts You On Team"..Cake[1].."\n")
end
//Zhe HOUD!
function HUDHide( myhud )
for k, v in pairs{"CHudHealth","CHudBattery"} do
if myhud == v then return false end
end
end
hook.Add("HUDShouldDraw","HUDHide",HUDHide)
function GM:HUDPaint()
self.BaseClass:HUDPaint()]
local ply = LocalPlayer()
local HP = LocalPlayer():Health()
local ARM = LocalPlayer():Armor()
surface.CreateFont("ScoreboardText", 43, 300, false, false, "MyFont")
surface.SetTextColor( 0, 150, 50, 255)
surface.SetTextPos( 100, 20)
surface.SetFont( "MyFont")
surface.DrawText( HP )
function
surface.SetTextColor(0 , 150, 50 ,255)
surface.SetTextPos( 100, 30)
surface.SetFont( "MyFont")
surface.DrawText( ARM )
end
end
//The Welcome Message!
function WMsg()
chat.AddText(Color(0, 140, 130), "[CAR] ", Color(255, 255, 255), "Welcome to Cops and Robbers. Made By Nipplepumper!")
end
usermessage.Hook("Welcome", WMsg )
Its been over a year since I've worked with a game mode so I might be wrong but I don't think cl_init.lua is loaded by default. Try putting AddCSLuaFile("cl_init.lua") in your init.lua
Post back if that helps at all.
Code:
//Tables
Cake = {}
Cake{1} = "Cops"
Cake{2} = "Robbers"
Cake{3} = "Citizen"
for i=1, 3 do
Msg("Variable 'i' is equal to"..1..".Which Puts You On Team"..Cake[1].."\n")
end
You loop through the first three of cake, but that's pointless because it will send you three messages
Originally Posted by LordOfGears2
Code:
//Tables
Cake = {}
Cake{1} = "Cops"
Cake{2} = "Robbers"
Cake{3} = "Citizen"
for i=1, 3 do
Msg("Variable 'i' is equal to"..1..".Which Puts You On Team"..Cake[1].."\n")
end
You loop through the first three of cake, but that's pointless because it will send you three messages
Ohhhhhhhhhhhhh
Originally Posted by Atheon
Its been over a year since I've worked with a game mode so I might be wrong but I don't think cl_init.lua is loaded by default. Try putting AddCSLuaFile("cl_init.lua") in your init.lua
Post back if that helps at all.
I already have that in there :/
Originally Posted by UrxHaxor
I already have that in there :/
Are you including cl_init.lua? Also, you're still looping over the same thing.
Originally Posted by NotDaz
Are you including cl_init.lua? Also, you're still looping over the same thing.