• My zombie gamemode... need some help
    2 replies, posted
Hi guys, I am making my gamemode as a deathmatch w/zombies, but have some issues the forums didn't solve. 1. Team player model switch code works, but the model is being claimed as "unknown", even though they are the npc models from hl2. 2. I cant put css weapons into the gamemode, eg. I have a character class called runner which has a pistol only, and i want to replace this with a five seven. 3. I want to create dynamic zombie spawners, eg. spawn z's by itself 4. How can i make something like a crate which stores a css gun and put this into SSDK How can I do these things? Just so you guys know, I have all source engine games, so nothing is missing content. Thanks so much guys!!
1. Open Garry's Mod's Content in the GCFScape program and look through the player folder to get an idea of what the models exact names are. ("model/player/Group01/Male_01.mdl") 2. Me personally I'd use PlayerSpawn but you can use PlayerLoadout to check what the players class is or even setup a table like this: [lua] GM.Classes = {} GM.Classes["Runner"] = {} GM.Classes["Runner"].Loadout = {"weapon_fiveseven"} function GM:PlayerSpawn(player) if GM.Classes[player.Class] then for i = 1, #GM.Classes[player.Class].Loadout do player:Give(GM.Classes[player.Class].Loadout[i]) end end end [/lua] Make sure you setup a player.Class variable or something that creates the class of the player. 3. Use tables with vectors in them and create a timer, just a shitty example: [lua] ZombieSpawns = {Vector(0,0,0),Vector(1,1,1)} -- I assume you know how to get vectors. timer.Create("Dynamic Zombie Spawns",0,60,function() -- Should create a zombie every 60 seconds. local z = ents.Create(zombie_ent_here) z:SetPos(table.Random(ZombieSpawns)) z:Spawn() end) [/lua] 4. If by SSDK you mean SDK then I don't know why you'd want to do that just create it in lua(By it I mean the entity) and make a function to spawn one, then to save the things inside of a crate encode the items inside of the crate with glon into SQL or SQLite. (I didn't test any of this and it's 3 AM so it might now work 100% :v:)
Thanks a lot bro! Cya 'round!
Sorry, you need to Log In to post a reply to this thread.