SA-MP Forums Archive
[Plugin] YSF - kurta999's version - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Plugin Development (https://sampforum.blast.hk/forumdisplay.php?fid=18)
+--- Thread: [Plugin] YSF - kurta999's version (/showthread.php?tid=513499)



Re: YSF - kurta999's version - kurta999 - 25.01.2017

Quote:
Originally Posted by Hansrutger
Посмотреть сообщение
Sorry man I didn't see until yesterday, about your post, I wish there was a notification system when you quote someone lol.

I got crashdetect and ran it like I used to to crash and I got the following when calling GameModeExit().
Код:
[17:56:51] (CMD) James Hampton (0): /restart
[17:56:52] [debug] Server crashed due to an unknown error
[17:56:52] [debug] Native backtrace:
[17:56:52] [debug] #0 76f0b51c in ?? () from C:\Windows\SYSTEM32\ntdll.dll
[17:56:52] [debug] #1 76f0b4a9 in ?? () from C:\Windows\SYSTEM32\ntdll.dll
[17:56:52] [debug] #2 00498e11 in ?? () from samp-server.exe
[17:56:52] [debug] #3 0049705c in ?? () from samp-server.exe
[17:56:52] [debug] #4 004656f9 in ?? () from samp-server.exe
[17:56:52] [debug] #5 0046583d in ?? () from samp-server.exe
[17:56:52] [debug] #6 0048f4d5 in ?? () from samp-server.exe
[17:56:52] [debug] Registers:
[17:56:52] [debug] EAX: 88002600 EBX: 00746db0 ECX: 02360000 EDX: 00746db0
[17:56:52] [debug] ESI: 000010b0 EDI: 656e6e6f EBP: 00000000 ESP: 0019fd00
[17:56:52] [debug] EIP: 0048f4d5 EFLAGS: 00010206
[17:56:52] [debug] Stack:
[17:56:52] [debug] ESP+00000000: 768b6820 768b67d0 00000000 00000000
[17:56:52] [debug] ESP+00000020: 00000000 00000000 00000000 00000000
[17:56:52] [debug] ESP+00000040: 00000000 00000000 02368e50 02ae6020
[17:56:52] [debug] ESP+00000060: 0019fe1c 0fc82db3 0019fdec 257384a2
[17:56:52] [debug] ESP+00000080: 00000000 00000000 00000000 00000000
[17:56:52] [debug] ESP+000000a0: 00000000 00000000 00000000 00000000
[17:56:52] [debug] ESP+000000c0: 00000000 00000000 00000000 00000000
[17:56:52] [debug] ESP+000000e0: 00000000 02ae6020 00000000 00000000
[17:56:52] [debug] ESP+00000100: 02368e50 023697d0 004ab02b 257384a2
[17:56:52] [debug] ESP+00000120: 0019fe9c 004ab24b 00000000 0048d4ef
[17:56:52] [debug] ESP+00000140: 0001401c 00010101 00000032 00001e61
[17:56:52] [debug] ESP+00000160: 65646f6d 00003531 004c4020 004c401c
[17:56:52] [debug] ESP+00000180: 0019ff70 0049d208 004ba2f8 ffffffff
[17:56:52] [debug] ESP+000001a0: 004ab0e1 ffffffff 0049cca6 00000001
[17:56:52] [debug] ESP+000001c0: 00000002 000023f0 00000002 00000000
[17:56:52] [debug] ESP+000001e0: 00000000 00000000 00000000 00000000
[17:56:52] [debug] ESP+00000200: 00000000 00000000 00000000 00000000
[17:56:52] [debug] ESP+00000220: 00000000 00000000 00000000 00000000
[17:56:52] [debug] ESP+00000240: 00000000 00000000 0049cb52 0049cb3a
[17:56:52] [debug] ESP+00000260: c0000005 00000000 0019feb8 0019f66c
[17:56:52] [debug] ESP+00000280: 0019ff94 768a38f4 0022e000 768a38d0
[17:56:52] [debug] ESP+000002a0: e40cc187 00000000 00000000 0022e000
[17:56:52] [debug] ESP+000002c0: e40cc187 0019ffa0 00000000 0019ffe4
[17:56:52] [debug] ESP+000002e0: 76f35dae ffffffff 76f5b7b6 00000000
[17:56:52] [debug] ESP+00000300: 78746341 00000020 00000001 000032e0
[17:56:52] [debug] ESP+00000320: 00000014 00000001 00000007 00000034
[17:56:52] [debug] ESP+00000340: 00000000 00000000 00000000 00000002
[17:56:52] [debug] ESP+00000360: 00000254 00000000 f33271ba 00000534
[17:56:52] [debug] ESP+00000380: 2d59495b 000008b8 00000032 000008ec
[17:56:52] [debug] ESP+000003a0: 00000042 00000c2c 00000324 00000000
[17:56:52] [debug] ESP+000003c0: 00000356 00000000 b1280544 00001308
[17:56:52] [debug] ESP+000003e0: 00000009 000000ec 00000002 00000001
[17:56:52] [debug] Loaded modules:
[17:56:52] [debug] 00400000 - 00519000 samp-server.exe
[17:56:52] [debug] 76ed0000 - 7704b000 ntdll.dll
[17:56:52] [debug] 76890000 - 76970000 KERNEL32.DLL
[17:56:52] [debug] 743c0000 - 7453e000 KERNELBASE.dll
[17:56:52] [debug] 75070000 - 7646e000 SHELL32.dll
[17:56:52] [debug] 74630000 - 746ee000 msvcrt.dll
[17:56:52] [debug] 73d90000 - 73dc7000 cfgmgr32.dll
[17:56:52] [debug] 749c0000 - 74eba000 windows.storage.dll
[17:56:52] [debug] 76970000 - 76b2d000 combase.dll
[17:56:52] [debug] 73c20000 - 73ccd000 RPCRT4.dll
[17:56:52] [debug] 73c00000 - 73c1e000 SspiCli.dll
[17:56:52] [debug] 73bf0000 - 73bfa000 CRYPTBASE.dll
[17:56:52] [debug] 746f0000 - 74748000 bcryptPrimitives.dll
[17:56:52] [debug] 74960000 - 749a4000 sechost.dll
[17:56:52] [debug] 74330000 - 743ab000 advapi32.dll
[17:56:52] [debug] 76470000 - 764b5000 shlwapi.dll
[17:56:52] [debug] 76d30000 - 76e7f000 GDI32.dll
[17:56:52] [debug] 74ec0000 - 75007000 USER32.dll
[17:56:52] [debug] 743b0000 - 743bc000 kernel.appcore.dll
[17:56:52] [debug] 76670000 - 766fd000 shcore.dll
[17:56:52] [debug] 76b30000 - 76b74000 powrprof.dll
[17:56:52] [debug] 764c0000 - 764cf000 profapi.dll
[17:56:52] [debug] 6a4c0000 - 6a4e4000 WINMM.dll
[17:56:52] [debug] 73840000 - 73848000 WSOCK32.dll
[17:56:52] [debug] 73cd0000 - 73d2f000 WS2_32.dll
[17:56:52] [debug] 006a0000 - 006c3000 WINMMBASE.dll
[17:56:52] [debug] 741e0000 - 7420b000 IMM32.DLL
[17:56:52] [debug] 60ce0000 - 60d30000 crashdetect.DLL
[17:56:52] [debug] 779a0000 - 77a09000 MSVCP100.dll
[17:56:52] [debug] 68990000 - 68a4f000 MSVCR100.dll
[17:56:52] [debug] 10000000 - 1000c000 Whirlpool.DLL
[17:56:52] [debug] 637b0000 - 6384b000 MSVCR80.dll
[17:56:52] [debug] 58fc0000 - 5900c000 streamer.DLL
[17:56:52] [debug] 58a50000 - 58a65000 VCRUNTIME140.dll
[17:56:52] [debug] 0f3f0000 - 0f45e000 MSVCP140.dll
[17:56:52] [debug] 739f0000 - 73ad1000 ucrtbase.dll
[17:56:52] [debug] 0fc80000 - 0fcbe000 mysql.DLL
[17:56:52] [debug] 027b0000 - 028f1000 libmysql.dll
[17:56:52] [debug] 77480000 - 7756e000 MSVCR120.dll
[17:56:52] [debug] 77570000 - 775e1000 MSVCP120.dll
[17:56:52] [debug] 6ccf0000 - 6cd02000 napinsp.dll
[17:56:52] [debug] 6ccd0000 - 6cce6000 pnrpnsp.dll
[17:56:52] [debug] 6ccb0000 - 6ccc4000 NLAapi.dll
[17:56:52] [debug] 71ed0000 - 71f1f000 mswsock.dll
[17:56:52] [debug] 73370000 - 733f4000 DNSAPI.dll
[17:56:52] [debug] 749b0000 - 749b7000 NSI.dll
[17:56:52] [debug] 6cca0000 - 6ccab000 winrnr.dll
[17:56:52] [debug] 6dcc0000 - 6dcc8000 rasadhlp.dll
[17:56:52] [debug] 022a0000 - 022ad000 sscanf.DLL
[17:56:52] [debug] 0fc00000 - 0fc1b000 MapAndreas.DLL
[17:56:52] [debug] 02930000 - 029c5000 YSF.DLL
[17:56:52] [debug] 76d10000 - 76d16000 PSAPI.DLL
[17:56:52] [debug] 734a0000 - 734cf000 IPHLPAPI.DLL
[17:56:52] [debug] 6d540000 - 6d587000 fwpuclnt.dll
[17:56:52] [debug] 72fe0000 - 72ffb000 bcrypt.dll
[17:56:52] [debug] 6adb0000 - 6ae25000 uxtheme.dll
[17:56:52] [debug] 6a0f0000 - 6a131000 tv_w32.dll
[17:56:52] [debug] 74540000 - 7462b000 ole32.dll
[17:56:52] [debug] 73750000 - 73758000 VERSION.dll
[17:56:52] [debug] 70c80000 - 70d12000 COMCTL32.dll
[17:56:52] [debug] 6e8a0000 - 6e9eb000 PROPSYS.dll
[17:56:52] [debug] 74750000 - 747e5000 OLEAUT32.dll
[17:56:52] [debug] 76c80000 - 76d04000 clbcatq.dll
This is the same crash as above. Will be fixed soon!


