Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- addCommandHandler("getcar",function(thePlayer, commandName, id)
- if getElementData(thePlayer, "adminlevel") >= 1 then
- if not (id) then
- outputChatBox("#3D7ABC[DoubleMTA]#ffffff /" .. commandName .. " #3D7ABC[ID]", thePlayer, 0, 0 ,0, true)
- else
- local theVehicle = findVehicleWhereID(tonumber(id))
- if getElementData(theVehicle, "isInUsedShop") then
- return end
- if theVehicle then
- local r = getPedRotation(thePlayer)
- local x, y, z = getElementPosition(thePlayer)
- x = x + ( ( math.cos ( math.rad ( r ) ) ) * 5 )
- y = y + ( ( math.sin ( math.rad ( r ) ) ) * 5 )
- if (getElementHealth(theVehicle)==0) then
- spawnVehicle(theVehicle, x, y, z, 0, 0, r)
- else
- setElementPosition(theVehicle, x, y, z)
- setVehicleRotation(theVehicle, 0, 0, r)
- end
- setElementInterior(theVehicle, getElementInterior(thePlayer))
- setElementDimension(theVehicle, getElementDimension(thePlayer))
- outputChatBox("#3D7ABC[DoubleMTA]#ffffff Jármû teleportálva lett a pozíciódra.", thePlayer, 0, 0, 0, true)
- exports.dm_core:sendMessageToAdmins("#ffffff (" .. getPlayerAdminTitle(thePlayer) .. ") " .. getPlayerAdminNick(thePlayer) .. " használta a#D23131 /" .. commandName .. "#ffffff parancsot", 0, 0, 0, true)
- else
- outputChatBox("#3D7ABC[DoubleMTA]#ffffff Érvénytelen jármû ID.", thePlayer, 0, 0, 0, true)
- end
- end
- end
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement