mirror of
https://github.com/Michatec/wk_wars2x.git
synced 2026-04-01 00:16:27 +02:00
feat: add function to get other ped's server id
This commit is contained in:
@@ -78,6 +78,18 @@ function PLY:GetOtherPed()
|
|||||||
return nil
|
return nil
|
||||||
end
|
end
|
||||||
|
|
||||||
|
function PLY:GetOtherPedServerId()
|
||||||
|
local otherPed = self:GetOtherPed()
|
||||||
|
|
||||||
|
if ( otherPed ~= nil and otherPed ~= 0 and IsPedAPlayer( otherPed ) ) then
|
||||||
|
local otherPly = GetPlayerServerId( NetworkGetPlayerIndexFromPed( otherPed ) )
|
||||||
|
|
||||||
|
return otherPly
|
||||||
|
end
|
||||||
|
|
||||||
|
return nil
|
||||||
|
end
|
||||||
|
|
||||||
-- The main purpose of this thread is to update the information about the local player, including their
|
-- The main purpose of this thread is to update the information about the local player, including their
|
||||||
-- ped id, the vehicle id (if they're in one), whether they're in a driver seat, and if the vehicle's class
|
-- ped id, the vehicle id (if they're in one), whether they're in a driver seat, and if the vehicle's class
|
||||||
-- is valid or not
|
-- is valid or not
|
||||||
|
|||||||
Reference in New Issue
Block a user