-
Notifications
You must be signed in to change notification settings - Fork 5
Player Class
PiterMcFlebor edited this page Oct 6, 2020
·
2 revisions
local player = Player(
source -- number, the player server id, this can be -1 for self player or >0
)--
-- Getting the player position and name
--
local player = Player(-1)
print('Player name', player:GetName())
print('Player position', tostring(player:GetPosition()))local player = Player(
source -- number, the player server id
)--
-- Getting the player position and vehicle
-- then deleting the vehicle
--
local player = Player(source)
local playerPosition = player:GetPosition()
if player:IsInVehicle() then
local playerVehicle = player:GetVehicleSitting()
playerVehicle:Delete()
else
local playerVehicle = player:GetLastVehicle()
playerVehicle:Delete()
end