Skip to content

Commit

Permalink
/get
Browse files Browse the repository at this point in the history
  • Loading branch information
mabako committed May 2, 2010
1 parent cd0ec40 commit d7085d3
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 0 deletions.
1 change: 1 addition & 0 deletions acl.xml
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,7 @@
<right name="command.getvehicle" access="true" />
<right name="command.gotovehicle" access="true" />
<right name="command.setskin" access="true" />
<right name="command.get" access="true" />
<right name="function.executeCommandHandler" access="true" />
<right name="function.setPlayerMuted" access="true" />
<right name="function.addAccount" access="true" />
Expand Down
20 changes: 20 additions & 0 deletions resources/admin/player.lua
Original file line number Diff line number Diff line change
Expand Up @@ -43,3 +43,23 @@ addCommandHandler( "setskin",
end,
true
)

addCommandHandler( "get",
function( player, commandName, otherPlayer )
if otherPlayer then
local other, name = exports.players:getFromName( player, otherPlayer )
if other then
-- todo: vehicle teleports
removePedFromVehicle( other )

local x, y, z = getElementPosition( player )
setElementPosition( other, x + 1, y, z )
setElementInterior( other, getElementInterior( player ) )
setElementDimension( other, getElementDimension( player ) )
end
else
outputChatBox( "Syntax: /" .. commandName .. " [player]", player, 255, 255, 255 )
end
end,
true
)

0 comments on commit d7085d3

Please sign in to comment.