Math and and hook "say"
Hey.
I was looking for plugin, which is - math examples, and who first write right sum *do something*. But I didn't find. Code:
Spoiler
I want to get from client right sum, then do something (in the comments of code explained) Can you explain me it please? :) |
Re: Math and get integer from clcmd "say"
Hook say(with register_clcmd), read the arguments(the chat message) and process it to get the sum.
|
Re: Math and get integer from clcmd "say"
I changed code a little.
Spoiler
This doesn't work. Error: Code:
Error: Argument type mismatch (argument 2) on line 29 |
Re: Math and get integer from clcmd "say"
You have a lot of mistakes in that code. I suggest you dearch how to use read_argv, str_to_num, equal correctly and what they do.
Give it one more try. If you can't figure it out I'll show you the correct way. |
Re: Math and get integer from clcmd "say"
nevermind
|
Re: Math and get integer from clcmd "say"
Okey, i think, i know how to use read_argv(). So str_to_num doesn't know, if i'm right.
What about equali? It is for compare two strings. So I must use num_to_str for equali? I tried this:
Spoiler
It's compiled without errors or warnings. I tried it on server, but when I wrote anything, it called func. When I predicted right sum, it's called "You're right!". |
Re: Math and get integer from clcmd "say"
Okey, I was coding all day long.
I did it, i think.
Spoiler
It's working. But, if something is wrong, can you tell me what? :) Thanks. |
All times are GMT -4. The time now is 19:41. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.