Wait, what? I am so confused and lost with what TylerB posted, and how it has anything to do with a bot, surveillance or a camera? :huh:
[editline]n[/editline]
Whoops looks like I'm the page king, here have some content;
[t]http://i.imgur.com/osmmPjK.png[/t]
[t]http://i.imgur.com/E0xTAQb.png[/t]
[editline]n[/editline]
Finished some warden waypoints as well,
[t]http://i.imgur.com/yqN1faz.png[/t]
[QUOTE=CGHippo;48405107]My first not so good gamemode (WIP)[/QUOTE]
[code]function GM:PlayerLoadout( pl )
pl:GiveAmmo( 255, "pistol", true )
if pl:Team() == 0 then
pl:Give( "explosive_fists" )
pl:StripWeapon( "weapon_pistol" )
else
pl:Give( "weapon_pistol" )
pl:StripWeapon( "explosive_fists" )
end
end[/code]
Why does this have a different indentation style from the rest of the code? That else statement isn't actually indented at all
[code]function GM:PlayerInitialSpawn( ply )
for k, ply in pairs( player.GetAll() ) do
PrintMessage( HUD_PRINTTALK, ply:Nick().. " has joined the server!" )
end
ply:SetGamemodeTeam( math.random( 0, 1 ) )
end[/code]
So you're overwriting the function argument ply, and replacing it with the value you're getting in that for loop. That will just end up saying every player has joined at once for everyone.
[code]hook.Add( "PlayerDeath", "Death", function(ply, attacker, dmg)
for k, weapon in pairs(weapon) do
ply:Give( weapon )
end
end )[/code]
Same problem here.
[quote=Author.;48409641]Wait, what? I am so confused and lost with what TylerB posted, and how it has anything to do with a bot, surveillance or a camera? :huh:[/quote]
I think it's what you can do with a player when you physgun them?
:snip: wrong thread fuck my life
[QUOTE=Author.;48409641]Wait, what? I am so confused and lost with what TylerB posted, and how it has anything to do with a bot, surveillance or a camera? :huh:
Whoops looks like I'm the page king, here have some content;
[t]http://i.imgur.com/osmmPjK.png[/t]
[t]http://i.imgur.com/E0xTAQb.png[/t][/QUOTE]
i'm showing off my admin mod's physgun rotation
[QUOTE=zeaga;48409662][code]function GM:PlayerLoadout( pl )
pl:GiveAmmo( 255, "pistol", true )
if pl:Team() == 0 then
pl:Give( "explosive_fists" )
pl:StripWeapon( "weapon_pistol" )
else
pl:Give( "weapon_pistol" )
pl:StripWeapon( "explosive_fists" )
end
end[/code]
Why does this have a different indentation style from the rest of the code? That else statement isn't actually indented at all
[code]function GM:PlayerInitialSpawn( ply )
for k, ply in pairs( player.GetAll() ) do
PrintMessage( HUD_PRINTTALK, ply:Nick().. " has joined the server!" )
end
ply:SetGamemodeTeam( math.random( 0, 1 ) )
end[/code]
So you're overwriting the function argument ply, and replacing it with the value you're getting in that for loop. That will just end up saying every player has joined at once for everyone.
[code]hook.Add( "PlayerDeath", "Death", function(ply, attacker, dmg)
for k, weapon in pairs(weapon) do
ply:Give( weapon )
end
end )[/code]
Same problem here.
I think it's what you can do with a player when you physgun them?[/QUOTE]
I'm bad with organization. Trying to help that out in GLua. Not that it really matters if its my code. I can still read my own unorganized work easily
[QUOTE=CGHippo;48411135]I'm bad with organization. Trying to help that out in GLua. Not that it really matters if its my code. I can still read my own unorganized work easily[/QUOTE]
Though it's still a good habit to get into, regardless of who's reading it.
[img]http://puu.sh/jvgur/d81de2680d.jpg[/img]
I needed shotguns to behave like Spy's FAS2 shotgun, where each pellet is its own bullet so that each one raises a damage event instead of the normal behavior where damaged is calculated based on how many pellets hit and where, then raising a single damage event.
So, I did this:
[code]function meta:FireBullets( data )
if data.Num > 1 and RPG.Settings.DirtyFixShotgun:GetBool( ) then
local i, j, f, r
f = data.Dir * 1
j = data.Num
data.Num = 1
for i = 1, j do
r = ( f * 1 ):Angle( )
r:RotateAroundAxis( r:Right( ), math.deg( math.asin( math.Rand( -data.Spread.x, data.Spread.x ) ) ) / 2 )
r:RotateAroundAxis( r:Up( ), math.deg( math.asin( math.Rand( -data.Spread.y, data.Spread.y ) ) ) / 2 )
data.Dir = r:Forward( )
self:rpg_firebullets( data )
end
else
self:rpg_firebullets( data )
end
end[/code]
The marks on the left are from normal behavior, on the right is with my code - I'm satisfied with how close it is, although it appears to be a little more accurate.
I can't really do anything about the HL2 shotgun, though, without replacing it with a SWEP.
[QUOTE=Kogitsune;48417340][img]http://puu.sh/jvgur/d81de2680d.jpg[/img]
I needed shotguns to behave like Spy's FAS2 shotgun, where each pellet is its own bullet so that each one raises a damage event instead of the normal behavior where damaged is calculated based on how many pellets hit and where, then raising a single damage event.
So, I did this:
[code]function meta:FireBullets( data )
if data.Num > 1 and RPG.Settings.DirtyFixShotgun:GetBool( ) then
local i, j, f, r
f = data.Dir * 1
j = data.Num
data.Num = 1
for i = 1, j do
r = ( f * 1 ):Angle( )
r:RotateAroundAxis( r:Right( ), math.deg( math.asin( math.Rand( -data.Spread.x, data.Spread.x ) ) ) / 2 )
r:RotateAroundAxis( r:Up( ), math.deg( math.asin( math.Rand( -data.Spread.y, data.Spread.y ) ) ) / 2 )
data.Dir = r:Forward( )
self:rpg_firebullets( data )
end
else
self:rpg_firebullets( data )
end
end[/code]
The marks on the left are from normal behavior, on the right is with my code - I'm satisfied with how close it is, although it appears to be a little more accurate.
I can't really do anything about the HL2 shotgun, though, without replacing it with a SWEP.[/QUOTE]
Well you could try using the EntityFireBullets hook and checking if the attackers wep is a hl2 shotgun, suppress it by returning false, and then do your own bullets there :v
I've been making a drugs system because my old system sucked, and it was slow. It required a timer that ran every second for [B]every[/B] plant on the map, and I just hated it. It also had repeated code on each plant. It's basic in comparison to what you guys have but I want it to be very easy to add new plants/drugs/ingredients.
I have three entities, a spawned_drug, a spawned_plant and a spawned_ingredient entity, these hold a TypeId for what drug/plant/ingredient they are. When they are spawned, they check what they are by looping a table which contains all of the different drugs/plants/ingredients, and sets their model and type accordingly.
An example of adding a plant.
[t]https://dl.dropboxusercontent.com/u/79424230/ShareX/2015/August/1439143749.png[/t]
The globals make it easier for me since they are just numbers in reality.
The product type is an item type used in our item system, so you could grow weapons if you wanted to. (Which is silly.)
They require different ingredients that you can purchase and place onto the plant, and when all ingredients are added the growing process starts. As you can see there is a growTime and after the growTime is up, you get the product.
An example ingredient is as followed.
[t]https://dl.dropboxusercontent.com/u/79424230/ShareX/2015/August/1439144240.png[/t]
Here is the UI in which you can check if you have the ingredients. A red box means the ingredient is missing, A green box means the ingredient is added.
[t]https://dl.dropboxusercontent.com/u/79424230/ShareX/2015/August/1439143983.png[/t]
My system also supports a staging system, and every 20 seconds the stage changes, so it allows model changing, useful for Weed.
All of the ingredients are purchasable via the F4 menu (considering it's DarkRP. boo hoo).
[t]https://dl.dropboxusercontent.com/u/79424230/ShareX/2015/August/1439144116.png[/t]
Sorry if I'm flooding WAYWO with my shit, I think it's interesting to share my development.
[QUOTE=Z0mb1n3;48411543]Though it's still a good habit to get into, regardless of who's reading it.[/QUOTE]
True true. Gotta start getting better at that. I've still been practicing nonetheless.
[url]http://steamcommunity.com/sharedfiles/filedetails/?id=465036313[/url]
way better weed models, you just need to do it clientside
[QUOTE=Giraffen93;48417487][url]http://steamcommunity.com/sharedfiles/filedetails/?id=465036313[/url]
way better weed models, you just need to do it clientside[/QUOTE]
Damn! I like these.
[vid]https://dl.dropbox.com/s/5v4cldhlafe21l0/gm_construct%202015-8-9%2014-40-32_dem%202015-8-9%2014-42-47.webm[/vid]
Working on a few SWEPs and NPCs for my gamemode. I was given a lerp-using ironsight code by a friend of mine, so I expanded upon it and added some stuff. As for the NPCs, they use the VJ base, I think you all know who made that :v:
Not my best work, but I don't really know what else to post :P
[t]http://rp.braxnet.org/scr/1439157403618.jpg[/t]
security monitors :excited:
just gotta figure out how to do pvs in a non-laggy way
[QUOTE=Giraffen93;48418798][t]http://rp.braxnet.org/scr/1439157403618.jpg[/t]
security monitors :excited:
just gotta figure out how to do pvs in a non-laggy way[/QUOTE]
This looks amazeballs. Tell us your secrets, how did you do it? render.RenderView on a 3d2d?
[QUOTE=FireArrow133;48418981]This looks amazeballs. Tell us your secrets, how did you do it? render.RenderView on a 3d2d?[/QUOTE]
renderview, in a hudpaint hook (because doing it in :draw doesn't work), and outputting it into a texture, and then overriding the skin on the monitor with it
Outside of SetupPlayerVisibility there isn't anything you can really do - at least it passes the player, so you could do something like:
[code]
for each security monitor
if turned on and tuned in and within a given distance of my face
if a trace from my eyes to the screen isn't blocked by a brush
get my eye pos
get the nearest point ( Entity:NearestPoint( pos ) ) on the screen to my eyepos
get the normal between these two points
if the dot product of my aimvector and that normal is less than math.rad( my fov / 2 )
get the camera the screen is viewing
Add the camera's position ( or lens position ) to pvs
[/code]
This would limit you to having screens that are unobstructed and inside your view cone being added to the PVS rather than all of them being added for everyone. Players that aren't near any screens wouldn't have them added.
As for rendering, maybe one of the PostDraw hooks ( Translucent or Opaque ? ) would be more suitable and not depend on the HUD being rendered.
doesn't it need a 2d rendering hook though? the draw hook messed up the whole screen so..
but yeah i made some system similar to that, and i added the old camera effects:
[t]http://i.imgur.com/tfDAbWd.jpg[/t]
Bootleg Guitar Hero in Garry's Mod:
[video=youtube;3ioMPGmpdxE]http://www.youtube.com/watch?v=3ioMPGmpdxE[/video]
At the moment I don't have any music notes file to read from so the music sheet is generated randomly by the server. I already got bored of it anyways. I was also getting some frame jitters so that's why it jumps up and down it's built around frame time so that it can adapt to all screen resolutions.
It's also made with the idea of playing like this: [IMG]https://upload.wikimedia.org/wikipedia/commons/6/67/Frets_on_fire_man.png[/IMG]
[QUOTE=McDunkable;48420935]guitar stuff[IMG]https://upload.wikimedia.org/wikipedia/commons/6/67/Frets_on_fire_man.png[/IMG][/QUOTE]
I Made something like this in unity engine and in garrys mod. My problem was I wanted to read the note data from a midi file, But the midi file does not define the time a note is hit, Which made it a little hard to predict where the notes should be, But good luck, Looks great!
Making a mediocre hud.. I like big giant boxes on my screen.
[IMG]http://puu.sh/jwhFB/f03481c28e.jpg[/IMG]
I really have to improve this. What can I change to make it more appealing?
[img]http://i.imgur.com/g2s45BD.png[/img]
[QUOTE=RedNinja;48425289]I really have to improve this. What can I change to make it more appealing?
[img]http://i.imgur.com/g2s45BD.png[/img][/QUOTE]
It looks good man!
[QUOTE=RedNinja;48425289]I really have to improve this. What can I change to make it more appealing?
[img]http://i.imgur.com/g2s45BD.png[/img][/QUOTE]
First of all, make all the padding/margins even.
[QUOTE=Robotboy655;48425328]First of all, make all the padding/margins even.[/QUOTE]
They are :wavey:
[QUOTE=RedNinja;48425331]They are :wavey:[/QUOTE]
[thumb]http://scrnsht.me/u/r0/raw[/thumb]
[QUOTE=RedNinja;48425289]I really have to improve this. What can I change to make it more appealing?
[img]http://i.imgur.com/g2s45BD.png[/img][/QUOTE]
Please change the distances to edges for each freakin element, some people are incredibly sensitive for this kind of stuff.
Right right. So besides that, what else?
[QUOTE=RedNinja;48425399]Right right. So besides that, what else?[/QUOTE]
The button needs some sort fo an icon in the middle, or atleast an "X".
Font isn't that good, make the text below it thiner (weight: 250) the name of weapon bolder (weight: 500).
Also enable antialiasing in it and additive.
Sorry, you need to Log In to post a reply to this thread.