• RolePlayScript (aka RadishPickin'Script)
    96 replies, posted
OK I worked it in so I can own/unown a door and lock/unlock it , but my player must be looking at it, how would I go about making it so when I press c the trace is where the mouse is so I can own/unown without having my crossair on the object I I can just use the mouse. Thanks again this derma stuff is really neat.
Pretty simple: [lua] local player = LocalPlayer() local pos = player:GetShootPos() local ang = gui.ScreenToVector( gui.MousePos() ) local tracedata = {} tracedata.start = pos tracedata.endpos = pos+(ang*150) --Change 150 to change the trace distance tracedata.filter = player local trace = util.TraceLine(tracedata) [/lua]
[QUOTE=Elijah?]Pretty simple: [lua] local player = LocalPlayer() local pos = player:GetShootPos() local ang = gui.ScreenToVector( gui.MousePos() ) local tracedata = {} tracedata.start = pos tracedata.endpos = pos+(ang*150) --Change 150 to change the trace distance tracedata.filter = player local trace = util.TraceLine(tracedata) [/lua][/QUOTE] You have to send their CursorAimVector to the server. Trusting the client with what door they're aiming at is silly.
How would I properly do this? I have tried putting that code with my Lock door function but it gives an error getshootpos a nil value. Thanks for all the help and advice. [b]Edit:[/b] How would I properly do this? I have tried putting that code with my Lock door function but it gives an error getshootpos a nil value. Thanks for all the help and advice. EDIT Also attempt to index global 'gui' (a nil value)
Quick update: Looking at other gamemodes, I've decided to re-write what I have to bring it up to standards. A lot of my methods were what you could call "very Gmod9", in that it was old style coding with little use of MetaTables and such. A lot of the things I wrote were a little too clever for a script like this, so I'm going to try and simplify the code somewhat and have less pointless gimmicks. And include more Derma. [URL=http://www.cubeupload.com][IMG]http://www.cubeupload.com/files/ddb497rpshud.png[/IMG][/URL]
[QUOTE=hoobo]UberMensch, I had a error on it, so this works: [lua] local w = string.Explode(" ", text) -- Easier to access local cmd = w[1] table.remove(w,1)-- I was doing args = table.remove(w,1) which returns the removed value :( local tb = chcmds[cmd] [/lua][/QUOTE] Well then, not to be picky or nothing, but you could just do this. [lua]local w = string.Explode(" ", text) -- Easier to access local cmd = table.remove(w,1) local tb = chcmds[cmd][/lua]
[QUOTE=Catdaemon]You have to send their CursorAimVector to the server. Trusting the client with what door they're aiming at is silly.[/QUOTE] Yea that doesen't work, how would one go and properly do this? For example locking a door with it.
Are the vgui snippets on the wiki derma? It doesn't look like it. I'm still trying to figure it out, but I can't find much help.
If you need a website I can make a wonderful one :D
[QUOTE=Thename96]If you need a website I can make a wonderful one :D[/QUOTE] I have a website, but thanks for the offer ;)
Okay, this may not be the thread for this, but since JA_Cop is barely working on his RP gamemode, let me suggest something, a real economy. Right now, In RP as it is, you can spawn props and use STOOLs as much as you'd like. What I suggest, is not that you lose money for spawning props or anything, but this: There are different jobs that you can get (Not just "store owner", "cop" and "mayor"), that allow you to do different things. Real Estate jobs would allow you to sell people buildings. They would need to find you, get in touch with you, and work out a price for the house. After haggling, you could offer a price for a particular building (Select a building currently on the map, (House 1, house 2, pizza shop, etc) and click it, then type in the price you're offering. It would then show a VGUI window to them that says "(NAME) would like to offer you (NAME, eg. The Pizza Shop) for a one-time price of $350, do you accept?" and if you had enough cash with you, the real estate agent would gain 175 dollars (50% goes to the real estate company) and you would own the Pizza Shop. There could also be a Furniture Mover/Decorator job. You could create furniture and have access to a sign stool (So you can put up signs for people's businesses and such). Once you 'start a job', you would be able to do what I mentioned earlier, and each time you spawn furniture/use the stool, it'd be added to the bill. Once you Stop the job, you would have to choose someone to give the bill to. If they accept the bill, the furniture and such will stay, and you will receive the earnings from your job. If they decline, the furniture/signs would vanish, because they didn't pay for it. (REPO MAN!) Thieves/Criminals would have access to a lockpick, a black market pass (used for buying various things) and a Cover/Work outfit. When 'under cover', you will appear as a regular citizen. You will not have access to your lockpicks, guns, or anything else like that. If you go into your Work outfit, you are given access to all of those things, however, if someone spots you, (another citizen or a cop), a red flag appears over your head. If a cop follows the flag and arrests you, you lose any items you've gotten from the black market, and $100 for Bail. If you don't have $100, you must stay in jail for 3 minutes. If you manage to get into someone's house without being noticed, you will have the ability to steal items, ranging from food to furniture. This is all I can think of right now, so if you choose to use any of my ideas, thanks!
[QUOTE=Ryx]Okay, this may not be the thread for this, but since JA_Cop is barely working on his RP gamemode, let me suggest something, a real economy. Right now, In RP as it is, you can spawn props and use STOOLs as much as you'd like. What I suggest, is not that you lose money for spawning props or anything, but this: There are different jobs that you can get (Not just "store owner", "cop" and "mayor"), that allow you to do different things. Real Estate jobs would allow you to sell people buildings. They would need to find you, get in touch with you, and work out a price for the house. After haggling, you could offer a price for a particular building (Select a building currently on the map, (House 1, house 2, pizza shop, etc) and click it, then type in the price you're offering. It would then show a VGUI window to them that says "(NAME) would like to offer you (NAME, eg. The Pizza Shop) for a one-time price of $350, do you accept?" and if you had enough cash with you, the real estate agent would gain 175 dollars (50% goes to the real estate company) and you would own the Pizza Shop. There could also be a Furniture Mover/Decorator job. You could create furniture and have access to a sign stool (So you can put up signs for people's businesses and such). Once you 'start a job', you would be able to do what I mentioned earlier, and each time you spawn furniture/use the stool, it'd be added to the bill. Once you Stop the job, you would have to choose someone to give the bill to. If they accept the bill, the furniture and such will stay, and you will receive the earnings from your job. If they decline, the furniture/signs would vanish, because they didn't pay for it. (REPO MAN!) Thieves/Criminals would have access to a lockpick, a black market pass (used for buying various things) and a Cover/Work outfit. When 'under cover', you will appear as a regular citizen. You will not have access to your lockpicks, guns, or anything else like that. If you go into your Work outfit, you are given access to all of those things, however, if someone spots you, (another citizen or a cop), a red flag appears over your head. If a cop follows the flag and arrests you, you lose any items you've gotten from the black market, and $100 for Bail. If you don't have $100, you must stay in jail for 3 minutes. If you manage to get into someone's house without being noticed, you will have the ability to steal items, ranging from food to furniture. This is all I can think of right now, so if you choose to use any of my ideas, thanks![/QUOTE] These concepts have existed in GmodRP since J89's RPv2, yet I don't think this is a bad suggestion. As long as that's the sort of RP style your aiming for. The more cops and robbers type, straightforward and entertaining with a small side of social interaction. More-so just social-oriented game mechanic grinding type.
The style I'm aiming for with RPS is a return to Gmod9 SGPRP standard. Obviously with slightly better roleplaying overall, but with RPS, the script is the foundation of the roleplay, not the enhancer. [I]View that statement in script terms. The RP standard is only as good as the people playing it.[/I]
Very good initiative, UberMensch. Can't wait to try this out. I'd really like to make a hit for the real-estate thingy, being able to buy what door you want is not fun, always some idiot that buys all doors. I had an RP-server back in the gmod9 days and at that time people knew how to play.. when there was no wiremod and PHX-packs and hoverboards and such.. those things are just taking the game in the wrong direction i think. [b]Anyhow, another feature id like to see is the "builder" job. The builder are the only ones that can use the physgun and toolgun.. and maybe some kind of "spawner"-job that is able to spawn props. This way it forces people to interact :)[/b] [b]Edit:[/b] Also another thing, a really good RP-map WITHOUT admin room, automatic spawners and other automated stuff would be nice.. as I said, I remember back in the days when you needed to build YOUR OWN melon-shack if you want to sell melons.. nowadays there are shops that automaticly spawn melons and blah blah.. That is one of the factors that I think has ruined roleplay, the game plays everything FOR you.. I mean, it's FUCKING GARRYSMOD, where you are supposed to [u]build[/u] your own stuff. Anyone remember the good 'ol rp-map with the crane.. it was quite small, not fucking 200mb like the big forest-themed map.. THATS HUGE MAN.. You need to be like 32players to actually find eachother.. and how the hell can the admins keep an eye on so many peeps? It's an open invite for mingebags.. I've changed my mind according to Wiremod.. maybe an "electric-worker" job would be fine, like if anyone want to install an alarm-system in his shop or anything. [b]Edit:[/b] And maybe some voting system when someone changes his job.. to make everybody agree on what role every child acts :)
Actually, as nice as the sandbox stuff is, it'd be better WITHOUT sandbox. Half the mingery I'm aware of on DarkRP servers are related to the building tools. Adding the toolgun to RP means it's sandbox related, and that means that wire and resource automatically are usable as well. That's hardly back to the basics, now is it? I've played on an RP server with wire before. At first, when there's people who want to RP on, it's fine and wire is used in moderation at the times. Then, when the people get bored with what's happening at the moment, it goes downhill. People start making wire contraptions and it just ends badly. Or someone who doesn't know anything about wire at all joins and starts pestering people to show them wire. If you have prop spawning enabled, people become more interested in building something than actually rping. When they can't kill someone with guns, they'll make something to kill them with. They'll phys props into people, or just be a general minge. In my time on Tacoscript, I had Tool Trust for a bit, and spent a fair amount of time one evening at the area outside the nexus watching people spawn a prop and surf to the top of the nexus, or surf to building tops. People would build magic elevators to the roof tops, magic doors to their forts, etc. However, there are people who did what I would consider 'rp building'. The elevator looked realistic, had a motor/counterweight, and wasn't able to pull a lot of weight at once. Their forts, while still magic, weren't bullet-proof fortresses of doom, they could be seen into to, etc.. On their forums when I was last there, they had the 'groups' section where people could get together and put up ideas to have an official group put in. Quite a few of the requests there involved adding wire to the gamemode. In short, I just think that RP doesn't need to be based on sandbox, nor have any heavy mods installed such as wire, rd, ls, etc.. They aren't terrible, but they were not designed for RP.
[QUOTE=Ryx]Okay, this may not be the thread for this, but since JA_Cop is barely working on his RP gamemode, let me suggest something, a real economy. Right now, In RP as it is, you can spawn props and use STOOLs as much as you'd like. What I suggest, is not that you lose money for spawning props or anything, but this: There are different jobs that you can get (Not just "store owner", "cop" and "mayor"), that allow you to do different things. Real Estate jobs would allow you to sell people buildings. They would need to find you, get in touch with you, and work out a price for the house. After haggling, you could offer a price for a particular building (Select a building currently on the map, (House 1, house 2, pizza shop, etc) and click it, then type in the price you're offering. It would then show a VGUI window to them that says "(NAME) would like to offer you (NAME, eg. The Pizza Shop) for a one-time price of $350, do you accept?" and if you had enough cash with you, the real estate agent would gain 175 dollars (50% goes to the real estate company) and you would own the Pizza Shop. There could also be a Furniture Mover/Decorator job. You could create furniture and have access to a sign stool (So you can put up signs for people's businesses and such). Once you 'start a job', you would be able to do what I mentioned earlier, and each time you spawn furniture/use the stool, it'd be added to the bill. Once you Stop the job, you would have to choose someone to give the bill to. If they accept the bill, the furniture and such will stay, and you will receive the earnings from your job. If they decline, the furniture/signs would vanish, because they didn't pay for it. (REPO MAN!) Thieves/Criminals would have access to a lockpick, a black market pass (used for buying various things) and a Cover/Work outfit. When 'under cover', you will appear as a regular citizen. You will not have access to your lockpicks, guns, or anything else like that. If you go into your Work outfit, you are given access to all of those things, however, if someone spots you, (another citizen or a cop), a red flag appears over your head. If a cop follows the flag and arrests you, you lose any items you've gotten from the black market, and $100 for Bail. If you don't have $100, you must stay in jail for 3 minutes. If you manage to get into someone's house without being noticed, you will have the ability to steal items, ranging from food to furniture. This is all I can think of right now, so if you choose to use any of my ideas, thanks![/QUOTE] The problem is, people usually are not playing long enough and don't feel like having to hunt someone down just to add a table or two to their house, you would need the furniture job to be at a store. Also, you need to make them sell the furniture or else it will end up like darkrp gundealers, they just spawn the props to make their own house/fort, but don't sell any to the other players..
Wow cannot wait now that RP is broken
[QUOTE=yx516]Wow cannot wait now that RP is broken[/QUOTE] "RP is broken" what is this.
I'm hoping that it will be as flexible as in the old days. Be whatever you like, And role play.
Please please please ( i cannot stress please enough) use the old "mayor has the keys" system like gmod9 days.. ahh.. the old days.. where cops policed and people actually rp'd..
[QUOTE=kelldar]Please please please ( i cannot stress please enough) use the old "mayor has the keys" system like gmod9 days.. ahh.. the old days.. where cops policed and people actually rp'd..[/QUOTE] That's what I'm going for. Hopefully the guys who remember GMC back when it was good (May/June 2006) will know what I'm talking about ;)
Hello, I'm learning to write LUA myself, and have tried to make my own RP games before. I was wondering if I could get involved here?
Garry WANTED A GAY SECTION NOW HE WILL GET IT! EAT SHIT AND DIE! [img]http://messy-guys.com/part-2-gallery/gallery-part2-18.jpg[/img] [b][highlight](User was permabanned for this post (Reason: Spammer) [event] 30366 [/event])[/highlight][/b]
[QUOTE=nofearkid]Hello, I'm learning to write LUA myself, and have tried to make my own RP games before. I was wondering if I could get involved here?[/QUOTE] Sure, I won't refuse some help or someone to (try) and teach somewhat. PM me if you're interested ;)
I tried your box is full, I requested you on steam though.
Weren't you working on DeRP over at D2k5? :ninja: Also the name made me :lol: a little. Still, it's nice that someone is making an RP script that isn't DarkRP again. The whole GMod RP scene was pretty much destroyed by DarkRP. :(
I played RP WITHOUT a script yesterday at my server at the old map rp_cargtown_b7 :) It was quite fun when i teached all the noobs how to rp. blabla says: you ain't playing rp, there is no script.. me says: you can rp without a script, it's just like sandbox but with a purpose blabla says: but how do I rob someone? and where is the police? me says: you didn't play gmod <9 huh? blabla says: no me says: knew it ;)
Any updates?
I know this thread has been quiet for a while, but is the script still being worked on? I loved the simplicity of the original SGPRP script on GMC and would love to see a Garry's Mod 10 version of it. I can help coding too, if possible (it would be great to learn more about Lua :) )
Is this still being worked on. If it is we need updates. If not then that sucks.
Sorry, you need to Log In to post a reply to this thread.