[Plugin] YSF - kurta999's version

PHP код:
[18:52:46] [debugServer crashed due to an unknown error
[18:52:46] [debugNative backtrace:
[
18:52:46] [debug#0 f749209b in _ZN10StackTraceC1EPv () from plugins/crashdetect.so
[18:52:46] [debug#1 f748d2d2 in _ZN11CrashDetect20PrintNativeBacktraceERSoPv () from plugins/crashdetect.so
[18:52:46] [debug#2 f748debc in _ZN11CrashDetect20PrintNativeBacktraceEPv () from plugins/crashdetect.so
[18:52:46] [debug#3 f748e366 in _ZN11CrashDetect11OnExceptionEPv () from plugins/crashdetect.so
[18:52:46] [debug#4 f7491cec in ?? () from plugins/crashdetect.so
[18:52:46] [debug#5 f774a410 in ?? ()
[18:52:46] [debug#6 f73d3dc3 in ProcessTick () from plugins/YSF.so
[18:52:46] [debug#7 080cf1f2 in ?? () from ./samp03svr
[18:52:46] [debug#8 080ad27a in ?? () from ./samp03svr
[18:52:46] [debug#9 080a85ce in ?? () from ./samp03svr
[18:52:46] [debug#10 f74b8ca6 in __libc_start_main () from /lib32/libc.so.6
[18:52:46] [debug#11 0804b4a1 in ?? () from ./samp03svr 
Crash when created per-player gangzone
Reply

Server crash while using the plugin on CentOS or Unbuntu xD
Reply

Great plugin, but the thing which stops me to use it is the SA:MP version compatibility.

Quote:

Below R5, plugin only works with 0.3z R2-2

So since R5, it will work on any SA:MP version ? Meaning that this version will work without problem on 0.3x or the future 0.4a ?
Reply

Quote:
Originally Posted by IstuntmanI
Посмотреть сообщение
Great plugin, but the thing which stops me to use it is the SA:MP version compatibility.


So since R5, it will work on any SA:MP version ? Meaning that this version will work without problem on 0.3x or the future 0.4a ?
Now u can use it Just on 0.3z R2-2. But he will update it for the future SA-MP Releases. such as 0.4a or 0.3z R3-1.
Reply

Quote:
Originally Posted by IstuntmanI
Посмотреть сообщение
Great plugin, but the thing which stops me to use it is the SA:MP version compatibility.


So since R5, it will work on any SA:MP version ? Meaning that this version will work without problem on 0.3x or the future 0.4a ?
Yeah, it will work fine with future releases and previous releases aswell (I think so). It scans memory address and updates them so it may work with newer releases or previous, but it might break if there is alot of changes made to the SA-MP source code.
Reply

The plugin now supports only 0.3z and 0.3z R2-2!

Before R5, plugin only supported 0.3z R2-2. (there is currently NO 1000 player version support)
Some functions, which doesn't require memory hacking, these will work with every version.

Functions, which get data from server pools, these should work since 0.3x with every version, but for security, now limited to 0.3z AND 0.3z R2-2. And some functions, like server rules, set mode restart time, I need to find manualy the address within every new version.
Reply

I posted how you can get around that on the 3rd page: http://forum.sa-mp.com/showpost.php?...8&postcount=22
Reply

Quote:
Originally Posted by Whitetiger
Посмотреть сообщение
I posted how you can get around that on the 3rd page: http://forum.sa-mp.com/showpost.php?...8&postcount=22
I'll add ths method into plugin, but first, I need example how did and where get those bytes.

Anyway plugin development isn't sopped, R6 coming soon with one new extra function if everything will be okey.

And one question: I'm using callbakc hooks in YSF.inc. If someone include YSF in 5 filterscript, then YSF_OnPlayerSteamIn will be called 5 times + gamemode (if included). Someone can help me out, how i should solve this bug? I'm never home at hooking callbacks in pawn.
Reply

You may handle it internally from the plugin.
Код:
int called_OnPlayerSteamIn = 0;

somethingincplusplus YSF_OnPlayerSteamIn(int playerid)
{
    if(!called_OnPlayerSteamIn)
    {
         called_OnPlayerSteamIn = 1;
         ...
But I don't know if there's another more elegant way to do this.
Reply

you have to know just a tad of assembly, if you don't already... how I got those bytes is I copied your addresses and went to them in ollydbg.

Код:
FUNC_CConsole_AddStringVariable =			0x486FE0;
the first few asm instructions here are:

Код:
PUSH EBX
PUSH ESI
PUSH EDI
MOV EDI,DWORD PTR SS:[ESP+18]


on the left side of these opcodes are the hexadecimal value for the asm instruction, which in this case is:

53 56 57 8b 7c 24 18 85 FF

you just need to make sure you copy enough bytes so that it's unique enough that it won't find the same pattern twice in the SA-MP server.

and \x is used for a hex number output in a string

the 2nd parameter in FindPattern, all the x's. you need to put an x or a ? for each byte. a ? is used if that asm instruction is likely to change in the future: e.g: memory addresses. it ignores that byte when searching then.

so the final code for FUNC_CConsole_AddStringVariable is:
Код:
FindPattern("\x53\x56\x57\x8B\x7C\x24\x18\x85\xFF", "xxxxxxxxx");
Reply

Thank you very much! Now i understood it clear. With this possible to find RPC ID automaticly, i will play with this when i will bored.
Reply

Would be good if the plugin can send a bullet to a player, so NPC could shoot when lagcomp is enabled.
Reply

Quote:
Originally Posted by MugiwaraNoLuffy
Посмотреть сообщение
Would be good if the plugin can send a bullet to a player, so NPC could shoot when lagcomp is enabled.
What you mean? The hit detection is not detected when lagcomp is enabled?
Reply

Quote:
Originally Posted by iZN
Посмотреть сообщение
What you mean? The hit detection is not detected when lagcomp is enabled?
When a NPC shoots you, bullets are not synced, therefore a function that sends shots to clients would be great. Also would be great for creating turrets or things like that.
Reply

Just wait!!! I'll try something it.
Reply

I do not know if this is done server side, but could you perhaps look into it and see if you can make a function get the position of a grenade projectile that is thrown?
Reply

Quote:
Originally Posted by Chaser98
Посмотреть сообщение
I do not know if this is done server side, but could you perhaps look into it and see if you can make a function get the position of a grenade projectile that is thrown?
Unfortunately not possible without collision data which is stored on the client and not shared with the server. This would require a client plugin or a game running alongside the server to retrieve the data from.

You could easily get the projected trajectory in empty space with some math, but there's no knowing where the grenade actually bounces or at what height it lands.
Reply

Quote:
Originally Posted by [HLF]Southclaw
Посмотреть сообщение
Unfortunately not possible without collision data which is stored on the client and not shared with the server. This would require a client plugin or a game running alongside the server to retrieve the data from.

You could easily get the projected trajectory in empty space with some math, but there's no knowing where the grenade actually bounces or at what height it lands.
The easiest way would be loading all collisions in the server and process them there, and also that wouldn't be hackable by modifying .col files.
Reply

I’m not sure if possible to be done but if you could hook(part of SelectTextDraw hovercolor) or create OnTextDrawHover(playerid,textdraw:id). It’s basicly when you hover over with your mouse over textdraw you call a callback in witch later you can create another textdraw when you hover over other.It’s basicly something like this:
Reply

Nice idea, but impossible server side.

The check done in client side, server side you can't check when player moved their mouse into textdraw area.
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)