RP Gamemode advancement : Gui help needed...

Ok so, i’ve done some more on my gamemode :

  • Mayor job done, now it’s working like an election system.
  • Job selection NPC in making (it’s a NPC used to choose jobs, like RealLife)
  • TDM Cars extention mod no longer throwing any errors : All cars are normaly ready to use.
  • Keys weapon done : users can now lock and unlock doors with their keys (i will make lock unlock for vehicle later, because of sound problems)
  • I made a content addon on client side to add sounds and textures.
  • For DPanelList, i used it anyway, and it’s working now, so done for that
  • Player stopped respawned as expected after added a hook, so done with that
  • Done about textures, it’s working enough…
  • Sounds are now working too.

Now, the list of problems i just got :

  • Entity:Remove() not working on rp_evocity_v33x auto generated entities…
  • Door text rendering still bug for ‘func_door_rotating’, ‘func_door’, but works as expected on ‘prop_door’ and ‘prop_door_rotating’

The most strange is that on client side i get no errors such as file not found for textures or sounds, i just get nothing the sounds just won’t play and textures just won’t display as real, they are displaying as missing textures but no errors in client console…

Please help me… For the moment i would realy be happy if you give me any options for DPanelList deprecation and for external media stuff…

  1. You can still use it.
  2. You are using it incorrectly
  3. Most likely wrong samplerate ( must be 44100 ), or not forcing download
  4. Not a function, a hook: http://wiki.garrysmod.com/page/GM/PlayerDeathThink
  5. Lies.
  6. What?

First of so thanks for answering as much quickly !
1 - Yes but when i see the Gmod wiki it says that they will remove that function
2 - Here is my code (uploaded to client by Clients modules loader)



hook.Add("HUDPaint", "RealisticRoleplay_LogoRenderer", function () 
	if (LocalPlayer().DisplayLogo) then
		local texID = surface.GetTextureID("realistic_rp/gui/connectBG")
		surface.SetTexture(texID)
		surface.DrawTexturedRect(0, 0, ScrW(), ScrH())
	end
end)


3 - I will try to see…
4 - Thank you very much was searching for about hours for that, thanks anyway, i will test that.
5 - I don’t realy understand because the code is working on singleplayer, but never works on multiplayer… Realy strange. Indead, i just need to delete entity index 306, you will say why ? Well, you know this map has complete white sky, so to get Atmos mod working properly, i need to manualy delete the entity with my physgun (take it away from his place)
6 - Indead, i just made a cam.Start3D2D to get texts rendered on doors relative to door position and door rotation and door angles. My codes works properly on 2 door type (prop_door and prop_door_rotating), but on func_door or func_door_rotating, i got texts not correctly centered and rotated on doors.

Remove props on InitPostEntity; also, do not SPAWN any entities until at least InitPostEntity.

Look at this: How it loads the maps/<map_name>/ folder - it hooks into InitPostEntity and doesn’t load map stuff until then.
https://dl.dropboxusercontent.com/u/26074909/tutoring/_redistributable/basedev_gamemode.rar

If you spawn entities prior to InitPostEntity, the EntIndexs will be different ( more different than just the game.MaxPlayers( ) difference )

I use v33, removing entities is possible…

Use SRCDS to test code: https://dl.dropboxusercontent.com/u/26074909/tutoring/server_srcds_steamcmd/setting_up_a_server_with_steamcmd.lua.html

Easy to set up, and helps with debugging in a “real” environment.

@Acecool
Trolol !! You asked me to use SRCDS !! I’m server hoster !!! So of curse i got SRCDS ! I’m hosting my server on my own server machine witch is realy powerfull ! Over 1 million props, it won’t crash, but my graphic card becomes realy crazy…

I already tried to put the map corrector in InitPostEntity, but it’s not working, the sky is still white when i connect…

In my gamemode init.lua



function CorrectMap()
	for k, v in pairs(ents.GetAll()) do
		if (v:EntIndex() == 306) then			
			v:Remove()
			GameGlobal:PrintMessage("Removed map entity id 306 !")
		end
	end
	GameGlobal:PrintMessage("Finished map correction...")
end

