Wysłany: 2016-11-15, 11:52
Basil.
Wiek: 24 Na forum: 3724 dni Posty: 80
Nick w MP: njefjem
Cze??, posiadam skrypt na duty administracji, dorobi?em w?asn? suszark? lecz nie wiem co zrobi?, by po wpisaniu komendy duty i zalogowaniu si? na rang? da?o nam Colta (ID 22)
Tutaj macie ten kodzik i prosz?, pode?lijcie mi ju? gotowy kod, nie zr?bcie tylko czego? takiego ?e gdy nie jeste?my w sql to nam daje bro?
Kod:
function jestRCONem(gracz)
if getElementData(gracz, "duty") == 3 then return true end
end
function jestADMINem(gracz)
if getElementData(gracz, "duty") == 2 then return true end
end
function jestModem(gracz)
if getElementData(gracz, "duty") == 1 then return true end
end
addCommandHandler("admins", function(gracz,cmd)
admini = {}
rconi = {}
moderatorzy = {}
for k,v in ipairs(getElementsByType("player")) do
if jestRCONem(v) then
table.insert(rconi, getPlayerName(v))
elseif jestModem (v) then
table.insert(moderatorzy, getPlayerName(v))
elseif jestADMINem(v) then
table.insert(admini, getPlayerName(v))
end
end
for i=0,1 do
outputChatBox(" ", gracz)
end
outputChatBox("* Dost?pni RCON'i:", gracz, 120, 0, 0)
if #rconi > 0 then
outputChatBox(table.concat(rconi, ", "), gracz)
else
outputChatBox("brak", gracz)
end
outputChatBox(" ", gracz)
outputChatBox("* Dost?pni administratorzy:", gracz, 255, 0, 0)
if #admini > 0 then
outputChatBox(table.concat(admini, ", "), gracz)
else
outputChatBox("brak", gracz)
end
outputChatBox(" ", gracz)
outputChatBox("* Dost?pni moderatorzy:", gracz, 29, 140, 0)
if #moderatorzy > 0 then
outputChatBox(table.concat(moderatorzy, ", "), gracz)
else
outputChatBox("brak", gracz)
end
outputServerLog(getPlayerName(gracz).." sprawdza list? dost?pnych cz?onk?w ekipy.")
end
)
-- Ustawienia SQL
addEventHandler("onResourceStart", resourceRoot, function()
db = dbConnect("sqlite", "da.db") -- Po??czenie z serwerem SQL
if db then
outputDebugString("Po??czono z baz? SQL duty administracji //One Life")
end
end)
-- Reszta zasobu
addCommandHandler("duty", function(plr,cmd)
local q = dbQuery(db, "SELECT level FROM admins WHERE login=?", getAccountName(getPlayerAccount(plr)))
local w = dbPoll(q, -1)
if w and #w > 0 then
if not getElementData(plr, "duty") then
if w[1].level == 1 then -- Je?eli kolumna 'level' ma warto?? 1 to nadajemy rang? moderatora.
setElementData(plr, "duty", 1)
outputChatBox("Logujesz si? na duty moderatora.", plr)
elseif w[1].level == 2 then -- Je?eli kolumna 'level' ma warto?? 2 to nadajemy rang? administratora.
setElementData(plr, "duty", 2)
outputChatBox("Loguejsz si? na duty administratora.", plr)
elseif w[1].level == 3 then -- Je?eli kolumna 'level' ma warto?? 3 to nadajemy rang? administratora RCON.
setElementData(plr, "duty", 3)
outputChatBox("Logujesz si? na duty administratora RCON.", plr)
end
else
removeElementData(plr, "duty")
outputChatBox("Wylogowujesz si? z duty.", plr)
end
else
outputChatBox("Nie jeste? w ekipie serwera.", plr)
end
end)
addCommandHandler('e', function(plr,cmd, ...)
if not (...) then return end
local ranga = nil
local msg=table.concat({...}, " ")
if getElementData(plr, "duty") == 3 then
ranga = "RCON"
end
if getElementData(plr, "duty") == 2 then
ranga = "ADM"
end
if getElementData(plr, "duty") == 1 then
ranga = "MOD"
end
for _, p in pairs(getElementsByType('player')) do
if getElementData(p, "duty") then
outputChatBox("[CE] "..getPlayerName(plr).." ("..tonumber(getElementData(plr,"id"))..") ".."["..ranga.."]: "..msg,p,255,170, 0,true)
end
end
end)
--[[
Informacje:
Aby zas?b dzia?a? poprawnie, musisz doda? tabel? do MySQL z nazw? 'admins' (bez apostrof?w) z kolumnami:
serial - typ VARCHAR - d?ugo?? 255
levle - typ INT - d?ugo?? 1
Aby doda? gracza do administracji, dodaj do MySQL serial gracza oraz level
Level 1 - Moderator
Level 2 - Administrator
Level 3 - Administrator RCON
Aby pobra? rang? gracza przy np. robieniu komend:
aby sprawdzi?, czy gracz jest moderatorem wpisujemy:
if getElementData(plr, "duty") == 1 then
Reszta Twojego kodu.
end
aby sprawdzi?, czy gracz jest administratorem wpisujemy:
if getElementData(plr, "duty") == 2 then
Reszta Twojego kodu.
end
aby sprawdzi?, czy gracz jest administratorem RCON wpisujemy:
if getElementData(plr, "duty") == 3 then
Reszta Twojego kodu
end
]]--
--Komedndy Chat
addCommandHandler("r", function(plr, cmd, ...)
if getElementData(plr, "duty") == 3 then
local text = table.concat(arg, " ")
name = getPlayerName(plr)
outputChatBox("R > "..text.." ~ "..getPlayerName(plr)..".", getRootElement(), 255, 0, 0, true)
end
end)
addCommandHandler("a", function(plr, cmd, ...)
if getElementData(plr, "duty") == 2 or getElementData(plr, "duty") == 3 then
local text = table.concat(arg, " ")
name = getPlayerName(plr)
outputChatBox("A > "..text.." ~ "..getPlayerName(plr)..".", getRootElement(), 0, 100, 255, true)
end
end)
addCommandHandler("m", function(plr, cmd, ...)
if getElementData(plr, "duty") == 1 or getElementData(plr, "duty") == 3 then
local text = table.concat(arg, " ")
name = getPlayerName(plr)
outputChatBox("M > "..text.." ~ "..getPlayerName(plr)..".", getRootElement(), 72, 255, 0, true)
end
end)
--- d?u?ej
addCommandHandler("p", function(plr, cmd, model)
if getElementData(plr, "duty") == 2 or getElementData(plr, "duty") == 3 then
local dim = getElementDimension(plr)
local x,y,z = getElementPosition(plr)
local r1,r2,r3 = getElementRotation(plr)
local model = getVehicleModelFromName(model)
if not tostring(model) then
outputChatBox("* Nie wpisa?e?(a?) modelu pojazdu.", plr)
return
end
if getPedOccupiedVehicle(plr) then
setElementModel(getPedOccupiedVehicle(plr), model)
else
local pojazd = createVehicle(model, x, y, z, r1, r2, r3)
warpPedIntoVehicle(plr, pojazd)
setElementDimension(pojazd, dim)
setVehicleColor(pojazd, 0, 0, 2)
---setElementData(pojazd,"vehicle:fuel",100)
setVehiclePlateText(pojazd,"RESPIONE")
end
end
end)
--[[addCommandHandler("daj.rep", function(plr,cmd,cel,value)
if getElementData(plr, "duty") == 3 then
if not cel or not tonumber(value) then
outputChatBox("* U?ycie: /daj.rep <nick/ID> <ilosc>", plr)
return
end
local target= findPlayer(plr,cel)
if not target then
outputChatBox("* Nie znaleziono podanego gracza.", plr, 255, 0, 0)
return
end
setElementData(target,"Reputacja", getElementData(target,"Reputacja")+value)
outputChatBox("* Otrzyma?e?(a?) "..value.." Reputacji!", target)
end
end
end)
]]
addCommandHandler("destroy", function(plr, cmd, model)
if getElementData(plr, "duty") == 1 or getElementData(plr, "duty") == 3 or getElementData(plr, "duty") == 2 then
local pojazd = getVehicleOccupant(source)
if not pojazd then return end
destroyElement(pojazd)
end
end)
addCommandHandler("jp", function(plr,cmd)
if getElementData(plr, "duty") == 1 or getElementData(plr, "duty") == 3 or getElementData(plr, "duty") == 2 then
if isPedInVehicle(plr) then
removePedFromVehicle(plr)
end
if doesPedHaveJetPack(plr) then
removePedJetPack(plr)
else
givePedJetPack(plr)
end
end
end)
addCommandHandler("dim", function(plr, cmd, value)
if getElementData(plr, "duty") == 1 or getElementData(plr, "duty") == 3 or getElementData(plr, "duty") == 2 then
if (not value) then
outputChatBox("U?yj: /dim <numer>", plr)
return
end
setElementDimension(plr, value)
end
end)
addCommandHandler("thv", function(plr, cmd, vid)
if getElementData(plr, "duty") == 1 or getElementData(plr, "duty") == 3 or getElementData(plr, "duty") == 2 then
if not tonumber(vid) then return end
for i,v in ipairs(getElementsByType("vehicle")) do
if getElementData(v, "car_id") == tonumber(vid) then
local x,y,z = getElementPosition(plr)
setElementFrozen(v, false)
warpPedIntoVehicle(plr, v)
setElementPosition(v, x,y,z)
setElementInterior(v, getElementInterior(plr))
setElementDimension(v, getElementDimension(plr))
return
end
end
end
outputChatBox("* Nie posiadasz uprawnie? do u?ywania tej komendy, b?d? nie znaleziono auta o podanym ID!", plr, 255, 0, 0)
end)
addCommandHandler("inv", function(plr)
if getElementData(plr, "duty") == 1 or getElementData(plr, "duty") == 3 or getElementData(plr, "duty") == 2 then
if getElementAlpha(plr) > 0 then
setElementAlpha(plr,0)
setPlayerNametagShowing(plr, false)
else
setElementAlpha(plr,255)
setPlayerNametagShowing(plr, true)
end
end
end)
function getPointFromDistanceRotation(x,y,dist,angle)
local a=math.rad(90-angle);
local dx=math.cos(a) * dist;
local dy=math.sin(a) * dist;
return x+dx, y+dy;
end
addCommandHandler("ustaw.klatke", function(plr)
if getElementData(plr, "duty") == 1 or getElementData(plr, "duty") == 3 or getElementData(plr, "duty") == 2 then
local x,y,z=getElementPosition(plr)
local dim=getElementDimension(plr)
local int=getElementInterior(plr)
local object=createObject(971, x,y,z-0.9, 270, 0, 180)
setElementData(object,"owner",getPlayerName(plr))
setElementDimension(object,dim)
setElementInterior(object,int)
local object=createObject(971, x,y,z+6, 270, 0, 180)
setElementData(object,"owner",getPlayerName(plr))
setElementDimension(object,dim)
setElementInterior(object,int)
local object=createObject(971, x,y+3.5,z+2.5, 0, 0, 0)
setElementData(object,"owner",getPlayerName(plr))
setElementDimension(object,dim)
setElementInterior(object,int)
local object=createObject(971, x-4.5,y,z+2.5, 0, 0, 270)
setElementData(object,"owner",getPlayerName(plr))
setElementDimension(object,dim)
setElementInterior(object,int)
local object=createObject(971, x,y-3.5,z+2.5, 0, 0, 180)
setElementData(object,"owner",getPlayerName(plr))
setElementDimension(object,dim)
setElementInterior(object,int)
local object=createObject(971, x+4,y,z+2.5, 0, 0, 270)
setElementData(object,"owner",getPlayerName(plr))
setElementDimension(object,dim)
setElementInterior(object,int)
outputChatBox("* Stworzy?es/a? klatk?.", plr)
end
end)
addCommandHandler("usun.klatke", function(plr)
if getElementData(plr, "duty") == 1 or getElementData(plr, "duty") == 3 or getElementData(plr, "duty") == 2 then
for i,v in ipairs(getElementsByType("object")) do
if getElementData(v,"owner") == getPlayerName(plr) then
destroyElement(v)
end
end
end
end)
addCommandHandler("fix", function(plr,cmd)
if getElementData(plr, "duty") == 1 or getElementData(plr, "duty") == 3 or getElementData(plr, "duty") == 2 then
local veh=getPedOccupiedVehicle(plr)
if not veh then
outputChatBox("* Nie znajdujesz si? w poje?dzie.", plr)
return
end
setElementHealth(veh, 1000)
fixVehicle(veh)
end
end)
addCommandHandler("pj",function(plr,cmd,pj)
if getElementData(plr, "duty") == 3 then
if not pj or not tonumber(pj) then outputChatBox("*Wpisz /pj [0-3]",plr) return end
local pj = tonumber(pj)
if pj < 0 or pj > 3 then outputChatBox("*Wpisz /pj [0-3]",plr) return end
local veh = getPedOccupiedVehicle(plr)
if not veh then outputChatBox("* Nie znajdujesz si? w pojezdzie.",plr) return end
setVehiclePaintjob(veh,pj)
end
end)
addCommandHandler("cfix", function(plr, cmd, range)
if getElementData(plr, "duty") == 1 or getElementData(plr, "duty") == 3 or getElementData(plr, "duty") == 2 then
if (not range) then
outputChatBox("U?yj: /cfix <zasieg>", plr)
return end
if not tonumber(range) then
outputChatBox("* /cfix <zasieg>", plr)
return end
range = tonumber(range)
if range <= 0 then
outputChatBox("* Za mala odleglosc", plr)
return end
if range > 50 then
outputChatBox("* Za duza odleglosc", plr)
return end
local x,y,z = getElementPosition(plr)
local cub = createColSphere(x,y,z,range)
local pojazdy = getElementsWithinColShape( cub, "vehicle")
if #pojazdy == 0 then
outputChatBox("* Brak pojazdow w poblizu", plr)
return end
for i,pojazd in ipairs(pojazdy) do
fixVehicle(pojazd)
end
setTimer(destroyElement,5000,1,cub)
end
end)
addCommandHandler("xyz",
function(player, cmd, x, y, z)
if getElementData(player, "duty") == 3 then
local x, y, z = tonumber(x), tonumber(y), tonumber(z)
if x and y and z then
setElementPosition(player, x, y, z)
outputChatBox("Ustawi?e? Pozycje.", player, 220, 220, 0, false)
else
outputChatBox("TP: /xyz <x> <y> <z>", player, 220, 220, 0, false)
end
end
end)
function flip(plr)
if getElementData(plr, "duty") == 1 or getElementData(plr, "duty") == 3 or getElementData(plr, "duty") == 2 then
if isPedInVehicle(plr) then
local veh = getPedOccupiedVehicle( plr )
local x,y,z = getElementRotation(veh)
setElementRotation( veh,0,0,z)
end
end
end
addCommandHandler('flip',flip)
addCommandHandler("ustaw.pogode", function(plr, cmd, value)
if getElementData(plr, "duty") == 2 or getElementData(plr, "duty") == 3 then
if not tonumber(value) then
outputChatBox("* Nie wpisa?e? id pogody.", plr)
return
end
if tonumber(value) > 175 then
outputChatBox("* Wpisa?e? du?e id pogody.", plr)
return
end
end
setWeather(value)
end)
addCommandHandler("up", function(plr, cmd, value)
if getElementData(plr, "duty") == 1 or getElementData(plr, "duty") == 2 or getElementData(plr, "duty") == 3 then
if (tonumber(value)==nil) then
outputChatBox("U?yj: /up <ile>", plr)
return
end
local e = plr
if (isPedInVehicle(plr)) then
e = getPedOccupiedVehicle(plr)
end
local x,y,z = getElementPosition(e)
setElementPosition(e, x, y, z+tonumber(value))
end
end)
addCommandHandler("thru", function(plr, cmd, value)
if getElementData(plr, "duty") == 1 or getElementData(plr, "duty") == 2 or getElementData(plr, "duty") == 3 then
if (tonumber(value)==nil) then
outputChatBox("U?yj: /thru <ile>", plr)
return
end
local e = plr
if getCameraTarget(plr) ~= plr then
e = getCameraTarget(plr)
end
if (isPedInVehicle(plr)) then
e = getPedOccupiedVehicle(e)
end
local x,y,z = getElementPosition(e)
local _,_,rz = getElementRotation(e)
local rrz = math.rad(rz)
local x = x + (value * math.sin(-rrz))
local y = y + (value * math.cos(-rrz))
setElementPosition(e, x, y, z)
end
end)
addCommandHandler("tt", function(plr, cmd, cel)
if getElementData(plr, "duty") == 1 or getElementData(plr, "duty") == 2 or getElementData(plr, "duty") == 3 then
if not cel then
outputChatBox("* U?yj: /tt <nick/ID>", plr)
return
end
local target = findPlayer(plr, cel)
if not target then
outputChatBox("* Nie znaleziono podanego gracza!", plr)
return
end
local x,y,z = getElementPosition(target)
setElementInterior(plr, getElementInterior(target))
setElementDimension(plr, getElementDimension(target))
setElementPosition(plr, x+1,y+1,z)
end
end)
addCommandHandler("th", function(plr, cmd, cel)
if getElementData(plr, "duty") == 1 or getElementData(plr, "duty") == 2 or getElementData(plr, "duty") == 3 then
if not cel then
outputChatBox("* U?yj: /th <nick/ID>", plr)
return
end
local target = findPlayer(plr, cel)
local x,y,z = getElementPosition(plr)
if not target then
outputChatBox("* Nie znaleziono podanego gracza!", plr)
return
end
if isPedInVehicle(target) then
removePedFromVehicle(target)
end
setElementInterior(target, getElementInterior(plr))
setElementDimension(target, getElementDimension(plr))
setElementPosition(target, x,y,z+1.5)
end
end)
addCommandHandler("spec", function(plr, cmd, cel)
if getElementData(plr, "duty") == 1 or getElementData(plr, "duty") == 2 or getElementData(plr, "duty") == 3 then
end
if (not cel) then
outputChatBox("U?yj: /spec <id/nick", plr)
return
end
local target = findPlayer(plr, cel)
if (not target) then
outputChatBox("Nie znaleziono gracza o podanym ID/nicku!", plr)
return
end
setElementInterior(plr, getElementInterior(target))
setElementDimension(plr, getElementDimension(target))
local x,y,z = getElementPosition(plr)
setElementData(plr, "pozycja:x", x)
setElementData(plr, "pozycja:y", y)
setElementData(plr, "pozycja:z", z)
setCameraTarget(plr, target)
end)
addCommandHandler("specoff", function(plr, cmd)
if getElementData(plr, "duty") == 1 or getElementData(plr, "duty") == 2 or getElementData(plr, "duty") == 3 then
end
local x = getElementData(plr, "pozycja:x")
local y = getElementData(plr, "pozycja:y")
local z = getElementData(plr, "pozycja:z")
setElementPosition(plr, x, y, z)
setCameraTarget(plr, plr)
end)
function findPlayer(plr,cel)
local target=nil
if (tonumber(cel) ~= nil) then
target=getElementByID("p"..cel)
else -- podano fragment nicku
for _,thePlayer in ipairs(getElementsByType("player")) do
if string.find(string.gsub(getPlayerName(thePlayer):lower(),"#%x%x%x%x%x%x", ""), cel:lower(), 1, true) then
if (target) then
outputChatBox("Znaleziono wi?cej graczy o podobnym nicku, podaj wi?cej liter!", plr)
return nil
end
target=thePlayer
end
end
end
return target
end
-----
addCommandHandler("raport", function(plr,cmd,cel,...)
if not cel then
outputChatBox("U?yj: /raport <kawa?ek nick'u> <pow?d>", plr)
return
end
local target = findPlayer(plr,cel)
if not target then
outputChatBox("Nie znaleziono podanego gracza.", plr, 255, 0, 0)
return
end
local text=table.concat({...}, " ")
desc = getPlayerName(plr).."("..getElementData(plr,"id")..") >> "..getPlayerName(target).."("..getElementData(target,"id").."): "..text
triggerClientEvent(root, "admin:addReport", resourceRoot, desc, getElementData(target,"id"))
outputChatBox("Pomy?lnie wys?ano zg?oszenie na gracza: "..getPlayerName(target), plr)
end)
addCommandHandler("cl", function(plr,cmd,id,...)
if getElementData(plr, "duty") == 1 or getElementData(plr, "duty") == 2 or getElementData(plr, "duty") == 3 then
if not tonumber(id) then
outputChatBox("U?yj: /cl <ID> <pow?d usuni?cia>", plr)
return
end
local reason = table.concat({...}, " ")
local target = findPlayer(plr,id)
if target then
id = getElementData(target, "id")
opis = getPlayerName(target)
end
triggerClientEvent(plr, "admin:removeReport", resourceRoot, id)
for i,v in ipairs(getElementsByType("player")) do
if getElementData(plr, "duty") == 1 or getElementData(plr, "duty") == 2 or getElementData(plr, "duty") == 3 then
if getElementData(v, "duty") == 1 or getElementData(v, "duty") == 2 or getElementData(v, "duty") == 3 then
outputChatBox(""..getPlayerName(plr).." usun??/??a raport na: "..opis.."/"..id..": "..reason, v, 255, 0, 0)
end
end
end
end
end)
Wysłany: 2016-11-15, 12:16
PapaSmerf
Wiek: 25 Na forum: 3525 dni Posty: 237
Piwa : 3857
function giveWeaponsOnSpawn ( theSpawnpont , theTeam )
if getElementData ( plr , "duty" ) == 1 or 2 or 3 then
giveWeapon ( source , 22 , 200 ) -- tu dajesz ile ma dac ammo ( 200 )
end
addEventHandler ( "onPlayerSpawn" , getRootElement (), giveWeaponsOnSpawn )
spr?boj tak jako?.
Wysłany: 2016-11-15, 12:43
Basil.
Wiek: 24 Na forum: 3724 dni Posty: 80
Nick w MP: njefjem
"CEO" napisał/a :
function giveWeaponsOnSpawn ( theSpawnpont , theTeam )
if getElementData ( plr , "duty" ) == 1 or 2 or 3 then
giveWeapon ( source , 22 , 200 ) -- tu dajesz ile ma dac ammo ( 200 )
end
addEventHandler ( "onPlayerSpawn" , getRootElement (), giveWeaponsOnSpawn )
spr?boj tak jako?.
Niezbyt si? znam i nie wiem gdzie to wpisa?, pomo?esz?
Wysłany: 2016-11-15, 12:51
PapaSmerf
Wiek: 25 Na forum: 3525 dni Posty: 237
Piwa : 3857
W ten skrypt co da?e? kod
Wysłany: 2016-11-15, 12:52
Basil.
Wiek: 24 Na forum: 3724 dni Posty: 80
Nick w MP: njefjem
"CEO" napisał/a :W ten skrypt co da?e? kod
Jak wklei?em to gdziekolwiek to nie dzia?a?o xd
Wysłany: 2016-11-15, 12:54
PapaSmerf
Wiek: 25 Na forum: 3525 dni Posty: 237
Piwa : 3857
function giveWeaponsOnSpawn ( thePlayer , command )
if getElementData ( plr , "duty" ) == 1 or 2 or 3 then
giveWeapon ( source , 22 , 200 ) -- tu dajesz ile ma dac ammo ( 200 )
end
addCommandHandler ( "suszara" , giveWeaponsOnSpawn )
tak bedzie lepiej:)
Wysłany: 2016-11-15, 12:59
Basil.
Wiek: 24 Na forum: 3724 dni Posty: 80
Nick w MP: njefjem
"CEO" napisał/a :
function giveWeaponsOnSpawn ( thePlayer , command )
if getElementData ( plr , "duty" ) == 1 or 2 or 3 then
giveWeapon ( source , 22 , 200 ) -- tu dajesz ile ma dac ammo ( 200 )
end
addCommandHandler ( "suszara" , giveWeaponsOnSpawn )
tak bedzie lepiej:)
nic
Wysłany: 2016-11-15, 13:08
PapaSmerf
Wiek: 25 Na forum: 3525 dni Posty: 237
Piwa : 3857
No nie dzia?a komenda? jakie b??dy w debugscript3?
Wysłany: 2016-11-15, 13:10
Emm
***** ***
Wiek: 32 Na forum: 3880 dni Posty: 3191
Nick w MP: Emm
Piwa : 6162
Administrator: Admin ma zawsze rację | REGULAMIN FORUM | REKLAMA/VIP | .
function giveWeaponsOnSpawn ( thePlayer , command )
if not getElementData ( thePlayer , "duty" ) then return
outputChatBox ( "* Musisz by? zalogowany na duty!" , thePlayer ) end
giveWeapon ( thePlayer , 22 , 200 ) -- dajesz ile ma dac ammo ( 200 )
outputChatBox ( "* Otrzymujesz suszark?." , thePlayer )
end
addCommandHandler ( "suszara" , giveWeaponsOnSpawn )
Podpis
Użytkownik : 20.10.2015r
GTAO Member : 06.03.2016r
Support-Team : 20.01.2016r
Moderator : 30.03.2016r
Mod-Team : 08.10.2016r
Vice Admin : 04.05.2018r
Administrator : 03.05.2022r
[you]
! 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 .
Ostatnio zmieniony przez Emm 2016-11-15, 13:29, w całości zmieniany 1 raz
Wysłany: 2016-11-15, 13:12
Basil.
Wiek: 24 Na forum: 3724 dni Posty: 80
Nick w MP: njefjem
"CEO" napisał/a :No nie dzia?a komenda? jakie b??dy w debugscript3?
Loading script failed: duty administracji/server.lua:630: 'end' expected (to close 'function') at live 1 near '(eof)'
[ Dodano : 2016-11-15, 13:17 ]
"T0M4SZ" napisał/a : function giveWeaponsOnSpawn ( thePlayer , command )
if not getElementData ( plr , "duty" ) then return
outputChatBox ( "* Musisz by? zalogowany na duty!" , thePlayer ) end
giveWeapon ( thePlayer , 22 , 200 ) -- dajesz ile ma dac ammo ( 200 )
outputChatBox ( "* Otrzymujesz suszark?." , thePlayer )
end
addCommandHandler ( "suszara" , giveWeaponsOnSpawn )
Zalogowa?em si? na duty i po wpisaniu /suszara pisze ?e nie jestem na duty xd
[ Dodano : 2016-11-15, 13:18 ]
TOM4SZ Zalogowa?em si? na duty i po wpisaniu /suszara pisze ?e nie jestem na duty xd
[ Dodano : 2016-11-15, 13:23 ]
A wy?wietla si? co? takiego: http://imgur.com/a/DpEQP
Wysłany: 2016-11-15, 13:26
PapaSmerf
Wiek: 25 Na forum: 3525 dni Posty: 237
Piwa : 3857
function giveWeaponsOnSpawn ( thePlayer , command )
if getElementData ( plr , "duty" ) then
giveWeapon ( thePlayer , 22 , 200 ) -- dajesz ile ma dac ammo ( 200 )
outputChatBox ( "* Otrzymujesz suszark?." , thePlayer )
end
addCommandHandler ( "suszara" , giveWeaponsOnSpawn )
a mo?e tak?
Wysłany: 2016-11-15, 13:30
Emm
***** ***
Wiek: 32 Na forum: 3880 dni Posty: 3191
Nick w MP: Emm
Piwa : 6162
Administrator: Admin ma zawsze rację | REGULAMIN FORUM | REKLAMA/VIP | .
CEO , to nic nie da bo dalej jest u Ciebie b??d.
Basil. , sprawd? teraz - edytowa?em m?j ostatni post i teraz powinno dzia?a?.
Podpis
Użytkownik : 20.10.2015r
GTAO Member : 06.03.2016r
Support-Team : 20.01.2016r
Moderator : 30.03.2016r
Mod-Team : 08.10.2016r
Vice Admin : 04.05.2018r
Administrator : 03.05.2022r
[you]
! 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 .
Wysłany: 2016-11-15, 13:32
Basil.
Wiek: 24 Na forum: 3724 dni Posty: 80
Nick w MP: njefjem
Nadal jak jestem na duty i wpisze /suszara to mam ?e nie jestem na duty ;d
Wysłany: 2016-11-15, 13:36
PapaSmerf
Wiek: 25 Na forum: 3525 dni Posty: 237
Piwa : 3857
function giveWeaponsOnSpawn ( thePlayer , command )
if getElementData ( plr , "duty" ) == 1 or 2 or 3 then
giveWeapon ( thePlayer , 22 , 200 ) -- dajesz ile ma dac ammo ( 200 )
outputChatBox ( "* Otrzymujesz suszark?." , thePlayer )
else
outputChatBox ( "* Nie posiadasz uprawnie?." , thePlayer )
end
addCommandHandler ( "suszara" , giveWeaponsOnSpawn )
Ostatnio zmieniony przez PapaSmerf 2016-11-15, 13:43, w całości zmieniany 2 razy
Wysłany: 2016-11-15, 13:41
Basil.
Wiek: 24 Na forum: 3724 dni Posty: 80
Nick w MP: njefjem
"CEO" napisał/a : function giveWeaponsOnSpawn ( thePlayer , command )
if not getElementData ( thePlayer , "duty" ) then return
outputChatBox ( "* Musisz by? zalogowany na duty!" , thePlayer ) end
else
if getElementData ( thePlayer , "duty" ) == 1 or 2 or 3 then
giveWeapon ( thePlayer , 22 , 200 ) -- dajesz ile ma dac ammo ( 200 )
outputChatBox ( "* Otrzymujesz suszark?." , thePlayer )
end
addCommandHandler ( "suszara" , giveWeaponsOnSpawn )
Przy tym kodzie nawet nie mog? duty odpali?
Tagi: zrobić :: dawało :: broń?
Anonymous
Na forum: 245 dni
Posty: 1
Anonymous Koniecznie zajrzyj na: