[Utility]Too Many Commands

Author Topic: [Utility]Too Many Commands  (Read 3189 times)

misread this as too many cooks

how about instead of being richardheads and making him feel like stuff, hows about you indulge him on how to do better. if you did pm him then excuse this message.

Thank you man!

Take this guy's advice and go easy on me. I'm new at this, that's why I put no hate comments.

You're still ignoring the fact that the whole thing doesn't work correctly.
This should be fail binned.

I was about to post the fix. I know where the issue was.

Actually someone that isn't a non-admin is going to cause the admin login to pop up for the host.

Don't challenge me. I know what I'm talking about. So do Zeblote and jes00.

Host a server, I'll show you what I'm talking about.

I cant host because I'm using a public wifi.

Thank you man!

Take this guy's advice and go easy on me. I'm new at this, that's why I put no hate comments.

Might wanna look over his post again..

but you can do all of this from the escape menu very easily, save for the quick-join one but there's another add-on for that anyways

Thank you man!

Take this guy's advice and go easy on me. I'm new at this, that's why I put no hate comments.
Did you read his post before or after the edit.

I was about to post the fix. I know where the issue was.
The issues. That we've explained to you. I'll explain it again. This isn't nice. This isn't mean. This is just what you're doing and why it's wrong. You cannot get better unless you understand your mistakes.

You're using a client.cs file. This is intended to be for use as a client only and should contain no code that directly affects a server.
You are declaring a package containing functions that don't already exist. This isn't exactly something that causes it to not work, it's just bad practice to do so.
You are declaring server sided commands in a client.cs file. This means that the server sided commands will only work when hosting a non-dedicated server, with no way for the average player to disable them without deleting the file.
You are calling client sided commands within server sided commands. This means that the server sided commands will only affect the host, no matter who is calling these commands.
You are referencing a variable that is never declared (%client). Typically, the '%client' arg should be declared as the first arg of a serverCmd. e.g. function serverCmdTestFunction(%client){
You are doing a chain of ifs that are completely unnecessary for the most part. When you are only using if, and then if again, there's the chance that multiple of them could be true and that the same function they're all calling will happen multiple times. Instead, you should be using if(condition1 || condition2 || condition3) etc.
You have released a backdoor exploit which allows any player to close a non-dedicated server hosted by a player that has this add-on. It's actually fortunate that this has syntax errors for this reason.
What you're trying to do anyway is functionally unrealisable. If you intended for it to be fully client-sided, then there's no need to have serverCmds or admin checks. Just call the command that the keybind/menu button normally calls. If you intended for this to be a server-sided add-on, then there's no way for you to tell a client to open their options menu, quit, etc, nor should there be, as that would be a reversed exploit.



This next part is mean... When's timescale tweaks coming out?

Another tip: To really test stuff, please don't use a non-dedicated server and always make sure there are 0 syntax errors
Also, make sure you test this with a few other people (as in, be on the same server) before you release it, there are chances like this where nothing will work, or there might be a vulnerability

Take this guy's advice and go easy on me. I'm new at this, that's why I put no hate comments.
I'm sure everyone's been saying this, but, you realize you're posting something that has a vulnerability which anyone could do that command, also doesn't work when on someone's server or on your own dedicated server, getting no-hate comments is going to be tough, but the idea here: You can already do this, and much quicker. Why make it take longer?
« Last Edit: April 13, 2016, 03:17:23 PM by Kyuande »

Thank you man!

Take this guy's advice and go easy on me. I'm new at this, that's why I put no hate comments.

I meant what I said about these people who respond to new add-on makers like yourself, but after over-looking your replies and other threads like I should've in the first place, you have an ego, so you are an exception.  Although some of the people that post hate and don't give you advice, they are right in an aspect and you kind of deserve it after being excessively egotistical, they know what they are doing when it comes to this game, jes00 and Zeblote have been doing this for a long time, and although they aren't the nicest of people, you could listen to what they are saying, and from what I see now, they are trying to help you.

If you wanna talk about this subject further, just pm me because I really don't want to run this off the tracks.

the thing is this guy appears out of nowhere randomly after a couple months and just posts like he's some legit addon developer without any indication he actually knows what he's doing

ide, i get that you want to be nice to this guy, but he really has no clue what's going on; zeb and jes00 and visolator and shift kitty and the rest of us addon makers don't jump on a person - their posts about how this is broken is standard constructive criticism

Lol, if anyone hosts a server with this, anyone can that joins it can close the whole server by typing /quit in chat.

Edit: actually it just pops open the quit to desktop message box for the host.

Quinn aka xXAwesomeXx, you need to learn a lot about the difference between server sided and client sided code.

On the client side, functions starting with servercmd have no special meaning.  The only time when servercmd functions will work in a client.cs file is when you are hosting from a non dedicated server, where both client.cs files and server.cs files are executed.  In this case, anyone in your server has access to these functions, but they will be executed on your client.  Therefore, anyone that types /quit in chat will cause quitGame() to be executed for the HOST, not for the person that called the command.

You also left out the %client argument in every function.
« Last Edit: April 13, 2016, 06:09:17 PM by Nexus »

Seriously,what are the point of these commands anyway when you could just use the menu to access these or use the keybind for them.
« Last Edit: April 14, 2016, 01:14:18 PM by cooolguy32 »