Dobry, mam problem dotycz?cy renderu gui pod przycisk. Chcia?bym zrobi? ?e po trzymaniu lalt pokazuje si? gui zawieszenia. Zrobi?em tak ale jest b?ad w db3 https://imgur.com/a/hzt728h
[lua]local sX, sY = guiGetScreenSize()
local screenW, screenH = guiGetScreenSize()
local font = dxCreateFont(":czcionka/f.ttf",12) or "default"
zawieszienie = false
screen = Vector2(guiGetScreenSize())
function scale_x(value)
if not value then return nil end
return (value / 1920) * screen['x']
end
function scale_y(value)
if not value then return nil end
return (value / 1080) * screen['y']
end
function isMouseIn(psx,psy,pssx,pssy,abx,aby)
if not isCursorShowing() then return end
sx,sy = guiGetScreenSize()
cx,cy=getCursorPosition()
cx,cy=cx*sx,cy*sy
if cx >= psx and cx <= psx+pssx and cy >= psy and cy <= psy+pssy then
return true,cx,cy
else
return false
end
end
Witam ponownie jako ?e nie chce mi si? ju? m?czy? oczu na wiki z LUA, wol? napisa? tutaj mianowicie chodzi o skrypt kt?ry po postrzale nadaje animacje lecz ta animacja jest jednorazowa (chodzi mi o co? w stylu animka po postrzale niczym w SAMP ) i chcia?bym aby ona by?a aktywna przez jakie? 10 - 20 sekund i dopiero po up?ywie czasu mo?na by by?o normalnie funkcjonowa?
A i je?li da rad? to czy by?a by opcja aby do tego skryptu doda? mo?liwo?? chodzenia z animacj? "PED", "FALL_collapse" g??wnie chodzi o skr?canie bo jak si? otrzyma obra?enia to posta? idzie przed siebie
[Lua]--[[
##########################################################################
## ##
## Project: 'Taser' - resource for MTA: San Andreas ##
## ##
##########################################################################
[C] Copyright 2013-2014, Falke
]]
cFunc["render_shots"] = function()
for index, tbl in pairs(cSetting["shots"]) do
dxDrawFuckedLine3D(tbl[1], tbl[2], tbl[3], tbl[4], tbl[5], tbl[6], tocolor(0, 255, 0))
end
end
Siemka tak jak w temacie nie dzia?a mi z 4x4z i gwintowane zawieszenie.Mam paczk? PYS-A i gdy wchodz? do blipu z montowaniem mk i 4x4 to gdy wbieram opcje 4x4 to pisze ze mam odda? auto do przecho a potem jak wyci?gam to nie mam tego 4x4. I nie wiem jak doda? do gui mo?liwo?ci zamontowania rh. A jak dodaje rh w bazie danych to tylko mi pisze na czacie jak wyci?gam samoch?d ?e rh jest zainstalowanie a nie dzia?a.Nie wiem jak to naprawi?.
Witam mam problem ze zrobieniem RH Paczka PYS 3.0
Nie mam poj?cia jak zrobi? Rh
wy?le kilka kod?w
1 MONTOWANIEMK
[lua]addEvent("rh", true)
addEventHandler("rh", root, function()
pojazd = getPedOccupiedVehicle(source)
if not pojazd then return end
if (getPlayerMoney(source) > tonumber(rh)) then
local id = getElementData(pojazd, "vehicle:id")
exports["pystories-db"]:dbSet("UPDATE pystories_vehicles SET rh=1 WHERE id=?", id)
outputChatBox("* Pomy?lnie zaprogramowano RH1.", source,true)
outputChatBox("* Oddaj auto do przecho aby zobaczy? efekty!", source,true)
takePlayerMoney( source, rh )
else
outputChatBox("* Nie sta? Ci? na to.", source,true)
end
end
)[/lua]
Community-rh1
[lua]]function getVehicleHandlingProperty ( element, property )
if isElement ( element ) and getElementType ( element ) == "vehicle" and type ( property ) == "string" then
local handlingTable = getVehicleHandling ( element )
local value = handlingTable[property]
if value then
return value
end
end
return false
end
function o(c)
if c then
local gora = getElementData(c, "rh:up") or 0
local s=getVehicleHandlingProperty(c,"suspensionForceLevel")
if tonumber(gora) == 4 then outputChatBox("* Osi?gn??e?(a?) limit regulacji zawieszenia !", getVehicleControll...
Witam mam nietypowy problem nie wiem z czym jest on zwi?zany w logach serwera widnieje tylko to:
[code][12:32] Incoming connection: 91.225.191.53:50796
[12:32] Incoming connection: 91.225.191.53:50797
[12:33] Incoming connection: 91.225.191.53:52878
[12:33] Incoming connection: 79.135.179.194:52351
[12:33] Incoming connection: 46.33.112.73:1144
[12:34] Kicking 79.135.179.194 because they didn't logon to the game.
[12:34] Kicking 46.33.112.73 because they didn't logon to the game.
[12:34] Incoming connection: 46.33.112.73:1145
[12:35] Incoming connection: 193.106.78.145:61438
[12:35] Kicking 193.106.78.145 because they didn't logon to the game.
[12:36] Incoming connection: 87.100.48.78:49658
[12:36] Incoming connection: 92.143.14.83:50302
[12:37] Kicking 87.100.48.78 because they didn't logon to the game.
[12:37] Kicking 92.143.14.83 because they didn't logon to the game.
[12:37] Incoming connection: 87.100.48.78:49659
[12:37] Incoming connection: 92.143.14.83:50303
[12:38] Kicking 87.100.48.78 because they didn't logon to the game.
[12:38] Kicking 92.143.14.83 because they didn't logon to the game.
[12:39] Incoming connection: 92.143.14.83:50305
[12:39] Kicking 92.143.14.83 because they didn't logon to the game.
[12:40] Incoming connection: 46.33.112.73:1166
[12:40] Incoming connection: 91.225.191.53:65000
[12:40] Kicking 46.33.112.73 because they didn't logon to the game.
[12:45] Incoming connection: 41.69.83.203:56758
[12:45] K...