Skip to content

Commit dd50399

Browse files
authored
Merge pull request #40 from Disinterpreter/develop
New notify functions
2 parents dab54d6 + 0a7cb52 commit dd50399

File tree

2 files changed

+33
-4
lines changed

2 files changed

+33
-4
lines changed

amx/server/syscalls.lua

+7-4
Original file line numberDiff line numberDiff line change
@@ -275,15 +275,15 @@ function AddVehicleComponent(amx, vehicle, upgradeID)
275275
end
276276

277277
function AllowAdminTeleport(amx, allow)
278-
278+
deprecated('AllowAdminTeleport', '0.3d')
279279
end
280280

281281
function AllowInteriorWeapons(amx, allow)
282-
282+
deprecated('AllowInteriorWeapons', '0.3d')
283283
end
284284

285285
function AllowPlayerTeleport(amx, player, allow)
286-
286+
deprecated('AllowPlayerTeleport', '0.3d')
287287
end
288288

289289
function ApplyAnimation(amx, player, animlib, animname, fDelta, loop, lockx, locky, freeze, time, forcesync)
@@ -317,16 +317,18 @@ end
317317

318318
--Dummy for now
319319
function GetPlayerDrunkLevel(player)
320+
notImplemented('GetPlayerDrunkLevel', 'SCM is not supported.')
320321
return 0
321322
end
322323

323324
function GetPlayerAnimationIndex(player)
325+
notImplemented('GetPlayerAnimationIndex')
324326
return 0
325327
end
326328

327329
function EditPlayerObject(amx, player, object)
328330
--givePlayerMoney(player, amount)
329-
outputDebugString("EditPlayerObject called")
331+
notImplemented('EditPlayerObject')
330332
end
331333

332334

@@ -868,6 +870,7 @@ function StopAudioStreamForPlayer(amx, player)
868870
end
869871

870872
function EnableVehicleFriendlyFire(amx)
873+
notImplemented('EnableVehicleFriendlyFire')
871874
return 1;
872875
end
873876

amx/server/util.lua

+26
Original file line numberDiff line numberDiff line change
@@ -1037,3 +1037,29 @@ function isCustomPickup(elem)
10371037
end
10381038
return false
10391039
end
1040+
1041+
function deprecated(native, version, additional)
1042+
if native ~= nil then
1043+
if version ~= '' or version ~= nil then
1044+
outputDebugString(native..' has been deprecated since '..version..' and will no longer be available.')
1045+
return;
1046+
end
1047+
if additional ~= '' or additional ~= nil then
1048+
outputDebugString(native..' has been deprecated since '..version..' and will no longer be available. More info: '.. additional .. '.')
1049+
return;
1050+
end
1051+
outputDebugString(native..' is deprecated and will no longer be available.')
1052+
end
1053+
end
1054+
1055+
function notImplemented(native, additional)
1056+
if native ~= nil then
1057+
if additional == '' or additional == nil then
1058+
outputDebugString('Sorry, but '..native..' is not implemented.')
1059+
return;
1060+
else
1061+
outputDebugString('Sorry, but '..native..' is not implemented. More info: '.. additional..'.')
1062+
return;
1063+
end
1064+
end
1065+
end

0 commit comments

Comments
 (0)