SA-MP 0.3.7 R2-1 server update
#61

There seems to be a bug with SHA256_PassHash and too long strings:
This code
pawn Код:
new ret_hash[65];
    SHA256_PassHash("1234567890abcdefgh1234567890", "", ret_hash, sizeof(ret_hash));
    printf("IS    : %s", ret_hash);
    printf("SHOULD: %s", "02AB0B351B726947624D09D4E0E977B3C59B2D1CAE127B314DB75C7FB95A05D3");
    SHA256_PassHash("1234567890abcdefgh", "1234567890", ret_hash, sizeof(ret_hash));
    printf("IS    : %s", ret_hash);
    printf("SHOULD: %s", "02AB0B351B726947624D09D4E0E977B3C59B2D1CAE127B314DB75C7FB95A05D3");
    SHA256_PassHash("1234567890abcdefgh1234567890abcdefgh", "", ret_hash, sizeof(ret_hash));
    printf("IS    : %s", ret_hash);
    printf("SHOULD: %s", "88F28A457C964A9FB3A3DC364B4973A3A5F54786CC4D519A58BABB30A9FFE808");
    SHA256_PassHash("1234567890abcdefgh", "1234567890abcdefgh", ret_hash, sizeof(ret_hash));
    printf("IS    : %s", ret_hash);
    printf("SHOULD: %s", "88F28A457C964A9FB3A3DC364B4973A3A5F54786CC4D519A58BABB30A9FFE808");
outputs this
Код:
IS    : 02AB0B351B726947624D09D4E0E977B3C59B2D1CAE127B314DB75C7FB95A05D3
SHOULD: 02AB0B351B726947624D09D4E0E977B3C59B2D1CAE127B314DB75C7FB95A05D3
IS    : 02AB0B351B726947624D09D4E0E977B3C59B2D1CAE127B314DB75C7FB95A05D3
SHOULD: 02AB0B351B726947624D09D4E0E977B3C59B2D1CAE127B314DB75C7FB95A05D3
IS    : DE33E4115A41CDB51CC0E051CB6E31C01F6CE87D1FB95D007F1464ADB8C5547A
SHOULD: 88F28A457C964A9FB3A3DC364B4973A3A5F54786CC4D519A58BABB30A9FFE808
IS    : DE33E4115A41CDB51CC0E051CB6E31C01F6CE87D1FB95D007F1464ADB8C5547A
SHOULD: 88F28A457C964A9FB3A3DC364B4973A3A5F54786CC4D519A58BABB30A9FFE808
Reply
#62

good job!
Reply
#63

Quote:
Originally Posted by Slice
Посмотреть сообщение
Null values still cause crashes instead of simply empty strings.
This should be fixed in the R2-1 server.

Quote:
Originally Posted by Hris
Посмотреть сообщение
There seems to be a bug with SHA256_PassHash and too long strings:
Indeed. I confirmed there was a problem with the SHA256 implementation. It should be fixed in the R2-1 server.

Quote:
Originally Posted by Admigo
Посмотреть сообщение
I am happy with any updates that Kalcor releases but you are right. There should be more focus on fixing bugs .. []
SA-MP will never be completely bug and glitch free. It's a multiplayer mod written for a game not designed for multiplayer and with no source code/modding tools available. The only way I could make it completely bug free would be to concentrate on a narrow set of features. There are a lot of different things people want to do with San Andreas so I just try to add stuff and keep refining it. If it's something that doesn't cause the game or server to crash and burn it gets a lower priority from me.
Reply
#64

Thanks for the fix of the SHA256 Kalcor.
Reply
#65

Quote:
Originally Posted by Kalcor
Посмотреть сообщение
This should be fixed in the R2-1 server.



Indeed. I confirmed there was a problem with the SHA256 implementation. It should be fixed in the R2-1 server.



SA-MP will never be completely bug and glitch free. It's a multiplayer mod written for a game not designed for multiplayer and with no source code/modding tools available. The only way I could make it completely bug free would be to concentrate on a narrow set of features. There are a lot of different things people want to do with San Andreas so I just try to add stuff and keep refining it. If it's something that doesn't cause the game or server to crash and burn it gets a lower priority from me.
"- Adds protection against hackers who spam OnPlayerConnect messages."

Didn't work on my server.

Any help ?
Reply
#66

Quote:
Originally Posted by Glossy42O
Посмотреть сообщение
"- Adds protection against hackers who spam OnPlayerConnect messages."

Didn't work on my server.

Any help ?
See http://forum.sa-mp.com/showpost.php?...9&postcount=48
Reply
#67

I'm glad to see even more fixes. Thank you so much SA:MP team!
Reply
#68

Great updates!
Reply
#69

Seems good,Thanks for your great work.

Regards,
maxQ
Reply
#70

Quote:
Originally Posted by Kalcor
Посмотреть сообщение
This should be fixed in the R2-1 server.



Indeed. I confirmed there was a problem with the SHA256 implementation. It should be fixed in the R2-1 server.



SA-MP will never be completely bug and glitch free. It's a multiplayer mod written for a game not designed for multiplayer and with no source code/modding tools available. The only way I could make it completely bug free would be to concentrate on a narrow set of features. There are a lot of different things people want to do with San Andreas so I just try to add stuff and keep refining it. If it's something that doesn't cause the game or server to crash and burn it gets a lower priority from me.
I think you are right. Its great you fixed those bugs that quickly. I like the way you think to have new features.
I can't wait to see more updates. Keep up the good work Kalcor and team.
Reply
#71

