• [NEW] MessWithPlayers, an addon for server jerks!
    46 replies, posted
[IMG]https://s31.postimg.org/dcfhjte95/head.png[/IMG] [B]The addon for server jerks![/B] It's back again! That was fast, right? Don't worry, lots more features are coming this way! GITHUB: [URL="https://github.com/DerpyCoal/MessWithPlayers.git"]https://github.com/DerpyCoal/MessWithPlayers.git[/URL] Image Gallery: [*cough cough* sorry no images right now] Features: FULL SUPPORT for the following console commands: (Default password is password [The password system is only temporary until I can get a working verification system]) SetMWP_Password <old password> <new password> burnplayer <player> <password> launchplayer <player> <password> explodeplayer <player> <password> swap_places <player> <other player> <password> spinplayer <player> <password> freeze <player> <password> ...And many more to come!
why did you make a new thread? just to get away from criticism?
Have you tested this? You have an infinite loop from the get-go, a lot of unnecessary globals, you're running a bunch of functions on other players clientside -- which won't work (unless concommands are synced to serverside only or something), you can just check the player's rank in the concommand callback instead of making this convoluted password system, and there's no fail-safes for multiple people running a command on the same player.
are you seriously calling serverside functions in an addon that only contains a single clientside file
This doesn't work. Do some research in glua before releasing things.
have you even ran your own script once you don't even addcslua your own file so it'll just silently fail on you also [url]https://facepunch.com/showthread.php?t=1527352[/url] why
[QUOTE=ZeBull;50736571]have you even ran your own script once you don't even addcslua your own file so it'll just silently fail on you also [url]https://facepunch.com/showthread.php?t=1527352[/url] why[/QUOTE] He probably just tested in single-player if anything. Also, Bitches already pointed that out.
[code]if args[1]:IsPlayer() == 1 then[/code] You know that you could just do [code]if(args[1]:IsPlayer()) then[/code]
[QUOTE=Reyjr43;50737238][code]if args[1]:IsPlayer() == 1 then[/code] You know that you could just do [code]if(args[1]:IsPlayer()) then[/code][/QUOTE] == 1 doesn't even work in Lua since numbers don't equate to booleans
I feel a little bit better about myself now
[QUOTE=ZeBull;50736472]are you seriously calling serverside functions in an addon that only contains a single clientside file[/QUOTE] Made a typo in the repository, just noticed it now Also I don't need 3 other people telling me the same thing im on a mobile device right now it's hard enough to reply Also I DO HAVE TO ADMIT I made the mistake of forgetting IsPlayer() returns a boolean, like wth would it return 1
Jesus, have you heard of local variables?
[QUOTE=code_gs;50736449]Have you tested this? You have an infinite loop from the get-go, a lot of unnecessary globals, you're running a bunch of functions on other players clientside -- which won't work (unless concommands are synced to serverside only or something), you can just check the player's rank in the concommand callback instead of making this convoluted password system, and there's no fail-safes for multiple people running a command on the same player.[/QUOTE] 1:I'm pretty sure it's not infinite 1.5:Mr. Global is offended 2:Repository typo strikes again 3:I said its temporary until a release comes around in the first post 4:Good point Otherwise thanks for the input [editline]19th July 2016[/editline] [QUOTE=Homocullz;50738073]Jesus, have you heard of local variables?[/QUOTE] How could I make this and not know what a local variable is
[QUOTE=Lavacoal123;50738087]1:I'm pretty sure it's not infinite 2:Repository typo strikes again 3:I said its temporary until a release comes around in thr first post 4:Good point Otherwise thanks for the input [editline]19th July 2016[/editline] How could I make this and not know what a local variable is[/QUOTE] While true will always be infinite Lmao dude, you only use one local in your code. The first four variables that you define in the file are global even though they don't need to be You don't need to use globals at all since your addon only has one file
[QUOTE=Homocullz;50738092]While true will always be infinite Lmao dude, you only use one local in your code. The first four variables that you define in the file are global even though they don't need to be[/QUOTE] I meant the for loop isnt infinite While true is, of course. And I just have to put local behind it It was rushed in the making anyway (The freeze part I mean) Also they don't NEED to be global, but maybe they want to be. How offensive. Variables have feelings too. Thats like going up to you and saying you dont need to be so gay, but maybe you want to. See how offensive that is? Join us at thevariablehumanesociety.com
[QUOTE=Lavacoal123;50738096]I meant the for loop isnt infinite While true is, of course. And I just have to put local behind it It was rushed in the making anyway[/QUOTE] :snip:
Here is a list of things you did wrong: 1. Infinite loop at the start of the file 2. You don't need to put the name of the function in a hook, you just need to do [lua]concommand.Add("dumb_command", function(ply, cmd, args) end)[/lua] 3. Every concommand you add will call functions on a variable you called args, which is actually the player that called the console command, so nothing will work, even if you did add commands correctly 4. You use a load of global variables 5. [img]http://wiki.garrysmod.com/favicon.ico[/img] [url=http://wiki.garrysmod.com/page/Player/Freeze]Player:Freeze[/url] exists 6. You released the first thing that you ever made publicly without actually testing it
[QUOTE=Homocullz;50738092] You don't need to use globals at all since your addon only has one file[/QUOTE] #stopvariableabuse
[QUOTE=Lavacoal123;50738121]#stopvariableabuse[/QUOTE] #stopusingshitpractisesandlistentoadvicepeoplearegivingyou
Do you not realize that global variables can be tampered with by other addons if those addons uses the same name for the variable
[QUOTE=meharryp;50738115]Here is a list of things you did wrong: 1. Infinite loop at the start of the file 2. You don't need to put the name of the function in a hook, you just need to do [lua]concommand.Add("dumb_command", function(ply, cmd, args) end)[/lua] 3. Every concommand you add will call functions on a variable you called args, which is actually the player that called the console command, so nothing will work, even if you did add commands correctly 4. You use a load of global variables 5. [img]http://wiki.garrysmod.com/favicon.ico[/img] [url=http://wiki.garrysmod.com/page/Player/Freez.. e]Player:Freeze[/url] exists 6. You released the first thing that you ever made publicly without actually testing it[/QUOTE] 1:Right, it's suppoused to be 2:Again, maybe it wants to have a name #stopfunctionidentitycrisis 3:GMOD wiki says it is a table of arguments 4:YOU ABUSIVE BASTARD! 5:Thx 6:First thing? Steam workshop. I mean, this is the second thing I didn't use templates on :goodjob: [editline]19th July 2016[/editline] [QUOTE=Homocullz;50738131]Do you not realize that global variables can be tampered with by other addons if those addons uses the same name for the variable[/QUOTE] Yeah, I know. It just wasn't deemed necessary at the time Also im updating github just a sec...
[QUOTE=Lavacoal123;50738148]1:Right, it's suppoused to be[/QUOTE] ah yes the infinite loop is a stylistic choice and defiantly wont crash the game do you even understand why you should make variables local? do you even understand how function arguments work? do you even know how to test an addon? stop acting like a cunt and learn to take feedback properly or you will forever be a shit coder
Alright, the variables are local now, and I deleted freeze until I can get on a pc because typing on this is hell, which fixes lots of problems [editline]19th July 2016[/editline] Oh wait they all have the same function name thats a problem [editline]19th July 2016[/editline] [QUOTE=meharryp;50738160]ah yes the infinite loop is a stylistic choice and defiantly wont crash the game do you even understand why you should make variables local? do you even understand how function arguments work? do you even know how to test an addon? stop acting like a cunt and learn to take feedback properly or you will forever be a shit coder[/QUOTE] This is not very constructive.
[QUOTE=Lavacoal123;50738173]This is not very constructive.[/QUOTE] im asking a series of questions because i believe that you do not know what the fuck you are on about and would like you to prove me wrong, i would then proceed to tell you how to actually code so you would then hopefully listen and improve on your skills because of it, but unfortunately you appear to have a condition known as "13 year old on the internet complex" and think you know everything and are the best
[QUOTE=meharryp;50738206]im asking a series of questions because i believe that you do not know what the fuck you are on about and would like you to prove me wrong, i would then proceed to tell you how to actually code so you would then hopefully listen and improve on your skills because of it, but unfortunately you appear to have a condition known as "13 year old on the internet complex" and think you know everything and are the best[/QUOTE] If your intentions are to help, then help, helping is not giving me insults until I respond I'm open. Also this is really funny XD
[QUOTE=Lavacoal123;50738216]If your intentions are to help, then help, helping is not giving me insults until I respond I'm open. Also this is really funny XD[/QUOTE] He gave you everything you need to go off of, he just gave it in a rude manner.
[QUOTE=Lavacoal123;50738216]If your intentions are to help, then help, helping is not giving me insults until I respond I'm open.[/QUOTE] Oh almighty Lavacoal123, your presence graces me, would you please read my questions and respond to them, my lord? [editline]19th July 2016[/editline] [QUOTE=Dark Hood;50738225]He gave you everything you need to go off of, he just gave it in a rude manner.[/QUOTE] [QUOTE=meharryp;50738115]Here is a list of things you did wrong: 1. Infinite loop at the start of the file 2. You don't need to put the name of the function in a hook, you just need to do [lua]concommand.Add("dumb_command", function(ply, cmd, args) end)[/lua] 3. Every concommand you add will call functions on a variable you called args, which is actually the player that called the console command, so nothing will work, even if you did add commands correctly 4. You use a load of global variables 5. [img]http://wiki.garrysmod.com/favicon.ico[/img] [url=http://wiki.garrysmod.com/page/Player/Freeze]Player:Freeze[/url] exists 6. You released the first thing that you ever made publicly without actually testing it[/QUOTE] i dont consider this to be rude imo
[QUOTE=Dark Hood;50738225]He gave you everything you need to go off of, he just gave it in a rude manner.[/QUOTE] My point exactly. You allready helped me fix alot but please jmfc [editline]19th July 2016[/editline] [QUOTE=meharryp;50738226]Oh almighty Lavacoal123, your presence graces me, would you please read my questions and respond to them, my lord?[/QUOTE] IM LAUGHING (I did a few posts ago and said i was gonna fix it)
[QUOTE=Dark Hood;50738225]He gave you everything you need to go off of, he just gave it in a rude manner.[/QUOTE] If "Lavacoal123" took criticism instead of throwing minor tantrums, then people wouldn't have to force basic lua tips down his throat.
[QUOTE=meharryp;50738226] i dont consider this to be rude imo[/QUOTE]You're right it's not, I was looking at your second post primarily.
Sorry, you need to Log In to post a reply to this thread.