Jump to content

@ need help gui upgrades vehicles @


TAPL

Recommended Posts

Posted

Hello

my old post = https://forum.multitheftauto.com/viewtopic.php?f=91&t=28541

i got this

resourceRoot = getResourceRootElement()
Window = guiCreateWindow(207,170,389,334,"Vehicle Upgrades",false)
hydrauGrid = guiCreateGridList(0.0231,0.2526,0.2776,0.5966,true,Window)
guiGridListSetSelectionMode(hydrauGrid,2)
hydrauc = guiGridListAddColumn(hydrauGrid,"Hydraulics",0.7)
wheelsGrid = guiCreateGridList(0.6941,0.2526,0.2776,0.5966,true,Window)
guiGridListSetSelectionMode(wheelsGrid,2)
wheelsc = guiGridListAddColumn(wheelsGrid,"Wheels",0.7)
okBut = guiCreateButton(0.0231,0.8905,0.4537,0.081,"Close ===> F2",true,Window)
nitroGrid = guiCreateGridList(0.3625,0.2568,0.2776,0.5966,true,Window)
guiGridListSetSelectionMode(nitroGrid,2)
nitroc = guiGridListAddColumn(nitroGrid,"Nitro",0.7)
img = guiCreateStaticImage(0.0282,0.0811,0.941,0.1622,"dl3 seartk.png",true,Window)
guiSetVisible (Window, false)
guiWindowSetSizable (Window, false)
guiMoveToBack( img )
guiSetEnabled ( img, false )
lbl = guiCreateLabel(0.509,0.8952,0.4627,0.0719,"Double click to upgrade",true,Window)
guiLabelSetColor(lbl,255,255,255)
guiLabelSetVerticalAlign(lbl,"top")
guiLabelSetHorizontalAlign(lbl,"left",false)
------------ Hydraulics Grid -------------
local hydraurow = guiGridListAddRow ( hydrauGrid )
hydraulics = guiGridListSetItemText ( hydrauGrid, hydraurow, hydrauc, "Hydraulic", false, false )
------------ Nitro Grid -------------
local nitrorow1 = guiGridListAddRow ( nitroGrid )
local nitrorow2 = guiGridListAddRow ( nitroGrid )
local nitrorow3 = guiGridListAddRow ( nitroGrid )
nitro1 = guiGridListSetItemText ( nitroGrid, nitrorow1, nitroc, "Nitro x1", false, false )
nitro2 = guiGridListSetItemText ( nitroGrid, nitrorow2, nitroc, "Nitro x2", false, false )
nitro3 = guiGridListSetItemText ( nitroGrid, nitrorow3, nitroc, "Nitro x3", false, false )
------------ Wheels Grid -------------
local wheelsrow1 = guiGridListAddRow ( wheelsGrid )
local wheelsrow2 = guiGridListAddRow ( wheelsGrid )
local wheelsrow3 = guiGridListAddRow ( wheelsGrid )
local wheelsrow4 = guiGridListAddRow ( wheelsGrid )
local wheelsrow5 = guiGridListAddRow ( wheelsGrid )
local wheelsrow6 = guiGridListAddRow ( wheelsGrid )
local wheelsrow7 = guiGridListAddRow ( wheelsGrid )
local wheelsrow8 = guiGridListAddRow ( wheelsGrid )
local wheelsrow9 = guiGridListAddRow ( wheelsGrid )
local wheelsrow10 = guiGridListAddRow ( wheelsGrid )
local wheelsrow11 = guiGridListAddRow ( wheelsGrid )
local wheelsrow12 = guiGridListAddRow ( wheelsGrid )
local wheelsrow13 = guiGridListAddRow ( wheelsGrid )
local wheelsrow14 = guiGridListAddRow ( wheelsGrid )
local wheelsrow15 = guiGridListAddRow ( wheelsGrid )
local wheelsrow16 = guiGridListAddRow ( wheelsGrid )
local wheelsrow17 = guiGridListAddRow ( wheelsGrid )
wheels1 = guiGridListSetItemText ( wheelsGrid, wheelsrow1, wheelsc, "Wheel 1", false, false )
wheels2 = guiGridListSetItemText ( wheelsGrid, wheelsrow2, wheelsc, "Wheel 2", false, false )
wheels3 = guiGridListSetItemText ( wheelsGrid, wheelsrow3, wheelsc, "Wheel 3", false, false )
wheels4 = guiGridListSetItemText ( wheelsGrid, wheelsrow4, wheelsc, "Wheel 4", false, false )
wheels5 = guiGridListSetItemText ( wheelsGrid, wheelsrow5, wheelsc, "Wheel 5", false, false )
wheels6 = guiGridListSetItemText ( wheelsGrid, wheelsrow6, wheelsc, "Wheel 6", false, false )
wheels7 = guiGridListSetItemText ( wheelsGrid, wheelsrow7, wheelsc, "Wheel 7", false, false )
wheels8 = guiGridListSetItemText ( wheelsGrid, wheelsrow8, wheelsc, "Wheel 8", false, false )
wheels9 = guiGridListSetItemText ( wheelsGrid, wheelsrow9, wheelsc, "Wheel 9", false, false )
wheels10 = guiGridListSetItemText ( wheelsGrid, wheelsrow10, wheelsc, "Wheel 10", false, false )
wheels11 = guiGridListSetItemText ( wheelsGrid, wheelsrow11, wheelsc, "Wheel 11", false, false )
wheels12 = guiGridListSetItemText ( wheelsGrid, wheelsrow12, wheelsc, "Wheel 12", false, false )
wheels13 = guiGridListSetItemText ( wheelsGrid, wheelsrow13, wheelsc, "Wheel 13", false, false )
wheels14 = guiGridListSetItemText ( wheelsGrid, wheelsrow14, wheelsc, "Wheel 14", false, false )
wheels15 = guiGridListSetItemText ( wheelsGrid, wheelsrow15, wheelsc, "Wheel 15", false, false )
wheels16 = guiGridListSetItemText ( wheelsGrid, wheelsrow16, wheelsc, "Wheel 16", false, false )
wheels17 = guiGridListSetItemText ( wheelsGrid, wheelsrow17, wheelsc, "Wheel 17", false, false )
--------------------------------------- Code ---------------------------------------
function resourceStart ()
bindKey ("F2", "down", menuShow)
end
addEventHandler ("onClientResourceStart", resourceRoot, resourceStart)
function menuShow ()
visableornot = guiGetVisible (Window)
if (visableornot == true) then
guiSetVisible (Window, false)
showCursor (false)
end
if (visableornot == false) then
guiSetVisible (Window, true)
showCursor (true)
end
end
function guiClick (button, state, absoluteX, absoluteY)
if (source == okBut) then
guiSetVisible (Window, false)
showCursor (false)
end
end
addEventHandler ("onClientGUIClick", getRootElement(), guiClick)
function triggerHydrau ()
local hcheck = guiGridListGetItemText ( hydrauGrid, guiGridListGetSelectedItem ( hydrauGrid ), 1 )
triggerServerEvent ( "hydrau", getLocalPlayer(), hcheck)
end
addEventHandler( "onClientGUIDoubleClick", hydrauGrid, triggerHydrau )
function triggerNitro ()
local ncheck = guiGridListGetItemText ( nitroGrid, guiGridListGetSelectedItem ( nitroGrid ), 1 )
triggerServerEvent ( "nitro", getLocalPlayer(), ncheck)
end
addEventHandler( "onClientGUIDoubleClick", nitroGrid, triggerNitro )
function triggerWheels ()
local wcheck = guiGridListGetItemText ( wheelsGrid, guiGridListGetSelectedItem ( wheelsGrid ), 1 )
triggerServerEvent ( "wheel", getLocalPlayer(), wcheck)
end
addEventHandler( "onClientGUIDoubleClick", wheelsGrid, triggerWheels )