Re: YSF - kurta999's version - kurta999 - 25.01.2017

Those crashes should be fixed in this build:


Please test it, thanks!


Re: YSF - kurta999's version - Zunno - 26.01.2017

Quote:
Originally Posted by kurta999
Посмотреть сообщение
Those crashes should be fixed in this build:


Please test it, thanks!
Hey, thx for the fix. It works good. no crashes, but i have a new problem ^^. Idk if its from this plugin or the streamer itself, but if i spawn near the attached objects with AttachDynamicObjectToObject all objects are right, but if the second player joins next to me he doesent see the objects or they floating random around, its for all players different. my second player just found a object (the object is textured with the id of the objects it is attached) and i portet me to the object which should have the attached object but i didnt seen it there... then i portet me back and all attached objects were arround me o.O then i portet from LS to LV and back and then everything was right... my 2 players did the same and everything was right.. idk what the problem is. maybe you can help me again?


Re: YSF - kurta999's version - kurta999 - 26.01.2017

Hmm.. Going to test it myself tomorrow. Thanks for advanced report. Finally would be very good to see YSF totaly stable, because in past i have made big mistakes in almost every release xD but since r17 i think its totally okey (except that shit crash what i made before in r18-2, but i hope that its really fixed now)


Re: YSF - kurta999's version - Zunno - 26.01.2017

