diff --git a/amx/server/syscalls.lua b/amx/server/syscalls.lua index 2dbb3fe..23a16ef 100644 --- a/amx/server/syscalls.lua +++ b/amx/server/syscalls.lua @@ -275,15 +275,15 @@ function AddVehicleComponent(amx, vehicle, upgradeID) end function AllowAdminTeleport(amx, allow) - + deprecated('AllowAdminTeleport', '0.3d') end function AllowInteriorWeapons(amx, allow) - + deprecated('AllowInteriorWeapons', '0.3d') end function AllowPlayerTeleport(amx, player, allow) - + deprecated('AllowPlayerTeleport', '0.3d') end function ApplyAnimation(amx, player, animlib, animname, fDelta, loop, lockx, locky, freeze, time, forcesync) @@ -317,16 +317,18 @@ end --Dummy for now function GetPlayerDrunkLevel(player) + notImplemented('GetPlayerDrunkLevel', 'SCM is not supported.') return 0 end function GetPlayerAnimationIndex(player) + notImplemented('GetPlayerAnimationIndex') return 0 end function EditPlayerObject(amx, player, object) --givePlayerMoney(player, amount) - outputDebugString("EditPlayerObject called") + notImplemented('EditPlayerObject') end @@ -868,6 +870,7 @@ function StopAudioStreamForPlayer(amx, player) end function EnableVehicleFriendlyFire(amx) + notImplemented('EnableVehicleFriendlyFire') return 1; end diff --git a/amx/server/util.lua b/amx/server/util.lua index 38ca524..a1714e7 100644 --- a/amx/server/util.lua +++ b/amx/server/util.lua @@ -1037,3 +1037,29 @@ function isCustomPickup(elem) end return false end + +function deprecated(native, version, additional) + if native ~= nil then + if version ~= '' or version ~= nil then + outputDebugString(native..' has been deprecated since '..version..' and will no longer be available.') + return; + end + if additional ~= '' or additional ~= nil then + outputDebugString(native..' has been deprecated since '..version..' and will no longer be available. More info: '.. additional .. '.') + return; + end + outputDebugString(native..' is deprecated and will no longer be available.') + end +end + +function notImplemented(native, additional) + if native ~= nil then + if additional == '' or additional == nil then + outputDebugString('Sorry, but '..native..' is not implemented.') + return; + else + outputDebugString('Sorry, but '..native..' is not implemented. More info: '.. additional..'.') + return; + end + end +end \ No newline at end of file