Перетаскивания трупов
отвыкаем menu_client и ищем:
Код: [Выделить]
if arg1 == "Dead" then
startRollMessageMenu("Обыскать ("..arg2..")",255,255,255,"dead")
startRollMessageMenu("Осмотреть тело",255,255,255,"deadreason")
setElementData(localPlayer,"usedItemTrue", true)
end
и заменяем её на это
Код: [Выделить]
if arg1 == "Dead" then
startRollMessageMenu("Обыскать",255,255,255,"dead")
startRollMessageMenu("Время смерти",255,255,255,"deadreason")
startRollMessageMenu("Взять тело",255,255,255,"takebody")
setElementData(localPlayer,"usedItemTrue", true)
end
дальше ищем
Код: [Выделить]
if itemName == "deadreason" then
local col = getElementData(getLocalPlayer(),"currentCol")
outputChatBox(getElementData(col,"deadreason"),255,255,255,true)
return
end
ниже её вставляем
Код: [Выделить]
if itemName == "takebody" then
if getElementData(getLocalPlayer(),"logedin") and getElementData(getLocalPlayer(),"putted") == false then
triggerServerEvent ( "takeBodyClient", localPlayer )
setElementData(getLocalPlayer(),"putted",true)
puttedBody = true
disableMenu()
setNewbieInfo (false,"","")
end
return
end
открываем SurvivorSystem.lua
и в любое место вставляете это
Код: [Выделить]
function takeBodyClient ()
local col = getElementData(source,"currentCol")
local body = getElementData(col,"parent")
bx,by,bz = getElementRotation ( body )
if isElement ( body ) then
setControlState(source,"crouch", true)
setTimer(setControlState, 50, 1,source, "crouch", false)
if not isPedDucked(source) then
return
end
if getElementData ( col, "deadman" ) then
attachElementToBone(body,source,3,0,-0.3,0.8,90,0,0)
setElementData(source,"takeBody",body)
outputChatBox("Нажмите B(анг) чтобы бросить тело.",source,255,255,255)
end
bindKey(source,"b","down",putBody)
toggleControl (source,"crouch",false)
toggleControl (source,"jump",false)
toggleControl (source,"sprint",false)
toggleControl (source,"fire",false)
end
end
addEvent("takeBodyClient",true)
addEventHandler("takeBodyClient", getRootElement(),takeBodyClient)
Код: [Выделить]
function putBody(source)
local body = getElementData(source,"takeBody")
if isElement(body) then
local x,y,z = getElementPosition(body)
detachElementFromBone(body)
setElementRotation(body,bx,by,bz)
setElementData(source,"putted",false)
setControlState(source,"crouch", true)
setTimer(setControlState, 50, 1,source, "crouch", false)
setElementData(source,"takeBody",nil)
toggleControl (source,"crouch",true)
toggleControl (source,"jump",true)
toggleControl (source,"sprint",true)
toggleControl (source,"fire",true)
else
setElementData(source,"takeBody",nil)
toggleControl (source,"crouch",true)
toggleControl (source,"jump",true)
toggleControl (source,"sprint",true)
toggleControl (source,"fire",true)
end
end
Всё