function GM:InitPostEntity()
	CorrectMap()
	
	CheckTables() -- Making Data saving system working so players don't get 0€ when spawning
	LoadDoors()-- Assign map doors to names and preparing properties to be able to be own by players	
	
	GenerateRPHumans()-- NPC Generation (Property management and job management)
end


You have to SetRenderMode to RENDERMODE_NORMAL for the sky box entity… Then set it transparent… Or remove it…

Entity( x ):Remove( );

It is: DAYNIGHT_BRUSH = 415;

Thank you, but unfortunatly still white sky when connect.
My new code :



function CorrectMap()
	Entity(415):SetRenderMode(RENDERMODE_NORMAL)
	Entity(415):Remove()
	GameGlobal:PrintMessage("Removed map entity id 415 !")
	GameGlobal:PrintMessage("Finished map correction...")
end


It still not changing anything… I think i’m condamned to put away this entity with my admin spetial physgun…

Make sure you Delete the entity in InitPostEntity. Make sure you do NOT add or remove ANY entities until InitPostEntity otherwise it’ll shift.

About I’m not using the GetTextureID correctly, well, i made a little update to the code i gave you, here is the modification (it still displays pink/white squares) :



local texID = surface.GetTextureID("realistic_rp/gui/connectBG")
hook.Add("HUDPaint", "RealisticRoleplay_LogoRenderer", function () 
	if (LocalPlayer().DisplayLogo) then
		surface.SetDrawColor( 255, 255, 255, 255 )
		surface.SetTexture(texID)
		surface.DrawTexturedRect(0, 0, ScrW(), ScrH())
	end
end)


Here are two links to my custome connectBG texture :
The VMT : http://stonelins.fr/connectBG.vmt
The VTF : http://stonelins.fr/connectBG.vtf

[editline]1st July 2014[/editline]

I already watched, but no entities are added to the map before the CorrectMap is called.
However, maybe M9K, DrugzMod, AdvDupe 2, Smart Weld, Presision, stacker, or rp_evocity_v33x workshop addon is creating an entity. It can be one of my addon. In all cases, it were a DarkRP server before i make this gamemode, also it rest some addons from the workshop in the download collection.

I can’t be sure every addon are OK.
I just need my Gamemode (Realistic Roleplay), rp_evocity_v33x workshop map, and that’s all.

The restent addons can simply not be ran with Realistic Roleplay : my gamemode is based on the base gamemode, so no sandbox, no spawnmenu, no contextmenu, nothing i began from the big scratch.

[editline]1st July 2014[/editline]

Nobody ?

Ok so, i removed every workshop addon that is not needed, i only let M9K, rp_evocity_v33x, but unfortunatly, it does not change anything…

However i just noticed something strange :
When i try to search for the daynight brush, server says that there is no longer any daynight brush after removing it, but the cient still display white sky… Second, if i try to remove again ID 415, i got SRCDS has stopped working because it removed entity name ‘worldspawn’

Ok conclusion nobody wants to answer good realy ! When you have a problem don’t ask facepunch, because they will ignore you simply !

Or people don’t drool over your thread in anticipation waiting for the next juicy suspenseful reply.

It’s about now a week i’m trying to display a VTF at screen, but nothing works. So it’s what i say, nobody want to help when you need help.

And it’s about 1 montch that i can’t find anyway of removing this stupid DAYNIGHT_BRUSH of RP_EVOCITY_V33X

idk about your eyes but it says you posted this yesterday
maybe you should start to figure shit out on your own instead of asking people to spoon feed you.

I tried everything i could about textures, i still got pink/black squares. So if i post it’s not for nothing…

Are you actually having the server download the materials? (Are the materials on your client + server)?

The VTF and VMT are on both :

  • Client : in my content addon\materials\realistic_rp\gui\connectBG
  • Server : in my gamemode root\content\materials\realistic_rp\gui\connectBG

Ok also, textures are now displaying correctly. The problem was that the tutorial about textures were wrong. If someone has this, just search on source engine vmt informations !

You are not entitled to any help, you should instead be thankful for the few users that have attempted to help you.
Also, why remove your problems after they’ve been fixed? If you let them in your OP, other users with the same problem can find them someday…