[RELEASE] In-game ban command for GMs

04/29/2013 17:32 αωєѕσмє#16
This is great :)

Thanks

Mfg
04/29/2013 17:32 5203307a#17
Compile & Debug & Release!
btw Thanks alot!
04/29/2013 17:37 ricky92#18
Quote:
Originally Posted by EpicG4m3r View Post
Its not working :(

Code:
******************************************************
*        Universal Elements extension library        *
*                  made by ricky92                   *
*                   Version 1.0.0                    *
******************************************************
[*] Module "Ban command" loaded.[*] Module "Command Extensions" loaded.
        Command registered: "ban" (early initialization)

[COLOR="DarkRed"]Can not open [CONFIG][/COLOR]
Ingame I type in:
Code:
/ban Nexus 50
And he starts dancing ^^
You need to make the start script load the game file with the library injected in it. You're probably just executing the command I wrote, but you have to make sure it's the "start" script which executes that, with the correct path and all. Otherwise, it won't work.

As for the crash, I guess it's caused by the disconnect feature. Quite strange, actually, since I'm executing exactly the same code that "/dc" has.
04/29/2013 19:36 lollo_9_1#19
Quote:
Originally Posted by ricky92 View Post
As for the crash, I guess it's caused by the disconnect feature. Quite strange, actually, since I'm executing exactly the same code that "/dc" has.
You can't directly crash "yourself", you must use a event_timer for that otherwise the game crashes (try using DESC::DelayedDisconnect instead of DESC_MANAGER::DestroyDesc)
If the game crashes when you're trying to disconnect another player (with destroydesc or not) then... the do_ban is slightly bugged °°
04/29/2013 20:44 ricky92#20
Quote:
Originally Posted by lollo_9_1 View Post
You can't directly crash "yourself", you must use a event_timer for that otherwise the game crashes (try using DESC::DelayedDisconnect instead of DESC_MANAGER::DestroyDesc)
If the game crashes when you're trying to disconnect another player (with destroydesc or not) then... the do_ban is slightly bugged °°
It's not, I added that check and, in fact, the first thing that came to my mind was that I hadn't compiled the right version XD But well, I tried it on my server and it works, so I have no idea what his problem is. To everyone who's experiencing that problem: try redownloading the file, maybe you downloaded an old version.

Update: someone asked via PM to have the source of the ban function. While it's not a problem for me to post that, it would be to post the source for my whole library. So, I'm posting this just for reference, to let people see how it works (and also check if there is any bug, why not). You probably won't be able to compile the source as it is, if you don't have the right header files XD

[Only registered and activated users can see links. Click Here To Register...]
04/30/2013 16:32 [The]Domco#21
Quote:
Originally Posted by ricky92 View Post
It's not, I added that check and, in fact, the first thing that came to my mind was that I hadn't compiled the right version XD But well, I tried it on my server and it works, so I have no idea what his problem is. To everyone who's experiencing that problem: try redownloading the file, maybe you downloaded an old version.

Update: someone asked via PM to have the source of the ban function. While it's not a problem for me to post that, it would be to post the source for my whole library. So, I'm posting this just for reference, to let people see how it works (and also check if there is any bug, why not). You probably won't be able to compile the source as it is, if you don't have the right header files XD

[Only registered and activated users can see links. Click Here To Register...]
Thanks man i am working with C and C# , c++ so i will try soon to make my own function .. anyway good work more releases like this on epvp will be very nice :) Bad that i cant give u more than thanks

btw: So yea like someone said when i use the function core will shutdown o.O
04/30/2013 20:19 ricky92#22
Quote:
Originally Posted by [The]Domco View Post
Thanks man i am working with C and C# , c++ so i will try soon to make my own function .. anyway good work more releases like this on epvp will be very nice :) Bad that i cant give u more than thanks

btw: So yea like someone said when i use the function core will shutdown o.O
Hmm you are right, it crashes. I recompiled it with some other options (no idea why this changed anything, but it works now), you can redownload it and it should work for you too ;)
05/01/2013 20:58 [The]Domco#23
Quote:
Originally Posted by ricky92 View Post
Hmm you are right, it crashes. I recompiled it with some other options (no idea why this changed anything, but it works now), you can redownload it and it should work for you too ;)
Nice man now it works :) btw : source too reuploaded ?
05/01/2013 21:31 WeXoSK#24
o_O good work, I am going to test
05/01/2013 23:16 ricky92#25
Quote:
Originally Posted by [The]Domco View Post
Nice man now it works :) btw : source too reuploaded ?
Good to know :) And well, the source has not changed, as I said it was a problem of compiler optimizations... it was just a matter of recompiling it ;)
05/01/2013 23:50 [The]Domco#26
Quote:
Originally Posted by ricky92 View Post
Good to know :) And well, the source has not changed, as I said it was a problem of compiler optimizations... it was just a matter of recompiling it ;)
And if i want to make some changes how to compile correctly ? ( g++ ) ?
05/02/2013 00:22 xDeStRuCtx#27
@Up
can`t without his headers.
05/02/2013 00:44 ricky92#28
Quote:
Originally Posted by [The]Domco View Post
And if i want to make some changes how to compile correctly ? ( g++ ) ?
As xDeStRuCtx said, you can't without my headers and library structure... And I'm sorry, but I won't release it :\
05/02/2013 13:40 [The]Domco#29
Quote:
Originally Posted by ricky92 View Post
As xDeStRuCtx said, you can't without my headers and library structure... And I'm sorry, but I won't release it :\
I can buy PM ?
05/02/2013 18:30 yarka0000#30
when we inject this library, we cannot use mijago's mysql commands. is there any solution?