#1WallSex Set 12, 2014 12:11 pm
Wall
Moderador
Para Começar Abra seu inventory.lua e procure por:
["Items"] = {
Agora coloque isto embaixo :
{"Mascara",1,"Usar"},
Depois procure por:
if itemName == "Blood Bag" then
return
end
Abaixo adicione :
if itemName == "Mascara" and getElementData ( localPlayer, "helmetOn" ) then
itemInfo = "Remover"
end
Depois procure por :
function playerUseItem(itemName,itemInfo)
E adicione isto :
elseif itemInfo == "Mascara" then
setElementData ( localPlayer, "helmetOn", true )
elseif itemInfo == "Remover" then
setElementData ( localPlayer, "helmetOn", false )
Agora abra o login.lua e procure por :
local playerDataTable = {
E adicione isto :
{"Mascara"},
Agora procure por :
local vehicleDataTable = {
E adicione isto :
{"Mascara"},
Agora abra o pickups.lua e procure por:
["military"] = {
E adicione isto embaixo:
{"Mascara",902,1,0,0.3},
Procure por :
["other"] = {
E adicione isto embaixo:
{"Mascara",902,1,0,0.3},
Agora abra o spawn.lua e procure por:
local playerDataTable = {
E adicione isto:
{"Mascara"},
Procure por:
local vehicleDataTable = {
E adicione isto:
{"Mascara"},
Agora Abra o survivorsystem.lua:
Procure por :
local vehicleDataTableForTent = {
E adicione isto :
{"Mascara"},
Agora procure por isto :
local elementBackpack = {}
function backPackBack (dataName,oldValue)
if getElementType(source) == "player" and dataName =="MAX_Slots" then
local newValue = getElementData(source,dataName)
if elementBackpack[source] then
detachElementFromBone(elementBackpack[source])
destroyElement(elementBackpack[source])
elementBackpack[source] = false
end
local x,y,z = getElementPosition(source)
local rx,ry,rz = getElementRotation(source)
if newValue == 12 then
elementBackpack[source] = createObject(3026,x,y,z)
elseif newValue == 16 then
elementBackpack[source] = createObject(1248,x,y,z)
elseif newValue == 26 then
elementBackpack[source] = createObject(1575,x,y,z)
elseif newValue == 36 then
elementBackpack[source] = createObject(1252,x,y,z)
elseif newValue == 52 then
elementBackpack[source] = createObject(2405,x,y,z)
elseif newValue == 8 then
return
end
if newValue == 26 then
attachElementToBone(elementBackpack[source],source,3,0,-0.16,0.05,270,0,180)
else
attachElementToBone(elementBackpack[source],source,3,0,-0.225,0.05,90,0,0)
end
end
if getElementType(source) == "player" and dataName == "helmetOn" then
if getElementData ( source, dataName ) then
local x, y, z = getElementPosition(source)
local helmet = createObject(902, x, y, z)
setElementData ( source, "helmetObject", helmet )
local skin = getElementModel ( source )
if skin == 16 then
attachElementToBone(helmet, source, 1, 0, 0.02, -0.53, 0, 0, 90)
elseif skin == 287 then
attachElementToBone(helmet, source, 1, 0, 0.01, -0.56, 0, 0, 90)
elseif skin == 18 then
attachElementToBone(helmet, source, 1, 0.015, 0.025, -0.54, 0, 0, 90)
elseif skin == 23 then
attachElementToBone(helmet, source, 1, 0, 0.015, -0.574, 0, 0, 90)
elseif skin == 24 then
attachElementToBone(helmet, source, 1, 0, 0.015, -0.575, 0, 0, 90)
elseif skin == 1 then
attachElementToBone(helmet, source, 1, 0, 0.015, -0.545, 0, 0, 90)
elseif skin == 2 then
attachElementToBone(helmet, source, 1, 0.015, 0.025, -0.59, 0, 0, 90)
else
attachElementToBone(helmet, source, 1, 0, 0.015, -115, 0, 0, 90)
end
else
if isElement ( getElementData ( source, "helmetObject" ) ) then
detachElementFromBone( getElementData ( source, "helmetObject" ) )
destroyElement ( getElementData ( source, "helmetObject" ) )
setElementData ( source, "helmetObject", false )
end
end
end
end
addEventHandler ( "onElementDataChange", getRootElement(), backPackBack )
E Subistitua o Por :
local elementBackpack = {}
function backPackBack (dataName,oldValue)
if getElementType(source) == "player" and dataName =="MAX_Slots" then
local newValue = getElementData(source,dataName)
if elementBackpack[source] then
detachElementFromBone(elementBackpack[source])
destroyElement(elementBackpack[source])
elementBackpack[source] = false
end
local x,y,z = getElementPosition(source)
local rx,ry,rz = getElementRotation(source)
if newValue == 12 then
elementBackpack[source] = createObject(3026,x,y,z)
elseif newValue == 16 then
elementBackpack[source] = createObject(1248,x,y,z)
elseif newValue == 26 then
elementBackpack[source] = createObject(1575,x,y,z)
elseif newValue == 36 then
elementBackpack[source] = createObject(1252,x,y,z)
elseif newValue == 52 then
elementBackpack[source] = createObject(2405,x,y,z)
elseif newValue == 8 then
return
end
if newValue == 26 then
attachElementToBone(elementBackpack[source],source,3,0,-0.16,0.05,270,0,180)
else
attachElementToBone(elementBackpack[source],source,3,0,-0.225,0.05,90,0,0)
end
end
if getElementType(source) == "player" and dataName == "helmetOn" then
if getElementData ( source, dataName ) then
local x, y, z = getElementPosition(source)
local helmet = createObject(902, x, y, z)
setElementData ( source, "helmetObject", helmet )
local skin = getElementModel ( source )
if skin == 16 then
attachElementToBone(helmet, source, 1, 0, 0.02, -0.53, 0, 0, 90)
elseif skin == 287 then
attachElementToBone(helmet, source, 1, 0, 0.01, -0.56, 0, 0, 90)
elseif skin == 18 then
attachElementToBone(helmet, source, 1, 0.015, 0.025, -0.54, 0, 0, 90)
elseif skin == 23 then
attachElementToBone(helmet, source, 1, 0, 0.015, -0.574, 0, 0, 90)
elseif skin == 24 then
attachElementToBone(helmet, source, 1, 0, 0.015, -0.575, 0, 0, 90)
elseif skin == 1 then
attachElementToBone(helmet, source, 1, 0, 0.015, -0.545, 0, 0, 90)
elseif skin == 2 then
attachElementToBone(helmet, source, 1, 0.015, 0.025, -0.59, 0, 0, 90)
else
attachElementToBone(helmet, source, 1, 0, 0.015, -115, 0, 0, 90)
end
else
if isElement ( getElementData ( source, "helmetObject" ) ) then
detachElementFromBone( getElementData ( source, "helmetObject" ) )
destroyElement ( getElementData ( source, "helmetObject" ) )
setElementData ( source, "helmetObject", false )
end
end
end
end
addEventHandler ( "onElementDataChange", getRootElement(), backPackBack )
Agora procure por :
function backpackRemoveQuit ()
Abaixo adicione isto:
if getElementData ( source, "helmetObject" ) then
local helmet = getElementData ( source, "helmetObject" )
if isElement ( helmet ) then
destroyElement ( helmet )
end
end
Procure por :
function removeAttachedOnDeath ()
Abaixo adicione isto :
if getElementData ( source, "helmetObject" ) then
local helmet = getElementData ( source, "helmetObject" )
if isElement ( helmet ) then
destroyElement ( helmet )
setElementData ( source, "helmetObject", false )
setElementData ( source, "helmetOn", false )
end
end
Volte ao inventory.lua e procure por:
itemName2 = itemName
if itemName == "Tire_inVehicle" then itemName2 = "Tire" end
if itemName == "Engine_inVehicle" then itemName2 = "Engine" end
if (getElementData(getLocalPlayer(),itemName2) or 0)/itemPlus < 1 then
triggerEvent ("displayClientInfo", getLocalPlayer(),"Inventory","Can't drop this!",255,22,0)
return
end
Abaixo adicione isto:
if itemName == "Mascara" and getElementData ( localPlayer, "helmetOn" ) and getElementData(getLocalPlayer(),"Mascara") == 1 then
triggerEvent("displayClientInfo", getLocalPlayer(), "inventory", "Você não pode jogar! Remover o capacete!", 255, 22, 0)
return true
end
Download :
["Items"] = {
Agora coloque isto embaixo :
{"Mascara",1,"Usar"},
Depois procure por:
if itemName == "Blood Bag" then
return
end
Abaixo adicione :
if itemName == "Mascara" and getElementData ( localPlayer, "helmetOn" ) then
itemInfo = "Remover"
end
Depois procure por :
function playerUseItem(itemName,itemInfo)
E adicione isto :
elseif itemInfo == "Mascara" then
setElementData ( localPlayer, "helmetOn", true )
elseif itemInfo == "Remover" then
setElementData ( localPlayer, "helmetOn", false )
Agora abra o login.lua e procure por :
local playerDataTable = {
E adicione isto :
{"Mascara"},
Agora procure por :
local vehicleDataTable = {
E adicione isto :
{"Mascara"},
Agora abra o pickups.lua e procure por:
["military"] = {
E adicione isto embaixo:
{"Mascara",902,1,0,0.3},
Procure por :
["other"] = {
E adicione isto embaixo:
{"Mascara",902,1,0,0.3},
Agora abra o spawn.lua e procure por:
local playerDataTable = {
E adicione isto:
{"Mascara"},
Procure por:
local vehicleDataTable = {
E adicione isto:
{"Mascara"},
Agora Abra o survivorsystem.lua:
Procure por :
local vehicleDataTableForTent = {
E adicione isto :
{"Mascara"},
Agora procure por isto :
local elementBackpack = {}
function backPackBack (dataName,oldValue)
if getElementType(source) == "player" and dataName =="MAX_Slots" then
local newValue = getElementData(source,dataName)
if elementBackpack[source] then
detachElementFromBone(elementBackpack[source])
destroyElement(elementBackpack[source])
elementBackpack[source] = false
end
local x,y,z = getElementPosition(source)
local rx,ry,rz = getElementRotation(source)
if newValue == 12 then
elementBackpack[source] = createObject(3026,x,y,z)
elseif newValue == 16 then
elementBackpack[source] = createObject(1248,x,y,z)
elseif newValue == 26 then
elementBackpack[source] = createObject(1575,x,y,z)
elseif newValue == 36 then
elementBackpack[source] = createObject(1252,x,y,z)
elseif newValue == 52 then
elementBackpack[source] = createObject(2405,x,y,z)
elseif newValue == 8 then
return
end
if newValue == 26 then
attachElementToBone(elementBackpack[source],source,3,0,-0.16,0.05,270,0,180)
else
attachElementToBone(elementBackpack[source],source,3,0,-0.225,0.05,90,0,0)
end
end
if getElementType(source) == "player" and dataName == "helmetOn" then
if getElementData ( source, dataName ) then
local x, y, z = getElementPosition(source)
local helmet = createObject(902, x, y, z)
setElementData ( source, "helmetObject", helmet )
local skin = getElementModel ( source )
if skin == 16 then
attachElementToBone(helmet, source, 1, 0, 0.02, -0.53, 0, 0, 90)
elseif skin == 287 then
attachElementToBone(helmet, source, 1, 0, 0.01, -0.56, 0, 0, 90)
elseif skin == 18 then
attachElementToBone(helmet, source, 1, 0.015, 0.025, -0.54, 0, 0, 90)
elseif skin == 23 then
attachElementToBone(helmet, source, 1, 0, 0.015, -0.574, 0, 0, 90)
elseif skin == 24 then
attachElementToBone(helmet, source, 1, 0, 0.015, -0.575, 0, 0, 90)
elseif skin == 1 then
attachElementToBone(helmet, source, 1, 0, 0.015, -0.545, 0, 0, 90)
elseif skin == 2 then
attachElementToBone(helmet, source, 1, 0.015, 0.025, -0.59, 0, 0, 90)
else
attachElementToBone(helmet, source, 1, 0, 0.015, -115, 0, 0, 90)
end
else
if isElement ( getElementData ( source, "helmetObject" ) ) then
detachElementFromBone( getElementData ( source, "helmetObject" ) )
destroyElement ( getElementData ( source, "helmetObject" ) )
setElementData ( source, "helmetObject", false )
end
end
end
end
addEventHandler ( "onElementDataChange", getRootElement(), backPackBack )
E Subistitua o Por :
local elementBackpack = {}
function backPackBack (dataName,oldValue)
if getElementType(source) == "player" and dataName =="MAX_Slots" then
local newValue = getElementData(source,dataName)
if elementBackpack[source] then
detachElementFromBone(elementBackpack[source])
destroyElement(elementBackpack[source])
elementBackpack[source] = false
end
local x,y,z = getElementPosition(source)
local rx,ry,rz = getElementRotation(source)
if newValue == 12 then
elementBackpack[source] = createObject(3026,x,y,z)
elseif newValue == 16 then
elementBackpack[source] = createObject(1248,x,y,z)
elseif newValue == 26 then
elementBackpack[source] = createObject(1575,x,y,z)
elseif newValue == 36 then
elementBackpack[source] = createObject(1252,x,y,z)
elseif newValue == 52 then
elementBackpack[source] = createObject(2405,x,y,z)
elseif newValue == 8 then
return
end
if newValue == 26 then
attachElementToBone(elementBackpack[source],source,3,0,-0.16,0.05,270,0,180)
else
attachElementToBone(elementBackpack[source],source,3,0,-0.225,0.05,90,0,0)
end
end
if getElementType(source) == "player" and dataName == "helmetOn" then
if getElementData ( source, dataName ) then
local x, y, z = getElementPosition(source)
local helmet = createObject(902, x, y, z)
setElementData ( source, "helmetObject", helmet )
local skin = getElementModel ( source )
if skin == 16 then
attachElementToBone(helmet, source, 1, 0, 0.02, -0.53, 0, 0, 90)
elseif skin == 287 then
attachElementToBone(helmet, source, 1, 0, 0.01, -0.56, 0, 0, 90)
elseif skin == 18 then
attachElementToBone(helmet, source, 1, 0.015, 0.025, -0.54, 0, 0, 90)
elseif skin == 23 then
attachElementToBone(helmet, source, 1, 0, 0.015, -0.574, 0, 0, 90)
elseif skin == 24 then
attachElementToBone(helmet, source, 1, 0, 0.015, -0.575, 0, 0, 90)
elseif skin == 1 then
attachElementToBone(helmet, source, 1, 0, 0.015, -0.545, 0, 0, 90)
elseif skin == 2 then
attachElementToBone(helmet, source, 1, 0.015, 0.025, -0.59, 0, 0, 90)
else
attachElementToBone(helmet, source, 1, 0, 0.015, -115, 0, 0, 90)
end
else
if isElement ( getElementData ( source, "helmetObject" ) ) then
detachElementFromBone( getElementData ( source, "helmetObject" ) )
destroyElement ( getElementData ( source, "helmetObject" ) )
setElementData ( source, "helmetObject", false )
end
end
end
end
addEventHandler ( "onElementDataChange", getRootElement(), backPackBack )
Agora procure por :
function backpackRemoveQuit ()
Abaixo adicione isto:
if getElementData ( source, "helmetObject" ) then
local helmet = getElementData ( source, "helmetObject" )
if isElement ( helmet ) then
destroyElement ( helmet )
end
end
Procure por :
function removeAttachedOnDeath ()
Abaixo adicione isto :
if getElementData ( source, "helmetObject" ) then
local helmet = getElementData ( source, "helmetObject" )
if isElement ( helmet ) then
destroyElement ( helmet )
setElementData ( source, "helmetObject", false )
setElementData ( source, "helmetOn", false )
end
end
Volte ao inventory.lua e procure por:
itemName2 = itemName
if itemName == "Tire_inVehicle" then itemName2 = "Tire" end
if itemName == "Engine_inVehicle" then itemName2 = "Engine" end
if (getElementData(getLocalPlayer(),itemName2) or 0)/itemPlus < 1 then
triggerEvent ("displayClientInfo", getLocalPlayer(),"Inventory","Can't drop this!",255,22,0)
return
end
Abaixo adicione isto:
if itemName == "Mascara" and getElementData ( localPlayer, "helmetOn" ) and getElementData(getLocalPlayer(),"Mascara") == 1 then
triggerEvent("displayClientInfo", getLocalPlayer(), "inventory", "Você não pode jogar! Remover o capacete!", 255, 22, 0)
return true
end
Download :
[Tens de ter uma conta e sessão iniciada para poderes visualizar este link]