Some newbe questions on mm coding
Hi,
I'm trying to move from sm to mm, but there are some things that I just have no clue how to do. Can you help me translate these snippets to C++/MM ? (my trouble is mostly to mimic some of the stock SM functions) Code:
PrintToChat(index,"%s :D","hello world"); Code:
PlayerCashOffset = FindSendPropOffs("CCSPlayer","m_iAccount"); Code:
new maxclients = GetMaxClients(); oops wrong forum, can someone move my thread? thanks! |
Re: Some newbe questions on mm coding
Look at the SourceMod sourcecode and see how sourcemod does it.
http://hg.alliedmods.net/releases/sourcemod-1.3/summary |
Re: Some newbe questions on mm coding
I tried that but sourcemod uses other internal sourcemod functions which use other internal functions .. all of these have their own header includes and so on and so on.
I just wish I could write an overly simple plugin without having to analyse the whole SDK codebase and all of sourcemod.. and thats why I asked for help. |
Re: Some newbe questions on mm coding
Quote:
|
Re: Some newbe questions on mm coding
Yes but only MM plugins can have closed source...
http://forums.alliedmods.net/showthread.php?t=131961 And I'm pretty sure it would only take a few minutes to the experienced MM coders to help me out. EDIT: I don't want to sound like I'm lazy and I want others to do the work for me. But isn't the whole point of these forums to help each other rather than pointing out obvious facts? I mean I'm asking a consice, clear question about MM development and all I get in return are questions as to why I need help and how I wouldn't need the help if I had all the knowledge possible around MM coding.. Whats the point of these forums then? Just post a sticky to the HL SDK and SM trunk and lock down the MM question/coding forums. That would be even easier. I'm sorry, I really am, but it doesn't feel like you're even wanting to help people...I'm used to the Java programming world, and when you ask people how to do something, they don't reply with a link to the Java API. They give you examples. Its what I do whenever I can. |
Re: Some newbe questions on mm coding
Making plugins like this closed-source is sad and harmful. Anyway, there are two problems with your post.
The first is, you basically asked for someone to come along and do a 1:1 translation of extremely high-level code. It's not possible. SourceMod abstracts away the deep complexities of C++ and the SDK. It'd probably be 500 lines of delicate code to correctly implement your snippet, and it'd take pages and pages to explain it. If you're serious about developing plugins in C++, you will need to be able to maintain and debug your plugin, and you will need to be able to research both the SDK and prior work like SourceMod (made possible by open-source). The forums are here to point you in the right direction, and contrary to your opinion, it's filled with great Q&A threads. No one said systems programming was easy like Java. My advice: ask specific questions. How does this code work? Where can I find how X works? How can I do Z? Show that you've done some research, and people will know how to help you better. |
Re: Some newbe questions on mm coding
First of all, thank you both very much!
Please let me apologise for my previous post, I was wrong to take that tone. Quote:
Quote:
and those who aren't usually don't make use of the things I'm looking for. Quote:
Quote:
Quote:
Quote:
The SDK and MM may be complex, but C++ is just a programming language. Translating the high level code I wrote above should be a simple matter of refactoring if you know both MM & SM. Quote:
- There is virtually no documentation (as I have read oh so many times on these forums) - the deep complexities of [..] the SDK So basically if I want to use MM I have to fully understand the SDK. Quote:
Quote:
I wonder what we were doing back at school when we were programming CPUs using Java? Quote:
- I have had courses on C/C++ programming, but I (almost) never practice it - I'm a fluent programmer in many (most?) high-level programming languages - I have read the documentation on the sourcemm.net website but found it insufficient (which is probably a failure on my part) - I have read articles on the valve dev pages and compiled some easy examples - I have gone trough most of the plugins available on these forums but found them outdated or off topic - I hope to be able to devise a way to make the source code public : Currently my idea is to use every function/method within the plugin (kinda the unit-testing way) and have the return values put in an md5-buffer, along with a user defined parameter and returning the resulting md5 to the end user (allowing that token to be compared). But I'm still not sure if this would achieve acceptable security. Thinking of it : does SourcePawn have an md5 implementation? - As you may know by now Ive been making SM plugins. And finally I wish to learn more about MM coding, but I can't seem to find a good trail. |
Re: Some newbe questions on mm coding
Not sure if you've seen this: http://wiki.alliedmods.net/Category:...ce_Development
|
Re: Some newbe questions on mm coding
I have afronanny, but thanks anyway. Most of the information is either out-dated either too technical (SH part) to dive in without background knowledge, unless you can make it clear for me :)
By the way, how much would you charge to extend SM/MM to include "decent" security. And by security I mean a means to ensure loaded SM plugins are authentic. Also would you be interested in bandwidth or source server hosting as payment? |
All times are GMT -4. The time now is 15:56. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.