@@ -50,7 +50,7 @@ function argsToMTA(amx, prototype, ...)
5050 val = amx .dbresults [val ]
5151 elseif vartype == ' a' then -- 3D text label
5252 val = amx .textlabels [val ]
53- elseif vartype == ' y' then
53+ elseif vartype == ' y' then -- Actor
5454 val = g_Actors [val ] and g_Actors [val ].elem
5555 end
5656 if val == nil then
@@ -2917,6 +2917,13 @@ function AttachCameraToObject(amx, player, object)
29172917 clientCall (player , ' AttachCameraToObject' , object )
29182918end
29192919
2920+ -- Security
2921+
2922+ function SHA256_PassHash (amx , pass , salt , ret_hash , ret_hash_len )
2923+ local secret = hash ( ' sha256' , salt .. ' ' .. pass )
2924+ writeMemString (amx , ret_hash , string.upper (secret ) )
2925+ end
2926+
29202927---- -------------------------------------------------
29212928-- List of the functions and their argument types
29222929
@@ -3492,5 +3499,8 @@ g_SAMPSyscallPrototypes = {
34923499 SetActorHealth = {' y' , ' f' },
34933500 SetActorInvulnerable = {},
34943501 SetActorPos = {' y' , ' f' , ' f' , ' f' },
3495- SetActorVirtualWorld = {' y' , ' i' }
3502+ SetActorVirtualWorld = {' y' , ' i' },
3503+
3504+ -- security
3505+ SHA256_PassHash = {' s' , ' s' , ' r' , ' r' }
34963506}
0 commit comments