AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Module Coding (https://forums.alliedmods.net/forumdisplay.php?f=9)
-   -   Any Module Ideas (https://forums.alliedmods.net/showthread.php?t=7283)

Votorx 11-01-2004 13:00

Any Module Ideas
 
I need practice with C++ and am willing right now to try (Note the word TRY) and make a module for amxx. Any ideas of what ya'll would like, and keep it resonable, some shit like "I want to be able to look through clients computers for files", is something I'm not even going to attempt to do.

BAILOPAN 11-01-2004 13:04

I want a module that crashes the server and says "SAWCE, YOU SUCK LOL".

That or a module that implements a system call ability (like system(), except fork'd so there's no lag).

Votorx 11-01-2004 13:14

Err Lol, forgot to mention this is going to be for windows >.>

Geesu 11-01-2004 16:35

Quote:

Originally Posted by BAILOPAN
I want a module that crashes the server and says "SAWCE, YOU SUCK LOL".

That or a module that implements a system call ability (like system(), except fork'd so there's no lag).

are you talking about pipe's and such?

I did some pipaging not too long ago to execture apps on a unix machine... I don't understand how that wouldn't cause lag though?

johnjg75 11-01-2004 23:38

Re: Any Module Ideas
 
Quote:

Originally Posted by Votorx
I need practice with C++ and am willing right now to try (Note the word TRY) and make a module for amxx. Any ideas of what ya'll would like, and keep it resonable, some shit like "I want to be able to look through clients computers for files", is something I'm not even going to attempt to do.

thats what i want too :(

Votorx 11-02-2004 13:08

So far I have some really mediocre things just so I can understand the SDK a bit better like, a way to check for specific alive people (returns all the bots that are alive, clients etc.), a Spammer (just spams the client for how many messages you gave * 10), Swirling HUD messages (still working on it will basically the message runs around the clients screen) and, lmao that's basically it, Bailopan I doubt I'll be able to do your system call i'll try though.

Johnny got his gun 01-17-2005 04:01

*bump*

I want a multi threading module. I thought we had one around here, looks like we didn't.

BAILOPAN 01-17-2005 04:48

The AMX engine is not thread safe.

A multithreading module is dangerous at best. It would have to be used with much discretion, and there would need to be a mutex/locking system on the runtime structure.

Johnny got his gun 01-17-2005 04:59

I'm only going to use it with some SQL calls. :cry:

PM 01-17-2005 08:46

Then, make a mysql module which implements the future result pattern! (or whatever it was called again).


Works like this:

PLUGIN_OLOLOL:
Code:
public callback_func(addinf[], addinflen) {    // The query finished!1111    result = result_query_o0();    // Or something... } public DO_THE_QUERY() {    teh_query("SELECT * FROM mwahaha", "callback_func", "additional information passed to callback func", size_of_additional_information) }

MODULE_OMGOMG:
Code:
class CQuery {    bool m_Finished;    cell *m_AdditionalInfo;    cell m_AdditionalInfoSize;    std::string m_CallbackFunc;    AMX *m_Plugin;    some_type some_mysql_handle; public:    CQuery(AMX *amx, const char *callback, cell *addInfo, cell addInfoSize, some_type mysqlHandle);    // The constructor...    //  Sets members    //  Spawns a thread that does the mysql operation and then calls out SetFinished function    ~CQuery();    bool IsFinished();    // These two should be guarded by Critical sections    void SetFinished();  // Or whatever...    cell *GetAddInfo();    cell GetAddInfoSize();    some_type GetHandle();    AMX *GetAMX();    const char *GetFunc(); }; // LIST! Don't use a vector here! typedef std::list<CQuery> QueryList; QueryList g_QueryList; static cell AMX_NATIVE_CALL teh_query(AMX *amx, cell *params) {    // Retreive parameters    // ...    // Then:    g_QueryList.push_back(CQuery(amx, func, etc, etc)); } void CallThisFromServerFrame() {    ITERATE_THROUGH_G_QUERYLIST    {       if (iter->IsFinished())       {           EXECUTE_CALLBACK           REMOVE_FROM_LIST       }    } }

Or something like that.. :D


All times are GMT -4. The time now is 21:36.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.