Allansso
Wiek: 24 Na forum: 3938 dni Posty: 386
Piwa : 1537
Witam spo?eczno?? gtao! dzisiaj pr?bowa?em zrobic ?eby komenda byla dla ACL Premium. Pr?bowa?em tym Kod: if isObjectInACLGroup ("user."..getAccountName ( getPlayerAccount ( element ) ), aclGetGroup ( "Premium" ) ) then
ale si? nie uda?e wie? poprosz? o pomoc, stawiam browarka i respekt'a! Za Ch?ci Dzi?kuje!!!!!!
1.
Kod:
function paka(source)
local x, y, z = getElementPosition(source)
local gracz = getPlayerName( source )
outputChatBox ("#FFFFFF Gracz ".. gracz .. " #FFFFFFpodklada pake, ktora wybuchnie za 10 sekund", getRootElement(), 255, 0, 0, true )
pakas = createObject ( 3013, x, y, z-0.9, 0, 0, 0 )
setTimer (destroyElement , 10000, 1, pakas )
setTimer (createExplosion , 10000, 1, x, y, z, 2 )
setTimer (createExplosion , 10500, 1, x, y, z, 2 )
setTimer (createExplosion , 11000, 1, x, y, z, 2 )
end
addCommandHandler("bombapremium", paka)
2. Kod: --[[
Resource: Neons
You can use this resource but please don't delete this information, It may be useful.
Developer: Yolos
Q&A:
Q: Can i edit this resource?
A: Yes.
Q: How to set neons?
A: Use setElementData(vehicle, "neon", ID) where ID type number 1-6
This resource use objects from grand theft auto san andreas multiplayer.
]]
--///////////////////////////////////// Settings ////////////////////////////////////////
local NID={
3962,2113,1784,2054,2428,2352
}
local postion={-1,0,-0.5}
--///////////////////////////////////// Other /////////////////////////////////
function bindHoron4(veh)
if not veh then return end
local OBJECTID=tonumber(getElementData(veh,"neony"))
if not OBJECTID then return end
if OBJECTID==0 then return end
local zalozone=getElementData(veh,"zalozone")
if (zalozone and type(zalozone)=="table") then
destroyElement(zalozone[1])
destroyElement(zalozone[2])
removeElementData(veh,"zalozone")
else
neon1=createObject(NID[OBJECTID],0,0,0)
neon2=createObject(NID[OBJECTID],0,0,0)
setElementData(veh,"zalozone", {neon1, neon2})
attachElements(neon1,veh,postion[1],postion[2],postion[3])
attachElements(neon2,veh,-postion[1],postion[2],postion[3])
setElementVelocity(veh,0, 0, 0.01)
end
end
addEventHandler("onElementDestroy", getRootElement(), function ()
if getElementType(source) == "vehicle" then
local zalozone=getElementData(source,"zalozone")
if (zalozone and type(zalozone)=="table") then
destroyElement(zalozone[1])
destroyElement(zalozone[2])
removeElementData(source,"zalozone")
end
end
end)
function outputChange(dataName,oldValue)
if getElementType(source) == "vehicle" then
if dataName == "neony" then
local zalozone=getElementData(source,"zalozone")
if (zalozone and type(zalozone)=="table") then
destroyElement(zalozone[1])
destroyElement(zalozone[2])
removeElementData(source,"zalozone")
end
bindHoron4(source)
end
end
end
addEventHandler("onElementDataChange",getRootElement(),outputChange)
function togglepanel(player)
local seat = getPedOccupiedVehicleSeat(player)
local vehicle = getPedOccupiedVehicle(player)
if vehicle and seat == 0 then
triggerClientEvent(player,"showWindow", player)
setElementVelocity(vehicle, 0, 0 ,0)
else
outputChatBox("*Nie jeste? w aucie lub nie siedzisz za kierownic?!", player, 255 ,0 ,0)
return end
end
addCommandHandler ( "neonpremium", togglepanel )
3. c.lua Kod: local sw,sh = guiGetScreenSize()
addEventHandler("onClientRender", root, function()
local rx,ry,rz = getCameraMatrix()
for i,v in ipairs(getElementsByType("vehicle", root)) do
local opis = getElementData(v, "pojazd_opis")
if opis then
local x,y,z = getElementPosition(v)
local distance = getDistanceBetweenPoints3D(rx,ry,rz,x,y,z)
if distance <= 25 then
local sx,sy = getScreenFromWorldPosition(x,y,z, 200)
if sx and sy then
dxDrawText(opis, sx-(sw/5),sy,sx+(sw/5),sy, tocolor(255, 255, 255, 155), 1.2, "default-small", "center", "center", false, true)
end
end
end
end
end)
s.lua
Kod:
addCommandHandler("vopispremium", function(plr, cmd, ...)
local opis = table.concat(arg, " ")
if (string.len(opis)<3) then
outputChatBox("U?yj: /vopis <opis>, lub /vopis usun", plr)
return
end
local auto1 = getPedOccupiedVehicle(plr)
if (not auto1) then
outputChatBox("Musisz by? w poje?dzie w kt?rym chcesz zmieni? opis.", plr, 255, 0, 0)
return
end
if (opis=="usun" or opis=="USUN") then
removeElementData(auto1, "pojazd_opis")
else
setElementData(auto1, "pojazd_opis", opis)
end
end)