! Koniecznie zapoznaj się z regulaminem forum.
Pamiętaj, aby zawsze go przestrzegać, nie mniej ważne są również regulaminy działów, w których się wypowiadasz!
Zamiast zakładać temat po kilka razy, bo jest usuwany przez Administrację, przejrzyj regulamin i napisz poprawnie temat!
Sprawy z administracją możesz załatwiać anonimowo w tym dziale.
Najważniejsze informacje od Administracji możesz przeczytać tutaj oraz tutaj.
Kod przeniesiony na pastebin'a ze wzgl?du na generowane b??dy. Je?eli kto? doda ten kod bez uprzedniego wys?ania na pastebin'a i podania odno?nika do niego to potraktuj? to jako u?ywanie b??d?w.
Ostatnio zmieniony przez #404 2016-03-12, 11:20, w całości zmieniany 2 razy
prosz? o po??czenie 2 gamemod?w, 1 to dayz a drogi to bezpieczna strefa pr?bowa?em sam je po??czy? ale godmode mi nie dzia?a? a to link do obydwu gamemodow one s? w jednym rar.
http://hostuje.net/file.p...f5a1065ac20e478
Witam chcia?bym zrobi? dmon dla Administratora tylko nie wiem zbytnio jak jak narazie zrobi?em co? takiego lecz wydaje mi sie ze tego moze uzywac kazdy i w dodatku nie dziala ;/
Dacie rade jako? to ogarn?? ? oczywi?cie piwko leci !
Witam chcia?bym zrobi? dmon dla Administratora tylko nie wiem zbytnio jak jak narazie zrobi?em co? takiego lecz wydaje mi sie ze tego moze uzywac kazdy i w dodatku nie dziala ;/
Dacie rade jako? to ogarn?? ? oczywi?cie piwko leci !
Server-side:
function dm(plr,cmd)
local accName = getAccountName(getPlayerAccount(plr))
if isObjectInACLGroup("user."..accName, aclGetGroup("Admin") then
toggleControl(plr, "fire", true)
toggleControl(plr, "action", true)
toggleControl(plr, "aim_weapon", true)
end
end
addCommandHandler("dmon",dm)
Totalnie tego nie ogarniam , je?eli kto? mi przerobi ten skrypt (2 kody) Dostaaje Zimneee
--[[
Resource: OURGame
Developers: Split <split.programista@gmail.com>
Copyright <split.programista@gmail.com> 2015-2016
You have no right to use this code without my permission.
]]
addEventHandler("onClientMarkerHit", resourceRoot, function(el,md)
if not md or el~=localPlayer then return end
local cs=getElementData(source, "tn_cs")
if not cs then return end
local job=getElementData(source,"tn_faction")
local ljob=getElementData(el,"player:faction")
if job ~= ljob then
outputChatBox("* Nie jeste? zatrudniony w tym warsztacie.", 255, 0, 0)
return
end
local vehicles=getElementsWithinColShape(cs,"vehicle")
if #vehicles < 1 then
outputChatBox("* Na stanowisku monta?u nie ma ?adnego pojazdu.", 255, 0, 0)
return
end
if #vehicles > 1 then
outputChatBox("* Na stanowisku monta?u jest zbyt du?o pojazd?w.", 255, 0, 0)
return
end
if getElementHealth(vehicles[1]) < 900 then
outputChatBox("* Pojazd jest zbyt uszkodzony aby zamontowa? ?wiat?a.", 255, 0, 0)
return
end
isVehicles=vehicles[1]
showCursor(true,false)
guiGridListClear(wn.grid)
guiSetVisible(wn.window, true)
for i,v in ipairs(isCzesci) do
local row=guiGridListAddRow(wn.grid)
guiGridListSetItemText(wn.grid, row, 1, v[1].."("..v[2]..")", false, false)
guiGridListSetItemData(wn.grid, row, 1, v[2], false, false)
guiGridListSetItemText(wn.grid, row, 2, v[3].." Funt?w", false, false)
guiGridListSetItemData(wn.grid, row, 2, v[3], false, false)
end
end)
addEventHandler("onClientMarkerLeave", resourceRoot, function(el,md)
if el~=localPlayer then return end
isVehicles=nil
showCursor(false)
guiSetVisible(wn.window, false)
end)
addEventHandler("onClientGUIClick", wn.btn_submit, function()
if not isVehicles then return end
selectedRow=guiGridListGetSelectedItem(wn.grid) or -1
if selectedRow < 0 then return end
local model=guiGridListGetItemData(wn.grid, selectedRow, 1)
local cost=tonumber(guiGridListGetItemData(wn.grid, selectedRow, 2))
if not cost then return end
if cost > getPlayerMoney(localPlayer) then
outputChatBox("* Nie posiadasz tyle got?wki.", 255, 0, 0)
return
end
triggerServerEvent("takePlayerMoney", localPlayer, cost)
triggerServerEvent("montazElementu", root, isVehicles, "tuning", model, cost)
end)
addEventHandler("onClientGUIClick", wn.btn_close, function()
if not isVehicles then return end
selectedRow=guiGridListGetSelectedItem(wn.grid) or -1
if selectedRow < 0 then return end
local model=guiGridListGetItemData(wn.grid, selectedRow, 1)
local cost=tonumber(guiGridListGetItemData(wn.grid, selectedRow, 2))
if not model or not cost then return end
triggerServerEvent("montazElementu", root, isVehicles, "demtuning", model, cost/2)
end)
--[[
Resource: OURGame
Developers: Split <split.programista@gmail.com>
Copyright <split.programista@gmail.com> 2015-2016
You have no right to use this code without my permission.
]]
[2016-03-25 15] start: Requested by Console
[2016-03-25 15] Starting dmon
[2016-03-25 15] SCRIPT ERROR: dmon/dm.lua:3: ')' expected near 'then'
[2016-03-25 15] ERROR: Loading script failed: dmon/dm.lua:3: ')' expected near 'then'
[2016-03-25 15] start: Resource 'dmon' started
Wystarcz? podstawy angielskiego, aby zrozumie?, ?e uci??em jeden nawias
function dm(plr,cmd)
local accName = getAccountName(getPlayerAccount(plr))
if isObjectInACLGroup("user."..accName, aclGetGroup("Admin")) then
toggleControl(plr, "fire", true)
toggleControl(plr, "action", true)
toggleControl(plr, "aim_weapon", true)
end
end
addCommandHandler("dmon",dm)
demoniskoxd, AteX Ci napisa?, ?e ucia? jeden nawias to powinno tak wygl?da?:
function dm(plr,cmd)
local accName = getAccountName(getPlayerAccount(plr))
if isObjectInACLGroup("user."..accName, aclGetGroup("Admin")) then
toggleControl(plr, "fire", true)
toggleControl(plr, "action", true)
toggleControl(plr, "aim_weapon", true)
end
end
addCommandHandler("dmon",dm)
Wszystko mam zrobione jak piszecie,tak czy siak nie chce mi zadzia?a? ....
--- s.lua
function dm(plr,cmd)
local accName = getAccountName(getPlayerAccount(plr))
if isObjectInACLGroup("user."..accName, aclGetGroup("Admin")) then
toggleControl(plr, "fire", true)
toggleControl(plr, "action", true)
toggleControl(plr, "aim_weapon", true)
end
end
addCommandHandler("dmon",dm)
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