Quote:
Originally Posted by kurta999
Посмотреть сообщение
Hmm.. Going to test it myself tomorrow. Thanks for advanced report. Finally would be very good to see YSF totaly stable, because in past i have made big mistakes in almost every release xD but since r17 i think its totally okey (except that shit crash what i made before in r18-2, but i hope that its really fixed now)
Well i just use this plugin for the AttachDynamicObjectToObject but if all the functions that are in this plugin works like they do it is a really nice plugin. I very like the Console Output to send Ingame. Nice to debug without switching between desktop and ingame bugs are ok. You are fast at replaying and trying to fix it.


Re: YSF - kurta999's version - AbyssMorgan - 28.01.2017

What is this ?
[27/01/2017 13:03:47] fakepickup 19
I think this is security element, but too little information.


Re: YSF - kurta999's version - AbyssMorgan - 29.01.2017

is possible to add
PHP код:
GetCurrentFilterScriptID();
and
CallRemoteFunctionFS(id,const function[], const format[], {Float,_}:...); 



Re: YSF - kurta999's version - kurta999 - 29.01.2017

Yes but why it would be good? Explain a bit better


Re: YSF - kurta999's version - AbyssMorgan - 29.01.2017

PHP код:
//test1.amx
new current_script GetCurrentFilterScriptID(); //1 
PHP код:
//test2.amx
new current_script GetCurrentFilterScriptID(); //2 
PHP код:
//GameMode
for(new 016i++){
    new 
fs_name[32];
    
GetFilterScriptName(i,fs_name);
    if(!
strcmp("test1",fs_name,true)){
        
CallRemoteFunctionFS(i,"blabla","d",i);  
    }

However, instead of id, better that was just the name of the script

PHP код:
CallRemoteFunctionFS(const fs_name[],const function[], const format[], {Float,_}:...);  
Example:
CallRemoteFunctionFS("test1","blabla","d",1); 
Would allow it to use a function name in a number of scripts and execute it in the selected.

PHP код:
//test1.amx
forward blabla(test){
    
printf("%d",test);
    return 
1;

PHP код:
//test2.amx
forward blabla(test){
    
printf("%d",test);
    return 
1;




Re: YSF - kurta999's version - kurta999 - 29.01.2017

Okey, its easy. I will do it. Better name would be CallFunctionInFile or something, because with this you will able to call a function in mode from fs or vice versa


Re: YSF - kurta999's version - Crayder - 30.01.2017

Quote:
Originally Posted by AbyssMorgan
Посмотреть сообщение
...
Quote:
Originally Posted by kurta999
Посмотреть сообщение
Okey, its easy. I will do it. Better name would be CallFunctionInFile or something, because with this you will able to call a function in mode from fs or vice versa
That's actually a really good idea! That could be pretty useful. Like, as useful as function states are but more explicit. We could use it to make some pretty cool stuff, like an in-depth modularized library of filterscripts.


Re: YSF - kurta999's version - benbir01 - 30.01.2017

PlayerDisabledKeysSync not work with KEY_YES and KEY_NO, because of these two keys sync in playerweapon.


Re: YSF - kurta999's version - kurta999 - 30.01.2017

In advanced?


Re: YSF - kurta999's version - benbir01 - 30.01.2017

I do not think it worked in advance.


Re: YSF - kurta999's version - kurta999 - 06.02.2017

R19 ANOTHER BETA
- Added plugins/YSF.cfg - for more info open the file
- Added ability to change RCON commands name
- Added CallFunctionInScript
- Added TextDrawSetStringForPlayer
- AttachPlayerObjectToPlayer has been rewritten from scratch, now it's more stable and use less memory
- Fixed rcon messages wasn't appearing in chat
- Fixed GetActorAnimation
- More sanity checks against crashes

Merged functions from IllidanS4's fork of YSF: https://github.com/IllidanS4/YSF - https://sampforum.blast.hk/showthread.php?tid=609499

- Merged GetSyncBounds, SetSyncBounds
- Merged GetNPCCommandLine
- Merged SetVehicleParamsSirenState, ToggleVehicleSirenEnabled, IsVehicleSirenEnabled, GetVehicleMatrix

Plus two callback has been merged:
pawn Код:
forward OnOutcomeScmEvent(playerid, issuerid, E_SCM_EVENT_TYPE:eventid, vehicleid, arg1, arg2);
forward OnServerQueryInfo(const ipaddr[], hostname[51], gamemode[31], language[31]);
Please test it, for me it works - however I would like to hear it from more people


Re: YSF - kurta999's version - IllidanS4 - 07.02.2017

Sweet! I have tested GetVehicleMatrix, SetVehicleParamsSirenState and OnOutcomeScmEvent on Windows, which work fine. SetSyncBounds doesn't seem to be working at the moment, I think the problem is this line:
Код:
CScriptParams::Get()->Read(&CAddress::VAR_pPosSyncBounds[0], &CAddress::VAR_pPosSyncBounds[1], &CAddress::VAR_pPosSyncBounds[2], &CAddress::VAR_pPosSyncBounds[3]);
I haven't yet checked how this CScriptParams class works, but from the looks of it I think it only writes the parameters at these addresses. However, these addresses are DWORD*s and contain the pointers to the actual memory locations. I think this code should be working:

Код:
CScriptParams::Get()->Read((float*)CAddress::VAR_pPosSyncBounds[0], (float*)CAddress::VAR_pPosSyncBounds[1], (float*)CAddress::VAR_pPosSyncBounds[2], (float*)CAddress::VAR_pPosSyncBounds[3]);



Re: YSF - kurta999's version - kurta999 - 07.02.2017

Omg xD this happens when you hurry


Re: YSF - kurta999's version - IllidanS4 - 07.02.2017

Also it seems GetSyncBounds, SetSyncBounds are missing from YSF.inc. Not sure about other functions.


Re: YSF - kurta999's version - kurta999 - 07.02.2017

Others are present


Re: YSF - kurta999's version - AbyssMorgan - 08.02.2017

Is possible to add?
PHP код:
SetPlayerCameraMode(playerid,mode);