SA-MP Forums

SA-MP Forums (https://forum.sa-mp.com/index.php)
-   Plugin Development (https://forum.sa-mp.com/forumdisplay.php?f=18)
-   -   [Plugin] SKY - Slice's fork of kurta999's fork of YSF (https://forum.sa-mp.com/showthread.php?t=563442)

Slice 26/06/2015 12:26 PM

Re: SKY - Slice's fork of kurta999's fork of YSF
 
How did you fix it?

Cypress 26/06/2015 03:30 PM

Re: SKY - Slice's fork of kurta999's fork of YSF
 
Quote:

Originally Posted by Slice (Post 3502218)
How did you fix it?

Used an older version of SKY I had for 0.3z. Works fine without crashing.

Ha$H_Sexyboy 26/06/2015 09:33 PM

Re: SKY - Slice's fork of kurta999's fork of YSF
 
Quote:

Originally Posted by Cypress (Post 3502361)
Used an older version of SKY I had for 0.3z. Works fine without crashing.

right but one problem with that version is when you get shot by a player you cannot see your health bar go down he can see it but not the person whose getting shot

DRIFT_HUNTER 27/06/2015 02:19 AM

Re: SKY - Slice's fork of kurta999's fork of YSF
 
Quote:

Originally Posted by Cypress (Post 3502111)
It just keeps crashing on windows.

Code:

SA-MP Server: 0.3.7



Exception At Address: 0x00000000 Module: (Unknown)



Registers:

EAX: 0x00000000        EBX: 0x00000000        ECX: 0x0018FEA4        EDX: 0x00000000

ESI: 0x01FC4910        EDI: 0x00599C78        EBP: 0x0018FE10        ESP: 0x0018FDFC

EFLAGS: 0x00010202



Stack:

+0000: 0x6E4E19A4  0x01FC4910  0x00599C78  0x01FC4910

+0010: 0x0018FEA4  0x76C510FF  0x0048E7AC  0x01FC4910

+0020: 0x76C51136  0x00599C78  0x0048E9AC  0x76C516A5

+0030: 0x00000000  0x3BA3C20A  0x0048AC5D  0x00000000

+0040: 0x00001DB1  0x0018FF88  0x7EFDE000  0x0100E000

+0050: 0x00010101  0x00000032  0x00001E61  0x000000A0

+0060: 0x00001BE4  0x00599C78  0x656D6167  0x65646F6D

+0070: 0x00003531  0x004C0014  0x004C0010  0x7EFDE000

+0080: 0x004A9B60  0x0018FE70  0x0018FF78  0x0018FF78

+0090: 0x0049B938  0x004B6698  0xFFFFFFFF  0x00499BD1

+00A0: 0x00499BE1  0x004A9B60  0x0018FF78  0x004A97D1

+00B0: 0xFFFFFFFF  0x0049B3D6  0x00000001  0x005915A8

+00C0: 0x005915F0  0x00000094  0x00000006  0x00000001

+00D0: 0x00001DB1  0x00000002  0x76726553  0x20656369

+00E0: 0x6B636150  0x00003120  0x00000000  0x00000000

+00F0: 0x00000000  0x00000000  0x00000000  0x00000000

+0100: 0x00000000  0x00000000  0x00000000  0x00000000

+0110: 0x00000000  0x00000000  0x00000000  0x00000000

+0120: 0x00000000  0x00000000  0x00000000  0x00000000

+0130: 0x00000000  0x00000000  0x00000000  0x00000000



--------------------------



Loaded Modules:

samp-server.exe        A: 0x00400000 - 0x004FA000        (C:\Users\George\Desktop\SA-MP 0.3.7\samp-server.exe)

ntdll.dll        A: 0x77AC0000 - 0x77C40000        (C:\Windows\SysWOW64\ntdll.dll)

kernel32.dll        A: 0x76C40000 - 0x76D50000        (C:\Windows\syswow64\kernel32.dll)

KERNELBASE.dll        A: 0x76D90000 - 0x76DD7000        (C:\Windows\syswow64\KERNELBASE.dll)

SHELL32.dll        A: 0x75490000 - 0x760DB000        (C:\Windows\syswow64\SHELL32.dll)

msvcrt.dll        A: 0x775B0000 - 0x7765C000        (C:\Windows\syswow64\msvcrt.dll)

SHLWAPI.dll        A: 0x77660000 - 0x776B7000        (C:\Windows\syswow64\SHLWAPI.dll)

GDI32.dll        A: 0x77520000 - 0x775B0000        (C:\Windows\syswow64\GDI32.dll)

USER32.dll        A: 0x76140000 - 0x76240000        (C:\Windows\syswow64\USER32.dll)

ADVAPI32.dll        A: 0x76740000 - 0x767E1000        (C:\Windows\syswow64\ADVAPI32.dll)

sechost.dll        A: 0x76B80000 - 0x76B99000        (C:\Windows\SysWOW64\sechost.dll)

RPCRT4.dll        A: 0x76F50000 - 0x77040000        (C:\Windows\syswow64\RPCRT4.dll)

SspiCli.dll        A: 0x75430000 - 0x75490000        (C:\Windows\syswow64\SspiCli.dll)

CRYPTBASE.dll        A: 0x75420000 - 0x7542C000        (C:\Windows\syswow64\CRYPTBASE.dll)

LPK.dll        A: 0x76F40000 - 0x76F4A000        (C:\Windows\syswow64\LPK.dll)

USP10.dll        A: 0x77420000 - 0x774BD000        (C:\Windows\syswow64\USP10.dll)

WSOCK32.dll        A: 0x72AC0000 - 0x72AC7000        (C:\Windows\system32\WSOCK32.dll)

WS2_32.dll        A: 0x76800000 - 0x76835000        (C:\Windows\syswow64\WS2_32.dll)

NSI.dll        A: 0x762D0000 - 0x762D6000        (C:\Windows\syswow64\NSI.dll)

WINMM.dll        A: 0x73410000 - 0x73442000        (C:\Windows\system32\WINMM.dll)

IMM32.DLL        A: 0x760E0000 - 0x76140000        (C:\Windows\system32\IMM32.DLL)

MSCTF.dll        A: 0x768C0000 - 0x7698C000        (C:\Windows\syswow64\MSCTF.dll)

SKY.DLL        A: 0x6E4E0000 - 0x6E51D000        (C:\Users\George\Desktop\SA-MP 0.3.7\plugins\SKY.DLL)

mswsock.dll        A: 0x72260000 - 0x7229C000        (C:\Windows\system32\mswsock.dll)

wshtcpip.dll        A: 0x72AB0000 - 0x72AB5000        (C:\Windows\System32\wshtcpip.dll)

NLAapi.dll        A: 0x72AE0000 - 0x72AF0000        (C:\Windows\system32\NLAapi.dll)

napinsp.dll        A: 0x724A0000 - 0x724B0000        (C:\Windows\system32\napinsp.dll)

pnrpnsp.dll        A: 0x72480000 - 0x72492000        (C:\Windows\system32\pnrpnsp.dll)

DNSAPI.dll        A: 0x72510000 - 0x72554000        (C:\Windows\system32\DNSAPI.dll)

winrnr.dll        A: 0x72AD0000 - 0x72AD8000        (C:\Windows\System32\winrnr.dll)

IPHLPAPI.DLL        A: 0x72F10000 - 0x72F2C000        (C:\Windows\system32\IPHLPAPI.DLL)

WINNSI.DLL        A: 0x72F00000 - 0x72F07000        (C:\Windows\system32\WINNSI.DLL)

rasadhlp.dll        A: 0x71F90000 - 0x71F96000        (C:\Windows\system32\rasadhlp.dll)

Never mind. Fixed.

I have no idea why does it crash like that. Does it crash right on startup or when certain function/callback is used?
Also do you have C++ redistributable installed? Im not sure if it has to be 2012 as i compiled with 2012 compiler but at least install 2010 and 2012...
I have noticed that you use x64 OS. Im not x64 windows user so i might be completely wrong, but it might be that you need x86 libraries and not x64 so try that to (Install both x64 and x86).

Cypress 27/06/2015 11:35 AM

Re: SKY - Slice's fork of kurta999's fork of YSF
 
Quote:

Originally Posted by DRIFT_HUNTER (Post 3502885)
I have no idea why does it crash like that. Does it crash right on startup or when certain function/callback is used?
Also do you have C++ redistributable installed? Im not sure if it has to be 2012 as i compiled with 2012 compiler but at least install 2010 and 2012...
I have noticed that you use x64 OS. Im not x64 windows user so i might be completely wrong, but it might be that you need x86 libraries and not x64 so try that to (Install both x64 and x86).


I have had compiled the plugin myself but it still crashes when I connect to the server. How so that the old version doesn't crash. And yes, health bar is bugged but I only use the windows version for testing purposes.

EDIT:

For people who are experiencing crashes on windows, just use the older version of the plugin. Note that the health bar is not fully functional. If the owner wants to remove the link please feel free to tell so.

https://www.dropbox.com/s/x5wo1eo8fhgukog/SKY.dll?dl=0

Crayder 01/07/2015 02:38 AM

Re: SKY - Slice's fork of kurta999's fork of YSF
 
Quote:

Originally Posted by Cypress (Post 3503132)
I have had compiled the plugin myself but it still crashes when I connect to the server. How so that the old version doesn't crash. And yes, health bar is bugged but I only use the windows version for testing purposes.

Actually, you can fix it pretty easily. I'll find the code and edit this...

Code:

//Replace this (3489 - 3492):
                        } else {
                                PlayerTextDrawSetPosition(playerid, s_HealthBarForeground[playerid], 551.5 + float(health) * 0.5651, 70.25);
                                PlayerTextDrawShow(playerid, s_HealthBarForeground[playerid]);
                        }
                       
//With this:
                        } else {
                                PlayerTextDrawDestroy(playerid, s_HealthBarForeground[playerid]);
                                s_InternalPlayerTextDraw[playerid][s_HealthBarForeground[playerid]] = false;
                                s_HealthBarForeground[playerid] = PlayerText:INVALID_TEXT_DRAW;
                                PlayerTextDrawBoxColor  (playerid, s_HealthBarForeground[playerid], WC_NewHealthBarColor(playerid, float(health)));
                        //        PlayerTextDrawSetPosition(playerid, s_HealthBarForeground[playerid], 551.5 + float(health) * 0.5651, 70.25);
                                PlayerTextDrawShow(playerid, s_HealthBarForeground[playerid]);
                                UpdateHealthBar(playerid, true);
                        }

The color line here is for my custom health bar colors, you can remove it or obtain the update from me (includes options for gradient, per-player, and global colors). The first three lines destroy the foreground. The UpdateHealthBar function will recreate it automatically since the first three lines remove all traces of it.

Also, really the problem isn't a big deal if you use YSF. The problem isn't really important either. It's just the textdrawsetposition functions. If you are using YSF, just replace the "PlayerTextDrawSetPosition" line with the function from YSF (it has a different name).

Yashas 03/07/2015 01:18 AM

Re: SKY - Slice's fork of kurta999's fork of YSF
 
I have a new feature suggestion.

You could write a function to get the address of a function in every AMX Instance and store it in a vector of vector or maybe in an map of vector. Your function will return an id (id is assigned and handled by the plugin).

Code:

new id = GetRemoteFunctionID("MyRemoteFunction");
CallRemoteFunctionEx(id,"ii",1,2);

This will directly call the functions in every AMX Instance using the addresses stored.

In this way you can avoid searching every time CallRemoteFunction is called!!

This is something which cannot be done using #emit for Remote Functions whereas it is possible for Locals.

Slice 03/07/2015 07:22 AM

Re: SKY - Slice's fork of kurta999's fork of YSF
 
That won't work because the VM checks if addresses are within itself.

Yashas 03/07/2015 02:57 PM

Re: SKY - Slice's fork of kurta999's fork of YSF
 
Quote:

Originally Posted by Slice (Post 3509018)
That won't work because the VM checks if addresses are within itself.

What about the indexes returned by amx_FindPublic?

Slice 03/07/2015 03:10 PM

Re: SKY - Slice's fork of kurta999's fork of YSF
 
Quote:

Originally Posted by Yashas (Post 3509255)
What about the indexes returned by amx_FindPublic?

You can never actually traverse into the memory space of another AMX, at least not for executing code. You could make functions to (almost) directly read variables there, but that's about it.
If you find a way to run the bytecode of a function from another AMX, references to variables and such will get completely mixed up and further calls to other functions will result in access violations.

Yashas 03/07/2015 03:55 PM

Re: SKY - Slice's fork of kurta999's fork of YSF
 
Is it possible to store all the AMX Instances in a vector of Multiple Indirection pointers? And use that pointer as the argument to amx_Exec/amx_FindPublic?

Slice 03/07/2015 05:10 PM

Re: SKY - Slice's fork of kurta999's fork of YSF
 
Why would you want to do that?

mirou123 06/07/2015 02:23 AM

Re: SKY - Slice's fork of kurta999's fork of YSF
 
I compiled this myself and it is causing the server to crash when I login. And I found out that this problem will happen just by placing SKY.dll in your server.cfg even if you don't use any of its functions. I saw other people have the same problem so could you please fix it?

Xeonmeister 10/07/2015 01:31 PM

Re: SKY - Slice's fork of kurta999's fork of YSF
 
Could someone please tell me how to make this plugin work? I downloaded the plugin for the weapon-config that requires this and the only thing i see is a bunch of files which i don t know where to put.
Sorry for this stupid question.

amirab 11/07/2015 09:04 PM

Re: SKY - Slice's fork of kurta999's fork of YSF
 
Quote:

Originally Posted by Xeonmeister (Post 3516215)
Could someone please tell me how to make this plugin work? I downloaded the plugin for the weapon-config that requires this and the only thing i see is a bunch of files which i don t know where to put.
Sorry for this stupid question.

if you meant sources in github , you should compile it and receive output as .dll file

Xeonmeister 11/07/2015 10:56 PM

Re: SKY - Slice's fork of kurta999's fork of YSF
 
How can i compile it?

nickdodd25 18/07/2015 08:39 PM

Re: SKY - Slice's fork of kurta999's fork of YSF
 
Just curious why isn't there any precompiled versions in the release section on github? Would be nice to have a precompiled windows if possible.

Abagail 18/07/2015 10:02 PM

Re: SKY - Slice's fork of kurta999's fork of YSF
 
I've compiled it for you:
https://evanabagail.net/files/SKY.dll

Ha$H_Sexyboy 19/07/2015 12:34 PM

Re: SKY - Slice's fork of kurta999's fork of YSF
 
There's a bug when no one's taking damage i have to restart the server each time,sup with that

Ha$H_Sexyboy 19/07/2015 12:40 PM

Re: SKY - Slice's fork of kurta999's fork of YSF
 
[14:38:11] Loaded.
[14:38:11] Loading plugin: SKY.so
[14:38:11] Error: Unknown Linux server version

I've also noticed that on 0.3.7 R2 the animations on death don't apply correctly

Slice 19/07/2015 01:17 PM

Re: SKY - Slice's fork of kurta999's fork of YSF
 
Go update it on GitHub.

Ha$H_Sexyboy 19/07/2015 01:24 PM

Re: SKY - Slice's fork of kurta999's fork of YSF
 
Quote:

Originally Posted by Slice (Post 3525450)
Go update it on GitHub.

Could you pm me a compiled version for Linux,my scripter fried his CPU lol

Thanks ;D

Slice 19/07/2015 03:06 PM

Re: SKY - Slice's fork of kurta999's fork of YSF
 
Try this one http://server.ulclan.com/SKY.so

Ha$H_Sexyboy 19/07/2015 03:38 PM

Re: SKY - Slice's fork of kurta999's fork of YSF
 
Quote:

Originally Posted by Slice (Post 3525534)

Much appreciated brudda,and btw i was using the 0.3.7 version i downgraded to 0.3.7 but the no dmg bug still occurs what is causing it,i've seen it a couple of times on wargrounds too

Slice 19/07/2015 04:36 PM

Re: SKY - Slice's fork of kurta999's fork of YSF
 
Probably a SetPlayerTeam issue. Can you knife eachother, or do you get respawned?

Ha$H_Sexyboy 19/07/2015 05:13 PM

Re: SKY - Slice's fork of kurta999's fork of YSF
 
Shooting with MP5 seems to fix it

Ha$H_Sexyboy 19/07/2015 05:33 PM

Re: SKY - Slice's fork of kurta999's fork of YSF
 
i'll test the knife thingy and reply

Ha$H_Sexyboy 19/07/2015 10:19 PM

Re: SKY - Slice's fork of kurta999's fork of YSF
 
We have come to a very weird conclusion , when i join to another server using SKY and i log back into my server i cannot damage anyone but they can damage me,we tested the same stuff with more than 3 people all couldn't damage others after joining other servers who is using SKY ,specifically sfr

Slice 20/07/2015 09:15 AM

Re: SKY - Slice's fork of kurta999's fork of YSF
 
Enable debugging. Also log all SetPlayerTeam, and the return value in OnPlayerDamage. Also enable crashdetect to see if it fails somewhere.

Cypress 20/07/2015 12:04 PM

Re: SKY - Slice's fork of kurta999's fork of YSF
 
Quote:

Originally Posted by Slice (Post 3526403)
Enable debugging. Also log all SetPlayerTeam, and the return value in OnPlayerDamage. Also enable crashdetect to see if it fails somewhere.

I've printed all the SetPlayerTeam's out. It sets all teams correctly.

Once strange thing however is this, when you can't damage someone it keeps printing this in logs with different bodyparts, this is just one line.

Code:

[12:51:09] (wc:2) OnPlayerGiveDamage(2 gave 9.900000 to 1 using 30 on bodypart 6)
[12:51:09] (wc:2) WARN: last shot not valid

Shooting at a team mate does not return any warning, which gives me a conclusion that it has to do with something else if I'm right.

EDIT:

Weapons such as knife, fist are giving the damage, other weapons do not. This happens when you disconnect and then reconnect to the server.

Disabled all SetPlayerTeam calls, removed everything form callbacks that are called when you fire, give or take damage.

Ha$H_Sexyboy 20/07/2015 06:58 PM

Re: SKY - Slice's fork of kurta999's fork of YSF
 
After looking into it we found out not only server with SKY causes this bug i joined a random server and logged back into mine shot at someone i couldn't damage him and says the exact same warn that Cypress mentioned above,however when he pauses it gets fixed after around 30 secs


Edit : Seems like it was a problem with our GM tested it with Bare script and it doesn't happen but we cannot find anything wrong with the gm..

Edit : I was being a noob earlier,it doesn't have anything to do with joining other server if you just relog it'll occur.

Edit : Fixed,all this we did for nothing mate we had anti bullet crasher for some reason it was conflicting with SKY.

Anyways thanks for your time Slice and keep up the good work ;D

ExTaZZ69 07/08/2015 12:13 PM

Re: SKY - Slice's fork of kurta999's fork of YSF
 
Can anyone compile this for R2-1?

Fungi 24/08/2015 11:16 AM

Re: SKY - Slice's fork of kurta999's fork of YSF
 
Quote:

Originally Posted by ExTaZZ69 (Post 3544475)
Can anyone compile this for R2-1?

bump
i need this compiled for R2-1 too (.dll)

Variable™ 24/08/2015 01:37 PM

Re: SKY - Slice's fork of kurta999's fork of YSF
 
Nice o.o
+REP

Arastair 24/08/2015 01:40 PM

Re: SKY - Slice's fork of kurta999's fork of YSF
 
Quote:

Originally Posted by ExTaZZ69 (Post 3544475)
Can anyone compile this for R2-1?

Why don't you do it yourself

Fungi 24/08/2015 02:09 PM

Re: SKY - Slice's fork of kurta999's fork of YSF
 
Quote:

Originally Posted by Arastair (Post 3559114)
Why don't you do it yourself

i dont have the required apps to do so. Installing visual studio takes time.
do i really have to install it just to get a .dll file :confused:
thanks anyway

Crayder 24/08/2015 02:17 PM

Re: SKY - Slice's fork of kurta999's fork of YSF
 
Quote:

Originally Posted by Fungi (Post 3559128)
i dont have the required apps to do so. Installing visual studio takes time.
do i really have to install it just to get a .dll file :confused:
thanks anyway

Are you really that lazy?

Abagail 24/08/2015 02:31 PM

Re: SKY - Slice's fork of kurta999's fork of YSF
 
I compiled this one a bit back, not sure if it's for R2 or not, https://evanabagail.net/files/SKY.dll

I have also compiled it again, this one should work fine: https://evanabagail.net/files/compile/YSF.dll

Fungi 24/08/2015 02:41 PM

Re: SKY - Slice's fork of kurta999's fork of YSF
 
Quote:

Originally Posted by Abagail (Post 3559159)
I have also compiled it again, this one should work fine: https://evanabagail.net/files/compile/YSF.dll

this link does not work

Abagail 24/08/2015 03:14 PM

Re: SKY - Slice's fork of kurta999's fork of YSF
 
I don't know why I put YSF.dll, the correct file name is SKY.dll,
https://evanabagail.net/files/compile/SKY.dll


All times are GMT. The time now is 06:23 PM.

Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.