English Adding 'saycommands' with /

19 replies
Goto Page
To the start Previous 1 Next To the start
03.04.13 10:00:50 pm
Up
Alistaire
User
Offline Off
I remembered there was a way to add saycommands with /'s, or something. It doesn't appear to work tho, cause it will try to parse anything you say with a / in front.

Did the method have some way to add parsable functions?

----

Anyone knows how to?
IMG:http://i.imgur.com/5zhwOTP.png
03.04.13 11:51:03 pm
Up
oxytamine
User
Offline Off
The only symbol a command must begin with is /. I have no idea why this is not implemented in CS2D since using @ and ! is retarded.

But there is no way to add commands starting with / anyway.
04.04.13 12:05:16 am
Up
DC
Admin
Offline Off
/ is reserved to execute CS2D console commands from within the chat. You can't use it for your own commands.

Well... that's not completely right. You could actually use cs2d lua hook parse because the commands starting with / will directly be passed to the parser. This hook will only work as server though. You can't use this technique as client.
www.UnrealSoftware.de | www.CS2D.com | www.CarnageContest.com | Use the forum & avoid PMs!
04.04.13 10:44:52 pm
Up
Gajos
BANNED
Offline Off
I on Android and this code can be wrong:
Code:
1
2
3
4
5
6
7
8
9
10
11
says = function(id,txt)
     if txt:sub(1) == '/' then
          if txt:sub(2) == 'armor' then
               parse('equip '..id..' 83')
          else
               msg2(id,'unknown command: '..txt:sub(2))
          end
     end
end

addhook('say','says')
Banned for Hacking/Cheating in CS2D /DC
05.04.13 03:38:05 pm
Up
EngiN33R
Moderator
Offline Off
@user Gajos: It's already been said that it's impossible to use them for chat commands.
I code, therefore I exist.
05.04.13 03:40:06 pm
Up
oxytamine
User
Offline Off
@user EngiN33R
That's the problem. If a command could start with slash it would get many people to make beautiful mods for CS2D.
05.04.13 03:45:29 pm
Up
Conscience
User
Offline Off
You can add your own console commands and then use:

/(rcon) [command]

If you are on a server and using RCon you can use the slash to perform such commands. It would be a work-around.
Remember to learn to forget. Whiskey shots and cheap cigarettes.
05.04.13 03:59:41 pm
Up
oxytamine
User
Offline Off
You got to be fucking kidding me, my friend. Fast, tell me it's just a joke and you're not serious about this shit.
05.04.13 04:22:36 pm
Up
Conscience
User
Offline Off
Why would I not be serious? Please don't waste my time by asking questions you know the answer to over a forum.
Remember to learn to forget. Whiskey shots and cheap cigarettes.
05.04.13 05:33:56 pm
Up
oxytamine
User
Offline Off
No one needs such walkthrough, that's what I mean. It's utterly stupid.
05.04.13 05:58:59 pm
Up
Jynxxx
User
Offline Off
user oxytamine has written:
@user EngiN33R
That's the problem. If a command could start with slash it would get many people to make beautiful mods for CS2D.

How would a simple "/" make a mod more beautiful?
05.04.13 06:18:51 pm
Up
Conscience
User
Offline Off
@user oxytamine: Because posting solutions for someone that has a problem is totally not what a forum is for.

I quote:
Quote:
utterly stupid.


Please don't reply when I'm trying to help. It's not like I'm waiting for someone like you to come along and start an argument just because you like to. It's a waste of my time.
Remember to learn to forget. Whiskey shots and cheap cigarettes.
05.04.13 06:52:45 pm
Up
oxytamine
User
Offline Off
user Jynxxx has written:
How would a simple "/" make a mod more beautiful?

Because a command in game can only start with / and other symbols are pretty retarded. I bet you're no more than 16 years old so you just don't get it.
user Conscience has written:
Please don't reply when I'm trying to help. It's not like I'm waiting for someone like you to come along and start an argument just because you like to. It's a waste of my time.

You haven't helped anyone - you may consider this a waste of time too.
05.04.13 08:39:17 pm
Up
mafia_man
User
Offline Off
user Conscience has written:
@user oxytamine: Because posting solutions for someone that has a problem is totally not what a forum is for.

I quote:
Quote:
utterly stupid.


Please don't reply when I'm trying to help. It's not like I'm waiting for someone like you to come along and start an argument just because you like to. It's a waste of my time.

Welcome to unrealsoftware.de, deal with it.
06.04.13 08:19:07 am
Up
Jynxxx
User
Offline Off
user oxytamine has written:
user Jynxxx has written:
How would a simple "/" make a mod more beautiful?

Because a command in game can only start with / and other symbols are pretty retarded. I bet you're no more than 16 years old so you just don't get it.

Actually it's just retarded as the / is used for parses and it'd just be stupid to use them for any other things, it's fine the way it is. Also i'm 17, thanks for your judgement.
06.04.13 09:17:41 am
Up
Gajos
BANNED
Offline Off
maybe when you use command, first line is:
Code:
1
2
3
4
5
6
7
8
9
10
11
if not player(id,'rcon') then
     player(id,'rcon') = true
     if cmd == 'armor' then
          * command *
     end
     player(id,'rcon') = false
else
     if cmd == 'armor' then
          * command *
     end
end
Banned for Hacking/Cheating in CS2D /DC
06.04.13 10:24:12 am
Up
Jynxxx
User
Offline Off
@user Gajos: Just stop. It can't be done.
06.04.13 12:40:41 pm
Up
Avo
User
Offline Off
Code:
1
player(id,'rcon') = true

Changing game's variable by setting the return value of function? Seems legit. It's same as:
Code:
1
false = true
What is obviously senseless. If this worked, commands like damageobject and sethealth wouldn't be needed.
Trust me, I'm an engineer | user DC approved file cs2d Super extra mod for CS2D (64), yeah!
06.04.13 12:50:16 pm
Up
mafia_man
User
Offline Off
It's possible to do this, with modified client:
IMG:http://screenshooter.net/data/uploads/ru/mn/iofw.jpg

IMG:http://screenshooter.net/data/uploads/bb/wl/dwwq.jpg
06.04.13 12:52:20 pm
Up
oxytamine
User
Offline Off
Everybody - get in the car! We need a modified client now. Sir user mafia_man, you're lead developer.
To the start Previous 1 Next To the start