[Plugin] YSF – IS4's version
#61

Quote:
Originally Posted by sprtik
Посмотреть сообщение
New release, please try if it works.
Now it seems to work correctly, thanks!
Reply
#62

Hello, as in Cycle functions "AllowNickNameCharacter(i, true);" allow more than one character?
Reply
#63

Quote:
Originally Posted by pawnuser
Посмотреть сообщение
Hello, as in Cycle functions "AllowNickNameCharacter(i, true);" allow more than one character?
Call the function for every character you want to allow:

Код:
AllowNickNameCharacter('#', 1);
AllowNickNameCharacter(',', 1);
AllowNickNameCharacter('&', 1);

AllowNickNameCharacter('PUT_CHARACTER_HERE', 1);
// And so on
Reply
#64

Quote:
Originally Posted by Spmn
Посмотреть сообщение
Call the function for every character you want to allow:

Код:
AllowNickNameCharacter('#', 1);
AllowNickNameCharacter(',', 1);
AllowNickNameCharacter('&', 1);

AllowNickNameCharacter('PUT_CHARACTER_HERE', 1);
// And so on
And something like this can not be done?

for(new i = 'А'; i < i <= 'Я'; i++)
{
AllowNickNameCharacter(i, true);
}
for(new i = 'а'; i < i <= 'я'; i++)
{
AllowNickNameCharacter(i, true);
}
Reply
#65

Quote:
Originally Posted by pawnuser
Посмотреть сообщение
And something like this can not be done?

for(new i = 'А'; i < i <= 'Я'; i++)
{
AllowNickNameCharacter(i, true);
}
for(new i = 'а'; i < i <= 'я'; i++)
{
AllowNickNameCharacter(i, true);
}
Maybe. It depends on your codepage layout. If this block of character map represents exactly the alphabet, it would work. Still, I recommend the previous approach to ensure no incorrect characters are allowed.
Reply
#66

Quote:
Originally Posted by pawnuser
Посмотреть сообщение
And something like this can not be done?

for(new i = 'А'; i < i <= 'Я'; i++)
{
AllowNickNameCharacter(i, true);
}
for(new i = 'а'; i < i <= 'я'; i++)
{
AllowNickNameCharacter(i, true);
}
Don't forget about 'Ё'.
Reply
#67

Made just like that "new namechar[205];
format(namechar, sizeof(namechar), "!#$&()+,-.0123456789=@ABCDEFGHIJKLMNOPQRSTUVWXYZ[]_abcdefghijklmnopqrstuvwxyzЂЃ‚ѓ„…†‡€‰Љ‹ЊЌЋЏђ‘’“”•– —™љ›њќћџЎўЈ¤Ґ¦§Ё©Є«¬*®Ї°±Ііґµ¶·ё№є»јЅѕїАБВГДЕЖЗИЙК ЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмнопрстуфхцчшщъыь эюя");
for(new i = 0; i < sizeof(namechar); i++)
{
AllowNickNameCharacter(namechar[i], true);
}", everything works
Reply
#68

Quote:
Originally Posted by pawnuser
Посмотреть сообщение
Made just like that "new namechar[205];
format(namechar, sizeof(namechar), "!#$&()+,-.0123456789=@ABCDEFGHIJKLMNOPQRSTUVWXYZ[]_abcdefghijklmnopqrstuvwxyzЂЃ‚ѓ„…†‡Ђ‰Љ‹ЊЌЋЏђ‘’“”•– —™љ›њќћџЎўЈ¤Ґ¦§Ё©Є«¬*®Ї°±Ііґµ¶·ё№є»јЅѕїАБВГДЕЖЗИЙК ЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмнопрстуфхцчшщъыь эюя");
for(new i = 0; i < sizeof(namechar); i++)
{
AllowNickNameCharacter(namechar[i], true);
}", everything works
It's nonsense to use format.
Код:
new namechar[] = "!#$&()+,-.0123456789=@ABCDEFGHIJKLMNOPQRSTUVWXYZ[]_abcdefghijklmnopqrstuvwxyzЂЃ‚ѓ„…†‡Ђ‰Љ‹ЊЌЋЏђ‘’“”•–—™љ›њќћџЎўЈ¤Ґ¦§Ё©Є«¬*®Ї°±Ііґµ¶·ё№є»јЅѕїАБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмнопрстуфхцчшщъыьэюя";
for(new i = 0; i < sizeof(namechar); i++)
{
    AllowNickNameCharacter(namechar[i], true);
}
And don't put numbers and A-Za-z there, they are already allowed.
Reply
#69

Is it possible to have something like
pawn Код:
native GetLastReceived/SentRPC( playerid, array[ ][ ], maxrpc = sizeof array, maxlength = sizeof array[ ] );
native GetLastReceived/SentPackets( playerid, array[ ][ ], maxpackets = sizeof array, maxlength = sizeof array[ ] )
? I don't really have idea how they are structured.

This:
pawn Код:
new array[ 1 ][ 128 ];
GetLastReceivedRPC( playerid, array );
Should return something like (as much details as possible, also with the meaning of all values):
Quote:

array[ 0 ] - "RPC_17(RPC_ScrSetPlayerWorldBounds): -50.0, -50.0, 50.0, 50.0"

last RPCs should be at the beggining of the array.

