Siema, mam taki problem, doda?em si? do SAPD w mysql i gdy klikam rozpocznij sluzbe pojawia si? w debugscript zebym sprawdzil linijke 42 w s.duty_lua attempt to index local 'result' (a boolean value)
Witam, chcia?bym stworzy? localchat na serwer lecz totalnie nie wiem jak sie do tego zabra?. Chcia?bym aby ten chat dzia?a? normalnie jak ten na Freeroamie tylko ?eby zmiejszy? range do 100. Jakby da?o rade to prosi?bym o gotowy kod. Z g?ry dzi?kuje!
mam problem z kodem 27 linia local dim=split(getnajwyzszydim.intdim_wnetrza,",")
[lua]addCommandHandler("adddomek2",
function(plr,cmd,cena,miejsca_parkingowe,id_interioru,id_garazu,pozycja_wyjscia)
if not iswlasciciel(plr) and (getElementData(plr,"dbid")~=1) then
return
end
if not cena or not tonumber(cena) or not miejsca_parkingowe or not id_interioru or not id_garazu then
exports["komunikaty"]:komunikat("/adddomek [cena] [miejsca_parkingowe] [id_interioru <0-23>] [id_garazu] [x,y,z_wyjscia]", plr)
return
end
local z_i=nil
for i,v in ipairs(inside) do
if (tonumber(id_interioru)==i) then
z_i=v
end
end
if not z_i then
exports["komunikaty"]:komunikat("Nieprawid?owy identyfikator interioru.", plr)
return
end
local pozycja=string.format("%s,%s,%s", z_i.poz[1], z_i.poz[2], z_i.poz[3])
if not pozycja_wyjscia then
local px,py,pz=getElementPosition(plr)
pozycja_wyjscia=string.format("%s,%s,%s", px,py,pz)
end
local pozycja_markera=string.format("%s,%s,%s", z_i.marker_wejscie[1], z_i.marker_wejscie[2], z_i.marker_wejscie[3])
local getnajwyzszydim=exports.DB:pobierzWyniki("SELECT intdim_wnetrza FROM domy ORDER BY id DESC LIMIT 1")
local dim=split(getnajwyzszydim.intdim_wnetrza,",")
dim=tonumber(dim[2])
dim=dim+1
addDomek(plr,cena,miejsca_parkingowe,pozycja,z_i....
addEventHandler("onClientRender",root,function ()
if not isPedInVehicle(localPlayer) then return end
local veh = getPedOccupiedVehicle(localPlayer) local sx,sy,sz = getElementVelocity(veh) local kmhs = math.ceil(((sx^2+sy^2+sz^2)^(0.5))*155)
if kmhs >= 10 then
local view = getElementData(veh,"viewki") local view = view + 0.015 if view >= 200 then return end
local viewki = setElementData(veh,"viewki",view) setElementData(veh,"vehicle:desc","Mapa : [ "..string.format("%01d",view).." MB ]") end
end)
Witam mam problem ze skryptami na lokalnym serwerze. Wgrywam skrypty na localny serwer i wpisuje w konsoli refresh all i nic nie wypisuje,?e zosta? dodany skrypt nawet w konsoli f8 wpisuje refresh all i tez nic nie. Wpisuje refresh all nie /refresh all
[ Dodano: 2018-03-04, 22:41 ]
Tak jestem zarejestrowany i mam w acl panel admina
Witam mam skrypt z internetu na local chat i chcia?em go przerobi? ale mam problem z tym ze nick powinien przybiera? kolor teamu danego gracza.
s.lua
chat_range=100
addEventHandler("onPlayerJoin",getRootElement(),
function () bindKey(source,"l","down","chatbox","Local") end)
addEventHandler("onResourceStart",getResourceRootElement(getThisResource()),
function ()
for index, player in pairs(getElementsByType("player")) do bindKey(player,"l","down","chatbox","Local") end
end)
function isPlayerInRangeOfPoint(player,x,y,z,range) local px,py,pz=getElementPosition(player)
return ((x-px)^2+(y-py)^2+(z-pz)^2)^0.5<=range
end
function onChat(player,_,...) local pteam = getPlayerTeam (player) local tr,tg,tb = getTeamColor (pteam) local px,py,pz=getElementPosition(player) local msg = table.concat({...}, " ") local nick = getPlayerName(player)
local r,g,b = getTeamColor(getPlayerTeam(player))
for _,v in ipairs(getElementsByType("player")) do
if isPlayerInRangeOfPoint(v,px,py,pz,chat_range) then
outputChatBox("#787878(Local) ".."#tr,tg,tb"..nick,v,r,g,b,true)(msg,v,r,g,b,true) end
end
end
addCommandHandler("Local",onChat)