Skip to content

New notify functions #40

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jun 16, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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