If this would use too many resources, there should be two functions like
pawn Код:
native EnableRPCLogging( bool:toggle );
native EnablePacketsLogging( bool:toggle );
which should be 0 by default.

Basically, what I want is a server-sided RakLogger+ : https://github.com/THE-FYP/rakloggerplus (you can see more in the source).

--------

How could this help anyone ? More internal debugging (could see why players timeout, or why they use a big bandwidth, etc.) ! Maybe you saw this topic: https://sampforum.blast.hk/showthread.php?tid=591057 . If not, read it a bit and you'll understand. I want to log the last 10-20 received packets and RPCs at OnPlayerDisconnect if they timeout. I guess that it may be an exploit and I wonder if they receive any custom RPCs/Packets.



EDIT: Maybe this could help you more: https://sampforum.blast.hk/showthread.php?tid=570188 .
Reply
#70

To do a RPC logger, you need to examinate ALL RPCs in order to create a list of parameters for each RPC. RakLogger uses a similar list, but it contains only a few RPCs.

I guess this update is about timeouts you experience on your server. If so, you only need to log sync packets and (some, not all) RPCs received from clients because these are then forwarded to other players, like: Death, Spawn, SCMEvent, World*, Player* etc.

Packet logger is easily doable since you can find everything you need in hooks.cpp and structs.h
Reply
#71

[12:03:38] [debug] #4 b742fadc in ?? () from plugins/crashdetect.so
[12:03:38] [debug] #5 b770e40c in ?? ()
[12:03:38] [debug] #6 b7572204 in ?? () from /lib/i386-linux-gnu/i686/cmov/libc.so.6
[12:03:38] [debug] #7 b741ec30 in _ZN12AMXCallStack3PopEv () from plugins/crashdetect.so
[12:03:38] [debug] #8 b742ac51 in _ZN11CrashDetect9DoAmxExecEPii () from plugins/crashdetect.so
[12:03:38] [debug] #9 b742e659 in ?? () from plugins/crashdetect.so
[12:03:38] [debug] #10 b5f82d36 in ?? () from plugins/streamer.so
[12:03:38] [debug] #11 b569fc2b in ?? () from plugins/YSF.so
[12:03:38] [debug] #12 b567bca1 in amx_Exec () from plugins/YSF.so
[12:03:38] [debug] #13 b567e3c2 in _ZN16CCallbackManager29OnPlayerStatsAndWeaponsUpda teEt () from plugins/YSF.so
[12:03:38] [debug] #14 b5687379 in _ZN14CHookRakServer7ReceiveEPv () from plugins/YSF.so
[12:03:38] [debug] #15 080aed3d in ?? () from ./sampsvr-port_2018
[12:03:38] [debug] #16 080aef02 in ?? () from ./sampsvr-port_2018
[12:03:38] [debug] #17 080aa13a in ?? () from ./sampsvr-port_2018
[12:03:38] [debug] #18 b746ae46 in __libc_start_main () from /lib/i386-linux-gnu/i686/cmov/libc.so.6
[12:03:38] [debug] #19 0804b4e1 in ?? () from ./sampsvr-port_2018
Reply
#72

There's currently a weird bug with vehicle or player updates when YSF is used (Yes , I tested it, it's definitely caused by YSF)

Players health and armor are constantly jumping from 0 to 100 and between (not for the player himself) , same goes for the vehicle health, it goes up to 32k and constantly changes

http://i.epvpimg.com/7o8gd.jpg

https://www.youtube.com/watch?v=6VwpOQXdbOo

I somehow managed it to always reproduce it with a Dumper when playing around with numpad 2 or 8 (It's not instantly so do it a little bit longer)
Reply
#73

Exactly, I have also observed this effect. I guess the rebuild function has some issues.
Reply
#74

Dumper, hydra, etc.
Reply
#75

Quote:
Originally Posted by AbyssMorgan
Посмотреть сообщение
Dumper, hydra, etc.
So it has to be something due to misc update (packers second floor, hydras trusters, you get it...)
Reply
#76

Quote:
Originally Posted by DRIFT_HUNTER
Посмотреть сообщение
So it has to be something due to misc update (packers second floor, hydras trusters, you get it...)
It once happend while I was in the Ambulance car as you can see here http://i.epvpimg.com/7o8gd.jpg
Reply
#77

Edit: Problem solved, was my fault.
Reply
#78

It might have nothing to do with YSF, but with the way server manages same nicknames connections. You (also) get that message when a player with your name is already connected on the server.

For example, let's say you play with the name NICK and you lose connection to the server. Client will try to auto-reconnect. If you get connected in less than 'playertimeout' ms (default: 10 000) then you will get automatically kicked and that message will be printed in chat because the server wouldn't have kicked you by that time.
Reply
#79

I found animation bug:
https://www.youtube.com/watch?v=xvU4_EbkpcI

Used functions:
PHP код:
ShowPlayerForPlayer(forplayeridplayerid);
HidePlayerForPlayer(forplayeridplayerid);

SetPlayerSkinForPlayer(playeridskinplayeridskin); 
Reply
#80

So I am getting confused here.
I was running SKY with YSF on top. I'M not even sure I should do that.
I use SKY because of the 'weapon-config.inc' and I use YSF because of the streamer plugin.
Is this gonna rap them all in one? How can I use all of them and be stable, is it possible?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)