EDIT: I was confused, i thought that the function return the number of SVars created.

Quote:
Thanks for update but there is one problem still existing with SVars .

Code in 0.3.7 R2-1:
PHP код:
    new vName[16];
    
printf("start %i"GetSVarsUpperIndex());
    
printf("------------------------------");
    for(new 
1<= 9i++)
    {
        
format(vName,16,"var%i"i);
        
SetSVarInt(vName999);
        
printf("%i,%s"GetSVarsUpperIndex(), vName);
    }
    
printf("------------------------------");
    for(new 
1<= 9i++)
    {
        
format(vName,16,"var%i"i);
        
DeleteSVar(vName);
        
printf("%i,%s"GetSVarsUpperIndex(), vName);
    }
    
printf("------------------------------");
    
printf("end %i"GetSVarsUpperIndex()); 
results:
Код:
[10:51:03] start 0
[10:51:03] ------------------------------
[10:51:03] 1,var1
[10:51:03] 2,var2
[10:51:03] 3,var3
[10:51:03] 4,var4
[10:51:03] 5,var5
[10:51:03] 6,var6
[10:51:03] 7,var7
[10:51:03] 8,var8
[10:51:03] 9,var9
[10:51:03] ------------------------------
[10:51:03] 9,var1
[10:51:03] 9,var2
[10:51:03] 9,var3
[10:51:03] 9,var4
[10:51:03] 9,var5
[10:51:03] 9,var6
[10:51:03] 9,var7
[10:51:03] 9,var8
[10:51:03] 0,var9
[10:51:03] ------------------------------
[10:51:03] end 0
The Server Variables are not deleted until end.
What do you think?

Reply
#72

Nice
Reply
#73

Quote:
Originally Posted by Miguel_Leopold
Посмотреть сообщение
The Server Variables are not deleted until end.
What do you think?
You are deleting them from bottom to top, test that again but delete vars from top to bottom if you want to get lower upper index.

pawn Код:
new vName[16];
    printf("start %i", GetSVarsUpperIndex());
    printf("------------------------------");
    for(new i = 1; i <= 9; i++)
    {
        format(vName,16,"var%i", i);
        SetSVarInt(vName, 999);
        printf("%i,%s", GetSVarsUpperIndex(), vName);
    }
    printf("------------------------------");
    for(new i = 9; i  > 0; i--)
    {
        format(vName,16,"var%i", i);
        DeleteSVar(vName);
        printf("%i,%s", GetSVarsUpperIndex(), vName);
    }
    printf("------------------------------");
    printf("end %i", GetSVarsUpperIndex());
Reply
#74

Quote:
Originally Posted by Dragony92
Посмотреть сообщение
You are deleting them from bottom to top, test that again but delete vars from top to bottom if you want to get lower upper index.
You're right!
I was confused, i thought that the function return the number of SVars created.
Thank you.
Reply
#75

Nice update, thanks.
Reply
#76

where i can got the 0.3.7 1000p guys ?
Reply
#77

From 0.3.7 there are only 1000p servers.

Quote:
Originally Posted by Kalcor
Посмотреть сообщение
- The server will only come in a 1000 player variation from now on since there should be no performance difference between a 500 player server and 1000 player server. If you have existing script loops bound to MAX_PLAYERS or MAX_VEHICLES you should consider rewriting these loops to use GetPlayerPoolSize()/GetVehiclePoolSize(). Alternatively, redefine MAX_PLAYERS lower in your script or by editing the SA-MP pawn includes.

Example:
pawn Код:
// Old code
for(new x=0; x < MAX_PLAYERS; x++) {
    if(IsPlayerConnected(x)) { // do stuff with a player id
    }
}

// New code
new HighestPlayerId = GetPlayerPoolSize();
for(new x=0; x <= HighestPlayerId; x++) { // (note the condition change from < to <=)
    if(IsPlayerConnected(x)) { // do stuff with a player id
    }
}
Reply
#78

Skins ID 165 and 166 lost their sunglasses
http://i.imgur.com/jUu1pAF.jpg

https://sampwiki.blast.hk/wiki/Skins:Public
The first two skins in this page (wmomib and bmymib)


I feel it's undocumented. I only noticed this change a couple of days ago.
Did this change in 0.3.7 or in previous releases? I don't remember this being addressed.

Are there any more changes like this? It would be nice to know. Thanks
I mean it's a nice change, I'm grateful.
Reply
#79

Very Nice Update...
Reply
#80

Quote:
Originally Posted by AdamsLT
Посмотреть сообщение
Skins ID 165 and 166 lost their sunglasses
http://i.imgur.com/jUu1pAF.jpg

https://sampwiki.blast.hk/wiki/Skins:Public
The first two skins in this page (wmomib and bmymib)


I feel it's undocumented. I only noticed this change a couple of days ago.
Did this change in 0.3.7 or in previous releases? I don't remember this being addressed.

Are there any more changes like this? It would be nice to know. Thanks
I mean it's a nice change, I'm grateful.
Indeed, nice new update, but why isn't this documented? Also there are some inconsistent spaces in the SAMP.ide file for the new 0.3.7 skins, please "fix" that. This is what I mean, why not just a single space as it is in the whole file:
Код:
... 9,9, PED_TYPE_EMG,VOICE_EMG_LAPD1 ,VOICE_EMG_LAPD8
Reply


Forum Jump:


Users browsing this thread: 4 Guest(s)