Describe the bug
using the setControlState OOP function will display in server console that the function is deprecated and needs to be replaced with setPedControlState.
To reproduce
Create a script and white a script to create a ped. Once you've created the ped, use ped:setControlState("walk",true) and save the script. Run the resource, and you will see the warning in the server console.
Expected behaviour
Due to it being an OOP function, it should not be expected for setControlState to be deprecated. Maybe the OOP function needs to be updated to the newer function in the metatable.
Screenshots

Version
Server: MTA:SA Server v1.5.6-release-16352
I think this happens because it sees setControlState and thinks it's a legacy function.
ped:setControlState(...)
^^^^^^^^^^^^^^^
A fix for this would be to check for (?<!:)setControlState.
Also function RaceBase:isPlayerDead(uPlayer) gives deprecation message (with setControlState probably aswell)
That one is unavoidable as it's a Lua script method with the same name of an inbuilt.
Wouldnt something like this work @qaisjp ?
https://regex101.com/r/xdd8a1/4
(didnt test for tabs / other characters at the beginning)
as per same function naming: What about checking whenever a function with that name will be added ? We could disable that message for that resource then
It would not be clean to compose one large regex. If RaceBase:isPlayerDead is in the current race code, the race code should be changed. This issue is related to MTA's OOP Lua API being broken by the upgrade system.
Apparently 3418ceb would fix this issue as mentioned by @StrixG. I'd like to hear from @1B0Y whether this is accurate in this issue. This commit will be available in the next nightly.
Test resource: testoop.zip
Starting resource on 18720:
[2019-07-08 13:56:02] start: Requested by Console
[2019-07-08 13:56:02] WARNING: testoop/server.lua(Line 3) [Server] isPlayerDead is deprecated and may not work in future versions. Please replace with isPedDead.
[2019-07-08 13:56:02] WARNING: testoop/client.lua(Line 2) [Client] setControlState is deprecated and may not work in future versions. Please replace with setPedControlState.
[2019-07-08 13:56:02] Some files in 'testoop' use deprecated functions.
[2019-07-08 13:56:02] Use the 'upgrade' command to perform a basic upgrade of resources.
[2019-07-08 13:56:02] Starting testoop
[2019-07-08 13:56:02] start: Resource 'testoop' started
Starting resource on 18727 (3418ceb):
[2019-07-08 13:52:49] start: Requested by Console
[2019-07-08 13:52:50] Starting testoop
[2019-07-08 13:52:50] start: Resource 'testoop' started
@patrikjuvonen based on Strix's demonstration above & OP's absence, can we close this issue?
@qaisjp Sure!
Most helpful comment
Test resource: testoop.zip
Starting resource on 18720:
Starting resource on 18727 (3418ceb):