Skip to content

Commit

Permalink
Merge pull request #40 from Disinterpreter/develop
Browse files Browse the repository at this point in the history
New notify functions
  • Loading branch information
colistro123 authored Jun 16, 2020
2 parents dab54d6 + 0a7cb52 commit dd50399
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 4 deletions.
11 changes: 7 additions & 4 deletions amx/server/syscalls.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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


Expand Down Expand Up @@ -868,6 +870,7 @@ function StopAudioStreamForPlayer(amx, player)
end

function EnableVehicleFriendlyFire(amx)
notImplemented('EnableVehicleFriendlyFire')
return 1;
end

Expand Down
26 changes: 26 additions & 0 deletions amx/server/util.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit dd50399

Please sign in to comment.