@@ -50,7 +50,7 @@ function argsToMTA(amx, prototype, ...)
50
50
val = amx .dbresults [val ]
51
51
elseif vartype == ' a' then -- 3D text label
52
52
val = amx .textlabels [val ]
53
- elseif vartype == ' y' then
53
+ elseif vartype == ' y' then -- Actor
54
54
val = g_Actors [val ] and g_Actors [val ].elem
55
55
end
56
56
if val == nil then
@@ -2917,6 +2917,13 @@ function AttachCameraToObject(amx, player, object)
2917
2917
clientCall (player , ' AttachCameraToObject' , object )
2918
2918
end
2919
2919
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
+
2920
2927
---- -------------------------------------------------
2921
2928
-- List of the functions and their argument types
2922
2929
@@ -3492,5 +3499,8 @@ g_SAMPSyscallPrototypes = {
3492
3499
SetActorHealth = {' y' , ' f' },
3493
3500
SetActorInvulnerable = {},
3494
3501
SetActorPos = {' y' , ' f' , ' f' , ' f' },
3495
- SetActorVirtualWorld = {' y' , ' i' }
3502
+ SetActorVirtualWorld = {' y' , ' i' },
3503
+
3504
+ -- security
3505
+ SHA256_PassHash = {' s' , ' s' , ' r' , ' r' }
3496
3506
}
0 commit comments