addEventHandler("onClientGUIClick", root, function()
if source ~= GUIEditor.button[1] then return end
triggerClientEvent("Torba",localPlayer)
end)
--server
addEvent("Torba",true)
addEventHandler("Torba",root,function()
local login = getAccountName(getPlayerAccount(client))
if isObjectInACLGroup("user."..login,aclGetGroup("torba", client)) then
local auto = getPedOccupiedVehicle(client)
if isPedInVehicle(client) then
if (getElementModel(auto) == 416) or (getElementModel(auto) == 427) or (getElementModel(auto) == 407) then
local torba = createObject(1210, 0, 0, 0, 0, 0, 0)
setElementData ( client, "torba", torba)
exports.bone_attach:attachElementToBone(torba,client,12,0,0.1,0.3,0,180,0)
outputChatBox("** Bierzesz torb? medyczn?", client)
outputChatBox("** "..login.." wyci?ga torb? medyczn? z pojazdu", root)
end
end
end
end)
Remix110, Trzeba by?o pisa? od pocz?tku xd Wi?c tak jak chcesz ?eby to wygl?da?o? Klikasz branie torby, skrypt sprawdza czy jeste? w psp i dopiero wtedy zmienia Ci skina? A nie lepiej podczas wywo?ywania sprawdzi? czy ten kto? jest w psp albo czy ma elementDat? frakcji?
addEventHandler("onClientGUIClick", root, function()
if source ~= GUIEditor.button[1] then return end
triggerClientEvent("Torba",localPlayer)
end)
--server
addEvent("Torba",true)
addEventHandler("Torba",root,function()
local login = getAccountName(getPlayerAccount(client))
if isObjectInACLGroup("user."..login,aclGetGroup("torba") then
local auto = getPedOccupiedVehicle(client)
if isPedInVehicle(client) then
if (getElementModel(auto) == 416) or (getElementModel(auto) == 427) or (getElementModel(auto) == 407) then
local torba = createObject(1210, 0, 0, 0, 0, 0, 0)
setElementData ( client, "torba", torba)
exports.bone_attach:attachElementToBone(torba,client,12,0,0.1,0.3,0,180,0)
outputChatBox("** Bierzesz torb? medyczn?", client)
outputChatBox("** "..login.." wyci?ga torb? medyczn? z pojazdu", root)
end
end
end
end)
No to powinno dzia?a?, tutaj jest gotowiec wi?c spr?buj dorobi? reszt? sam. Jak co? nie wyjdzie to pisz tutaj
Tylko wiesz to ma by? pod marker a nie pod auto a ja tu widze :
local auto = getPedOccupiedVehicle(client)
if isPedInVehicle(client) then
if (getElementModel(auto) == 416) or (getElementModel(auto) == 427) or (getElementModel(auto) == 407) then
Nie możesz pisać nowych tematów Nie możesz odpowiadać w tematach Nie możesz zmieniać swoich postów Nie możesz usuwać swoich postów Nie możesz głosować w ankietach