so what is problem ??

gui is work

but upgrade not work what i can do ?

CiTLh.png
  • 2 weeks later...
Posted

where you got this client side?

i suppose you stole it, as this is not only generated gui but buttons actions too - and if you really wrote it, creating server-side is easy as 1-2-3..

and.. do not double-post please

we're waiting for your answer

Multi theft auto tools - replace cars and peds, move your map or compile your Lua files online!

programista php rzeszów

Need free webhosting for your small site? PM me. Need help with portforwarding? PM me. Do not PM me asking for help with scripting.

Having problems with port forwarding? Send me pm, I can do whole thing for you using TeamViewer (already helped about 20 people, no worries)!

Posted

Frankly, I stole :cry:

I know that I need to server-side

i try learn to do server-side but not succeed

so I need help

CiTLh.png
Posted

Sorry, we don't support stealing.

Spend some time on learning, stop stealing.

On wiki there's a big box called "Scripting"

https://wiki.multitheftauto.com/wiki/Main_Page

Check it out, and good luck.

Topic locked.

Multi theft auto tools - replace cars and peds, move your map or compile your Lua files online!

programista php rzeszów

Need free webhosting for your small site? PM me. Need help with portforwarding? PM me. Do not PM me asking for help with scripting.

Having problems with port forwarding? Send me pm, I can do whole thing for you using TeamViewer (already helped about 20 people, no worries)!

Guest
This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...