• DarkRP 2.4.X
    1,868 replies, posted
Falco, you changed the hud for all items and now my money printers that i made dont have huds. Could you point me to where teh code is. Cause it appears you removed it from the cl_init.lua :/ Any help is greatly appreciated.
[QUOTE=hacksore;23711095]Falco, you changed the hud for all items and now my money printers that i made dont have huds. Could you point me to where teh code is. Cause it appears you removed it from the cl_init.lua :/ Any help is greatly appreciated.[/QUOTE] Its in the cl_init of the actual printer entity.
Just wondering, is there a reason why money printers, drug labs, shipments, etc are not pocketable? Is it just for the purposes of role-play or do things actually mess up if they are?
[QUOTE=Drakehawke;23748346]Just wondering, is there a reason why money printers, drug labs, shipments, etc are not pocketable? Is it just for the purposes of role-play or do things actually mess up if they are?[/QUOTE] Probably because they are things that spawn other things. Pocket a NPC and see what happens, that should explain a lot of how the pocket works, and why those things need to be black listed.
I predict this is unlikely to happen and probably more work than it's worth but I think it could be handy for the modules system. Currently, it isn't all that great, it just includes files serverside that are in the modules folder when the gamemode is DarkRP. I've noticed a few other addons/gamemodes use their own hooks. Could hooks for DarkRP be a possibility? For example, my AFK module requires a way of blocking players from changing jobs whilst they are AFK, currently I have to ban the player from every job until they come out of AFK mode, it would be much easier if there was a hook for a player changing job, so I could do something like: [lua] function BlockAFKJobChange( ply, job ) if ply.IsAFK then return false end end hook.Add( "DarkRP_jobchange", "BlockAFKJobChange", BlockAFKJobChange ) [/lua] ply being the player trying to change job, job being the job they are trying to change to. Of course this could be done for lots of things in DarkRP, when a player is arrested, unarrested, search warrants, wanteds, almost anything! Also there's the question of stability, would this be particularly straining on the server? Calling all these hooks quite frequently? [editline]06:29AM[/editline] Oh, and [url=http://www.facepunch.com/misc.php?do=whoposted&t=882371]I just beat Falco at posts in this thread >:D[/url]
[QUOTE=Drakehawke;23751547] [lua] function BlockAFKJobChange( ply, job ) if ply.IsAFK then return false end end hook.Add( "DarkRP_jobchange", "BlockAFKJobChange", BlockAFKJobChange ) [/lua] [/QUOTE] Just wondering, Why is there a end there? [lua] if ply.IsAFK then return false end<--------[/lua] [QUOTE=Drakehawke;23751547]Oh, and [url=http://www.facepunch.com/misc.php?do=whoposted&t=882371]I just beat Falco at posts in this thread >:D[/url][/quote] I have 12 posts? I thought I had like 4. And Damn, Drake, You are very active in this topic :O
[QUOTE=Kaleb;23775014]Just wondering, Why is there a end there? [lua] if ply.IsAFK then return false end<--------[/lua] I have 12 posts? I thought I had like 4. And Damn, Drake, You are very active in this topic :O[/QUOTE] The end there declares where the if statement ends. Without that, you would get a Lua syntax error. Also, I proudly hold my title as the third most active poster in this thread :v:
I thought the next line ends the function? I know what "end" does. I just don't know why it is needed on that same line.
I can't explain why it works that way, but that's how the Lua syntax works. There could be a shortcut method to do one line if coditionals that I don't know of, but I have always done one line if conditionals with the end.
[QUOTE=deadeye536;23775466]I can't explain why it works that way, but that's how the Lua syntax works. There could be a shortcut method to do one line if coditionals that I don't know of, but I have always done one line if conditionals with the end.[/QUOTE] [lua] test = true function TestFunction() if test then return end print( "hello" ) end TestFunction() [/lua] Output: [code]--nothing--[/code] [lua] Test = true function TestFunction() if test then return print( "hello" ) end TestFunction() [/lua] Output: [code] input:6: 'end' expected (to close 'function' at line 2) near '<eof>' [/code] [url]http://www.lua.org/cgi-bin/demo[/url]
The GUI for this is ugly. I don't know what criminal forced you to make this ugly red GUI.
[QUOTE=TommieBoy;23786212]The GUI for this is ugly. I don't know what criminal forced you to make this ugly red GUI.[/QUOTE] It's alright, but I think it clashes horridly with the green of the citizen options.
[QUOTE=deadeye536;23775466]I can't explain why it works that way, but that's how the Lua syntax works. There could be a shortcut method to do one line if coditionals that I don't know of, but I have always done one line if conditionals with the end.[/QUOTE] [lua] function BlockAFKJobChange( ply, job ) return( !ply.IsAFK ) end [/lua]
Okay, i have a problem to report, Its about when i add jobs the F4 Menu becomes unusable, Anyone else get this problem? I use the SVN Dark RP Heres the job List: [code]TEAM_voteswat = AddExtraTeam( "S.W.A.T. Officer", Color( 16, 16, 100, 255 ), "models/player/swat.mdl", [[A SWAT Officer is the big, brutal brother of the Civil Protection. They do the big jobs such as raiding gang bases with the CP.]], {"pocket", "stunstick", "keys", "arrest_stick", "door_ram", "unarrest_stick", "weapon_real_cs_ump_45", "weapon_real_cs_glock18", "weapon_pumpshotgun"}, 'voteswat', 4, 45, 0, 1, false ) TEAM_adminpolice = AddExtraTeam( "Admin Police", Color( 16, 100, 16, 255 ), [[Admin class.]], "models/player/riot.mdl", [[This is the admin police.The big dogs of the police force. Dont piss them off.]], {"arrest_stick", "door_ram", "keys", "pocket", "stunstick", "unarrest_stick", "weapon_real_cs_famas", "weapon_real_cs_grenade", "weapon_real_cs_desert_eagle", "weapon_real_cs_m4a1"}, 'adminpolice', 2, 100, 1, 0, false ) TEAM_overseer = AddExtraTeam( "Overseer", Color( 150, 150, 150, 255 ), [[Admin class.]], "models/player/barney.mdl", [[Super Admin Class. These are the gods (These can either be good or bad)]], {"keys", "pocket", "weapon_real_cs_elites", "weapon_real_cs_ak47", "weapon_real_cs_m249", "weapon_real_cs_galil", "weapon_real_cs_famas", "weapon_real_cs_ump_45", "weapon_real_cs_mp5a5"}, 'overseer', 2, 200, 2, 0, false ) TEAM_votetheif = AddExtraTeam( "Theif", Color( 100, 100, 100, 255 ), "models/player/arctic.mdl", [[A theif breaks into homes and otherbuildings. Obvious.]], {"keys", "lockpick", "pocket"}, 'votetheif', 4, 20, 0, 1, false ) TEAM_biker = AddExtraTeam( "Biker", Color( 50, 50, 50, 255 ), "models/player/Group03/male_08.mdl", [[Admin class.]], [[THIS IS MALICIOUS' CLASS!NO ONE ELSE USE IT OR HEWILL RAPE YOU CONSTANTLY]], {"weapon_real_cs_admin_weapon"}, 'biker', 1, 500, 2, 0, false ) TEAM_votebuild = AddExtraTeam( "Builder", Color( 255, 122.5, 0, 255 ), "models/player/odessa.mdl", [[This is the builder.Advertise your construction services. Prices based on sizeof the construction job.]], {"keys", "pocket", "weapon_real_cs_five-seven"}, 'votebuild', 2, 60, 0, 1, false ) TEAM_votemanager = AddExtraTeam( "Apartment/Hotel Manager", Color( 0, 122.5, 255, 255 ), "models/player/magnusson.mdl", [[This is the apartment or hotelmanager. They managethe apartments and/orhotels. Obviously.]], {"keys", "pocket", "weapon_real_cs_glock18"}, 'votemanager', 2, 40, 0, 1, false ) TEAM_votehitman = AddExtraTeam( "Hitman", Color( 100, 100, 0, 255 ), "models/player/leet.mdl", [[This is a hitman.He takes hits for no lessthan $500. Bigger the hit,the bigger the price.]], {"pocket", "keys", "lockpick", "weapon_real_cs_p228", "weapon_real_cs_knife"}, 'votehitman', 2, 40, 0, 1, false ) TEAM_class = AddExtraTeam( "Terrorist", Color( 150, 100, 50, 255 ), "models/player/Phoenix.mdl", [[The terrorist is a expertin causing disasters.He has permission to RDMonly if a cop is killed in themist of the incident.]], {"pocket", "keys", "weapon_real_cs_desert_eagle", "weapon_real_cs_galil", "weapon_real_cs_grenade", "weapon_real_cs_smoke", "weapon_real_cs_flash"}, 'class', 4, 45, 0, 0, false)[/code] I'm not sure i'm screwing something up, But maybe you guys can help The problem as stated above was the F4 menu whenever i or someone else add classes, the F4 Menu is Unusable it goes into a gray window with an exit bar text on the left side and the "Job" icons show in the corner and i can scroll but barley even see the jobs. And everything goes back to normal after i remove the custom jobs, It all goes back to normal. Is this just me? Also, the darkRP version is the 2.4.1. Thanks.
[QUOTE=Fata;23790031]Okay, i have a problem to report, Its about when i add jobs the F4 Menu becomes unusable, Anyone else get this problem? I use the SVN Dark RP Heres the job List: [code]TEAM_voteswat = AddExtraTeam( "S.W.A.T. Officer", Color( 16, 16, 100, 255 ), "models/player/swat.mdl", [[A SWAT Officer is the big, brutal brother of the Civil Protection. They do the big jobs such as raiding gang bases with the CP.]], {"pocket", "stunstick", "keys", "arrest_stick", "door_ram", "unarrest_stick", "weapon_real_cs_ump_45", "weapon_real_cs_glock18", "weapon_pumpshotgun"}, 'voteswat', 4, 45, 0, 1, false ) TEAM_adminpolice = AddExtraTeam( "Admin Police", Color( 16, 100, 16, 255 ), [[Admin class.]], "models/player/riot.mdl", [[This is the admin police.The big dogs of the police force. Dont piss them off.]], {"arrest_stick", "door_ram", "keys", "pocket", "stunstick", "unarrest_stick", "weapon_real_cs_famas", "weapon_real_cs_grenade", "weapon_real_cs_desert_eagle", "weapon_real_cs_m4a1"}, 'adminpolice', 2, 100, 1, 0, false ) TEAM_overseer = AddExtraTeam( "Overseer", Color( 150, 150, 150, 255 ), [[Admin class.]], "models/player/barney.mdl", [[Super Admin Class. These are the gods (These can either be good or bad)]], {"keys", "pocket", "weapon_real_cs_elites", "weapon_real_cs_ak47", "weapon_real_cs_m249", "weapon_real_cs_galil", "weapon_real_cs_famas", "weapon_real_cs_ump_45", "weapon_real_cs_mp5a5"}, 'overseer', 2, 200, 2, 0, false ) TEAM_votetheif = AddExtraTeam( "Theif", Color( 100, 100, 100, 255 ), "models/player/arctic.mdl", [[A theif breaks into homes and otherbuildings. Obvious.]], {"keys", "lockpick", "pocket"}, 'votetheif', 4, 20, 0, 1, false ) TEAM_biker = AddExtraTeam( "Biker", Color( 50, 50, 50, 255 ), "models/player/Group03/male_08.mdl", [[Admin class.]], [[THIS IS MALICIOUS' CLASS!NO ONE ELSE USE IT OR HEWILL RAPE YOU CONSTANTLY]], {"weapon_real_cs_admin_weapon"}, 'biker', 1, 500, 2, 0, false ) TEAM_votebuild = AddExtraTeam( "Builder", Color( 255, 122.5, 0, 255 ), "models/player/odessa.mdl", [[This is the builder.Advertise your construction services. Prices based on sizeof the construction job.]], {"keys", "pocket", "weapon_real_cs_five-seven"}, 'votebuild', 2, 60, 0, 1, false ) TEAM_votemanager = AddExtraTeam( "Apartment/Hotel Manager", Color( 0, 122.5, 255, 255 ), "models/player/magnusson.mdl", [[This is the apartment or hotelmanager. They managethe apartments and/orhotels. Obviously.]], {"keys", "pocket", "weapon_real_cs_glock18"}, 'votemanager', 2, 40, 0, 1, false ) TEAM_votehitman = AddExtraTeam( "Hitman", Color( 100, 100, 0, 255 ), "models/player/leet.mdl", [[This is a hitman.He takes hits for no lessthan $500. Bigger the hit,the bigger the price.]], {"pocket", "keys", "lockpick", "weapon_real_cs_p228", "weapon_real_cs_knife"}, 'votehitman', 2, 40, 0, 1, false ) TEAM_class = AddExtraTeam( "Terrorist", Color( 150, 100, 50, 255 ), "models/player/Phoenix.mdl", [[The terrorist is a expertin causing disasters.He has permission to RDMonly if a cop is killed in themist of the incident.]], {"pocket", "keys", "weapon_real_cs_desert_eagle", "weapon_real_cs_galil", "weapon_real_cs_grenade", "weapon_real_cs_smoke", "weapon_real_cs_flash"}, 'class', 4, 45, 0, 0, false)[/code] I'm not sure i'm screwing something up, But maybe you guys can help The problem as stated above was the F4 menu whenever i or someone else add classes, the F4 Menu is Unusable it goes into a gray window with an exit bar text on the left side and the "Job" icons show in the corner and i can scroll but barley even see the jobs. And everything goes back to normal after i remove the custom jobs, It all goes back to normal. Is this just me? Also, the darkRP version is the 2.4.1. Thanks.[/QUOTE] Try this: [code] TEAM_voteswat = AddExtraTeam( "S.W.A.T. Officer", Color( 16, 16, 100, 255 ), "models/player/swat.mdl", [[A SWAT Officer is the big, brutal brother of the Civil Protection. They do the big jobs such as raiding gang bases with the CP.]], {"pocket", "stunstick", "keys", "arrest_stick", "door_ram", "unarrest_stick", "weapon_real_cs_ump_45", "weapon_real_cs_glock18", "weapon_pumpshotgun"}, 'swat', 4, 45, 0, 1, false ) TEAM_adminpolice = AddExtraTeam( "Admin Police", Color( 16, 100, 16, 255 ), "models/player/riot.mdl", [[This is the admin police.The big dogs of the police force. Dont piss them off.]], {"arrest_stick", "door_ram", "keys", "pocket", "stunstick", "unarrest_stick", "weapon_real_cs_famas", "weapon_real_cs_grenade", "weapon_real_cs_desert_eagle", "weapon_real_cs_m4a1"}, 'police', 2, 100, 1, 0, false ) TEAM_overseer = AddExtraTeam( "Overseer", Color( 150, 150, 150, 255 ), "models/player/barney.mdl", [[Super Admin Class. These are the gods (These can either be good or bad)]], {"keys", "pocket", "weapon_real_cs_elites", "weapon_real_cs_ak47", "weapon_real_cs_m249", "weapon_real_cs_galil", "weapon_real_cs_famas", "weapon_real_cs_ump_45", "weapon_real_cs_mp5a5"}, 'overseer', 2, 200, 2, 0, false ) TEAM_votetheif = AddExtraTeam( "Theif", Color( 100, 100, 100, 255 ), "models/player/arctic.mdl", [[A theif breaks into homes and otherbuildings. Obvious.]], {"keys", "lockpick", "pocket"}, 'theif', 4, 20, 0, 1, false ) TEAM_biker = AddExtraTeam( "Biker", Color( 50, 50, 50, 255 ), "models/player/Group03/male_08.mdl", [[THIS IS MALICIOUS' CLASS!NO ONE ELSE USE IT OR HEWILL RAPE YOU CONSTANTLY]], {"weapon_real_cs_admin_weapon"}, 'biker', 1, 500, 2, 0, false ) TEAM_votebuild = AddExtraTeam( "Builder", Color( 255, 122.5, 0, 255 ), "models/player/odessa.mdl", [[This is the builder.Advertise your construction services. Prices based on sizeof the construction job.]], {"keys", "pocket", "weapon_real_cs_five-seven"}, 'build', 2, 60, 0, 1, false ) TEAM_votemanager = AddExtraTeam( "Apartment/Hotel Manager", Color( 0, 122.5, 255, 255 ), "models/player/magnusson.mdl", [[This is the apartment or hotelmanager. They managethe apartments and/orhotels. Obviously.]], {"keys", "pocket", "weapon_real_cs_glock18"}, 'manager', 2, 40, 0, 1, false ) TEAM_votehitman = AddExtraTeam( "Hitman", Color( 100, 100, 0, 255 ), "models/player/leet.mdl", [[This is a hitman.He takes hits for no lessthan $500. Bigger the hit,the bigger the price.]], {"pocket", "keys", "lockpick", "weapon_real_cs_p228", "weapon_real_cs_knife"}, 'hitman', 2, 40, 0, 1, false ) TEAM_class = AddExtraTeam( "Terrorist", Color( 150, 100, 50, 255 ), "models/player/Phoenix.mdl", [[The terrorist is a expertin causing disasters.He has permission to RDMonly if a cop is killed in themist of the incident.]], {"pocket", "keys", "weapon_real_cs_desert_eagle", "weapon_real_cs_galil", "weapon_real_cs_grenade", "weapon_real_cs_smoke", "weapon_real_cs_flash"}, 'class', 4, 45, 0, 0, false) [/code] You had [[Admin class]] randomly in the middle of some of the teams, and also you don't need to put the 'vote' in the command. DarkRP will automatically add the 'vote' bit if the job requires voting.
[QUOTE=Drakehawke;23791965]Try this: [code] TEAM_voteswat = AddExtraTeam( "S.W.A.T. Officer", Color( 16, 16, 100, 255 ), "models/player/swat.mdl", [[A SWAT Officer is the big, brutal brother of the Civil Protection. They do the big jobs such as raiding gang bases with the CP.]], {"pocket", "stunstick", "keys", "arrest_stick", "door_ram", "unarrest_stick", "weapon_real_cs_ump_45", "weapon_real_cs_glock18", "weapon_pumpshotgun"}, 'swat', 4, 45, 0, 1, false ) TEAM_adminpolice = AddExtraTeam( "Admin Police", Color( 16, 100, 16, 255 ), "models/player/riot.mdl", [[This is the admin police.The big dogs of the police force. Dont piss them off.]], {"arrest_stick", "door_ram", "keys", "pocket", "stunstick", "unarrest_stick", "weapon_real_cs_famas", "weapon_real_cs_grenade", "weapon_real_cs_desert_eagle", "weapon_real_cs_m4a1"}, 'police', 2, 100, 1, 0, false ) TEAM_overseer = AddExtraTeam( "Overseer", Color( 150, 150, 150, 255 ), "models/player/barney.mdl", [[Super Admin Class. These are the gods (These can either be good or bad)]], {"keys", "pocket", "weapon_real_cs_elites", "weapon_real_cs_ak47", "weapon_real_cs_m249", "weapon_real_cs_galil", "weapon_real_cs_famas", "weapon_real_cs_ump_45", "weapon_real_cs_mp5a5"}, 'overseer', 2, 200, 2, 0, false ) TEAM_votetheif = AddExtraTeam( "Theif", Color( 100, 100, 100, 255 ), "models/player/arctic.mdl", [[A theif breaks into homes and otherbuildings. Obvious.]], {"keys", "lockpick", "pocket"}, 'theif', 4, 20, 0, 1, false ) TEAM_biker = AddExtraTeam( "Biker", Color( 50, 50, 50, 255 ), "models/player/Group03/male_08.mdl", [[THIS IS MALICIOUS' CLASS!NO ONE ELSE USE IT OR HEWILL RAPE YOU CONSTANTLY]], {"weapon_real_cs_admin_weapon"}, 'biker', 1, 500, 2, 0, false ) TEAM_votebuild = AddExtraTeam( "Builder", Color( 255, 122.5, 0, 255 ), "models/player/odessa.mdl", [[This is the builder.Advertise your construction services. Prices based on sizeof the construction job.]], {"keys", "pocket", "weapon_real_cs_five-seven"}, 'build', 2, 60, 0, 1, false ) TEAM_votemanager = AddExtraTeam( "Apartment/Hotel Manager", Color( 0, 122.5, 255, 255 ), "models/player/magnusson.mdl", [[This is the apartment or hotelmanager. They managethe apartments and/orhotels. Obviously.]], {"keys", "pocket", "weapon_real_cs_glock18"}, 'manager', 2, 40, 0, 1, false ) TEAM_votehitman = AddExtraTeam( "Hitman", Color( 100, 100, 0, 255 ), "models/player/leet.mdl", [[This is a hitman.He takes hits for no lessthan $500. Bigger the hit,the bigger the price.]], {"pocket", "keys", "lockpick", "weapon_real_cs_p228", "weapon_real_cs_knife"}, 'hitman', 2, 40, 0, 1, false ) TEAM_class = AddExtraTeam( "Terrorist", Color( 150, 100, 50, 255 ), "models/player/Phoenix.mdl", [[The terrorist is a expertin causing disasters.He has permission to RDMonly if a cop is killed in themist of the incident.]], {"pocket", "keys", "weapon_real_cs_desert_eagle", "weapon_real_cs_galil", "weapon_real_cs_grenade", "weapon_real_cs_smoke", "weapon_real_cs_flash"}, 'class', 4, 45, 0, 0, false) [/code] You had [[Admin class]] randomly in the middle of some of the teams, and also you don't need to put the 'vote' in the command. DarkRP will automatically add the 'vote' bit if the job requires voting.[/QUOTE] He also spelled "Thief" wrong.
[lua]TEAM_biker = AddExtraTeam( "Biker", Color( 50, 50, 50, 255 ), "models/player/Group03/male_08.mdl", [[THIS IS MALICIOUS' CLASS!NO ONE ELSE USE IT OR HEWILL RAPE YOU CONSTANTLY]], {"weapon_real_cs_admin_weapon"}, 'biker', 1, 500, 2, 0, false )[/lua] Seriously... No.
[QUOTE=Kaleb;23814036][lua]TEAM_biker = AddExtraTeam( "Biker", Color( 50, 50, 50, 255 ), "models/player/Group03/male_08.mdl", [[THIS IS MALICIOUS' CLASS!NO ONE ELSE USE IT OR HEWILL RAPE YOU CONSTANTLY]], {"weapon_real_cs_admin_weapon"}, 'biker', 1, 500, 2, 0, false )[/lua] Seriously... No.[/QUOTE] I know, Lol.
Coming up: * Cheques (Cash can only be transferred between people using an entity and a specified player, like money, but only the specified player may take it) * Minor bug fixes Potential updates I will be creating: * Trading system.
[QUOTE=Eusion;23832303] Potential updates I will be creating: * Trading system.[/QUOTE] Explain?
[QUOTE=Drakehawke;23833463]Explain?[/QUOTE] If I decide to create it, It will use an interface to transfer items for items or for money, so instead of simply dropping money to buy an item, you can use the interface instead. After the transaction is complete, the desired item will appear in front of you, and you will now be the entity owner. To trade with someone, simply press use on them. Any opinions? I'm not sure if I should add it yet. Also I need to consult Falco when he returns.
To be honest what would be the point, other then people scamming each other maybe if the item was in the pocket list it would transfer there instead.
[QUOTE=Eusion;23842240]If I decide to create it, It will use an interface to transfer items for items or for money, so instead of simply dropping money to buy an item, you can use the interface instead. After the transaction is complete, the desired item will appear in front of you, and you will now be the entity owner. To trade with someone, simply press use on them. Any opinions? I'm not sure if I should add it yet. Also I need to consult Falco when he returns.[/QUOTE] Dare I say it, Like RuneScape trade?
I get this error when i spawn a money printer(which has been edited a little bit) Can any1 see the problem here? entities\money_printer\cl_init.lua:18: attempt to index global 'MoneyPrinter' (a nil value) [lua]include("shared.lua") function ENT:Initialize() end function ENT:Draw() self.Entity:DrawModel() local Pos = self:GetPos() local Ang = self:GetAngles() local owner = self.dt.owning_ent owner = (ValidEntity(owner) and owner:Nick()) or "unknown" surface.SetFont("HUDNumber5") local TextWidth = surface.GetTextSize("Money printer") local TextWidth2 = surface.GetTextSize(owner) local TextWidth3 = surface.GetTextSize("Money: "..MoneyPrinter:GetNWInt("money")) Ang:RotateAroundAxis(Ang:Up(), 90) cam.Start3D2D(Pos + Ang:Up() * 11.5, Ang, 0.11) draw.WordBox(2, -TextWidth*0.5, -30, "Money printer", "HUDNumber5", Color(140, 0, 0, 100), Color(255,255,255,255)) draw.WordBox(2, -TextWidth2*0.5, 18, owner, "HUDNumber5", Color(140, 0, 0, 100), Color(255,255,255,255)) draw.WordBox(2, -TextWidth3*0.5, 30, "Money: ", "HUDNumber5", Color(140, 0, 0, 100), Color(255,255,255,255)) cam.End3D2D() end function ENT:Think() end [/lua]
I would use the newest DarkRP but the Arrest/Unarrest/Stun Batons don't work. Yes, rp_teletojail and telefromjail is set to 1, and I make them wanted. The Stunstick wont work either.
[QUOTE=Kaleb;23846518]I would use the newest DarkRP but the Arrest/Unarrest/Stun Batons don't work. Yes, rp_teletojail and telefromjail is set to 1, and I make them wanted. The Stunstick wont work either.[/QUOTE] The stunstick no longer does damage I believe, and have you definitely set some jail positions? [editline]04:35PM[/editline] [QUOTE=Naquada;23846443]I get this error when i spawn a money printer(which has been edited a little bit) Can any1 see the problem here? entities\money_printer\cl_init.lua:18: attempt to index global 'MoneyPrinter' (a nil value) [lua]include("shared.lua") function ENT:Initialize() end function ENT:Draw() self.Entity:DrawModel() local Pos = self:GetPos() local Ang = self:GetAngles() local owner = self.dt.owning_ent owner = (ValidEntity(owner) and owner:Nick()) or "unknown" surface.SetFont("HUDNumber5") local TextWidth = surface.GetTextSize("Money printer") local TextWidth2 = surface.GetTextSize(owner) local TextWidth3 = surface.GetTextSize("Money: "..MoneyPrinter:GetNWInt("money")) Ang:RotateAroundAxis(Ang:Up(), 90) cam.Start3D2D(Pos + Ang:Up() * 11.5, Ang, 0.11) draw.WordBox(2, -TextWidth*0.5, -30, "Money printer", "HUDNumber5", Color(140, 0, 0, 100), Color(255,255,255,255)) draw.WordBox(2, -TextWidth2*0.5, 18, owner, "HUDNumber5", Color(140, 0, 0, 100), Color(255,255,255,255)) draw.WordBox(2, -TextWidth3*0.5, 30, "Money: ", "HUDNumber5", Color(140, 0, 0, 100), Color(255,255,255,255)) cam.End3D2D() end function ENT:Think() end [/lua][/QUOTE] Nowhere in that code have you defined what the variable MoneyPrinter is, seeing as it's in an ENT: function, you can just use self. For example: [lua] local TextWidth3 = surface.GetTextSize("Money:"..self:GetNWInt("money")) [/lua]
[QUOTE=Eusion;23832303]Coming up: * Cheques (Cash can only be transferred between people using an entity and a specified player, like money, but only the specified player may take it) * Minor bug fixes Potential updates I will be creating: * Trading system.[/QUOTE] Wait, who are you again?
[QUOTE=tgp1994;23848417]Wait, who are you again?[/QUOTE] [url=http://www.facepunch.com/showpost.php?p=21712689&postcount=736]The other updater of DarkRP.[/url]
[QUOTE=Drakehawke;23848450][url=http://www.facepunch.com/showpost.php?p=21712689&postcount=736]The other updater of DarkRP.[/url][/QUOTE] Wow, how did I miss that :( Welcome to the team, Eusion.
[QUOTE=Drakehawke;23848450][URL="http://www.facepunch.com/showpost.php?p=21712689&postcount=736"]The other updater of DarkRP.[/URL][/QUOTE] How can we trust you won't ruin it with dumb and pointless features?
Sorry, you need to Log In to post a reply to this thread.