Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- [code=lua]
- function onresource2Start()
- customHorn = {}
- hornNum = 0
- setHornSound = 0
- bindKey ("f7", "down", registredor)
- triggerServerEvent("setPlayerPanelIstatistik",getLocalPlayer())
- addEventHandler ( "onClientGUIClick", gRoot, Buttons )
- addEventHandler ( "onClientGUIClick", btnPreviewHorn, hornPreview, false )
- addEventHandler ( "onClientGUIClick", btnSetHornSound, setHornCheck, false )
- addEventHandler ( "onClientGUIClick", btnBuyHorn, buyHorn, false )
- addEventHandler ( "onClientGUIClick", gridHorns, updateHornPriceLabel, false )
- addEventHandler ( "onClientGUIClick", Gui_Sol, sam, false )
- addEventHandler ( "onClientGUIClick", Gui_Sag, sol, false )
- addEventHandler ( "onClientGUIClick", Gui_Jantbuy, save, false )
- addEventHandler ( "onClientGUIClick", sendButxxs, giveMoney, false )
- end
- addEventHandler("onClientResourceStart", getResourceRootElement(getThisResource()), onresource2Start)
- function removeColorCoding (name)
- return type(name)=="string" and string.gsub(name, "#%x%x%x%x%x%x", "") or name
- end
- function onresource2Startx22x()
- customHorn = {}
- hornNum = 0
- setHornSound = 0
- end
- function registredor()
- triggerServerEvent("setPlayerPanelIstatistik",getLocalPlayer())
- triggerServerEvent ("iAmLoggedIn", getLocalPlayer())
- addEventHandler ( "onClientGUIClick", gRoot, Buttons )
- end
- function setPlayerPanelIstatistik(para,dmoyun,dmkazan,point,rank,rankx,ddoyun,ddkazan,play,son,dmoran,ddoran,hunter)
- -- kasim 1
- guiSetText(serkan1,""..tostring(para).."$")
- guiSetText(serkanzx,tostring(dmoyun))
- guiSetText(serkan3,tostring(dmkazan))
- guiSetText(serkan4,tostring(point))
- guiSetText(serkan5,tostring(rank))
- guiSetText(serkan6,tostring(rankx))
- guiSetText(serkan7,tostring(ddoyun))
- guiSetText(serkan8,tostring(ddkazan))
- --kasim 2
- guiSetText(serkan9,""..tostring(play).."dk")
- guiSetText(serkan10,tostring(son))
- guiSetText(serkan11,""..tostring(dmoran).."%")
- guiSetText(serkan12,""..tostring(ddoran).."%")
- --guiSetText(serkan13,tostring(hunter))
- end
- addEventHandler("onClientResourceStart",getResourceRootElement(getThisResource()),setPlayerPanelIstatistik)
- addEvent("setPlayerPanelIstatistik",true)
- addEventHandler("setPlayerPanelIstatistik",getRootElement(),setPlayerPanelIstatistik)
- function showUserPanel (text)
- getVisible = guiGetVisible (window)
- if (getVisible == true) then
- guiSetVisible (window, false)
- showCursor (false)
- guiSetInputEnabled(false)
- triggerServerEvent("setPlayerPanelIstatistik",getLocalPlayer())
- else
- guiSetVisible (window, true)
- showCursor (true)
- guiSetInputEnabled(true)
- triggerServerEvent("setPlayerPanelIstatistik",getLocalPlayer())
- end
- if text ~= false then
- if editChangeWinText then
- guiSetText(editChangeWinText, text)
- end
- else
- if editChangeWinText then
- guiSetText(editChangeWinText, "Win Text TRF clan by ozel oyuncular vyrobil by 8Q (renkkodlari aktiftir)")
- end
- end
- end
- addEvent("YesYouAreLogedIn", true)
- addEventHandler("YesYouAreLogedIn", getRootElement(), showUserPanel )
- font8q3 = guiCreateFont( "font.ttf" , 20 )
- font8q3x = guiCreateFont( "font.ttf" , 16 )
- font8q = guiCreateFont( "font.ttf" , 30 )
- font8qx = guiCreateFont( "font.ttf" , 12 )
- font8qxjx = guiCreateFont( "font.ttf" , 40 )
- font8qxj = guiCreateFont( "font2.ttf" , 40 )
- font8qxjxx = guiCreateFont( "font2.ttf" , 30 )
- font8qxjxxs = guiCreateFont( "font2.ttf" , 40 )
- yapim2 = guiCreateFont( "font.ttf" , 10 )
- font8qpara = guiCreateFont( "font.ttf" , 13 )
- butonfont = guiCreateFont( "font3.ttf" , 10 )
- addEventHandler ( "onClientGUIClick", gRoot, Buttons )
- -----------------------------------------------------------------------------
- screenWidth,screenHeight = guiGetScreenSize()
- mainWindowWidth = 619
- mainWindowHeight = 365
- selectedR, selectedG, selectedB = 255, 255, 255
- tabs = {}
- window = guiCreateStaticImage( screenWidth/2-mainWindowWidth/2,screenHeight/2-mainWindowHeight/2,mainWindowWidth,mainWindowHeight, "files/window.png", false )
- guiWindowSetMovable(window, true)
- guiWindowSetSizable(window, false)
- --tabs[1] = guiCreateTabPanel(screenWidth/2-mainWindowWidth/2,screenHeight/2-mainWindowHeight/2,mainWindowWidth,mainWindowHeight,false,window)
- tabs[1] = guiCreateTabPanel(0,20,mainWindowWidth,mainWindowHeight,false,window)
- tabs[10] = guiCreateTab("Stats",tabs[1])
- tabs[5] = guiCreateTab("Harita",tabs[1])
- --tabs[8] = guiCreateTab("Korna",tabs[1])
- tabs[50] = guiCreateTab("wheels",tabs[1])
- tabs[2] = guiCreateTab("Arac Renk",tabs[1])
- GUIEditor_Button = {}
- GUIEditor_Label = {}
- serkan = {}
- Gui_Image = {}
- -----------------------------------
- -- wheels
- Gui_Image1 = guiCreateStaticImage(155,8,189,162,"images/1.jpg",false,tabs[50])
- Gui_Image2 = guiCreateStaticImage(155,8,189,162,"images/2.jpg",false,tabs[50])
- Gui_Image3 = guiCreateStaticImage(155,8,189,162,"images/3.jpg",false,tabs[50])
- Gui_Image4 = guiCreateStaticImage(155,8,189,162,"images/4.jpg",false,tabs[50])
- Gui_Image5 = guiCreateStaticImage(155,8,189,162,"images/5.jpg",false,tabs[50])
- Gui_Image6 = guiCreateStaticImage(155,8,189,162,"images/6.jpg",false,tabs[50])
- Gui_Image7 = guiCreateStaticImage(155,8,189,162,"images/7.jpg",false,tabs[50])
- Gui_Image8 = guiCreateStaticImage(155,8,189,162,"images/8.jpg",false,tabs[50])
- Gui_Image9 = guiCreateStaticImage(155,8,189,162,"images/9.jpg",false,tabs[50])
- Gui_Image10 = guiCreateStaticImage(155,8,189,162,"images/10.jpg",false,tabs[50])
- Gui_Image11 = guiCreateStaticImage(155,8,189,162,"images/11.jpg",false,tabs[50])
- Gui_Image12 = guiCreateStaticImage(155,8,189,162,"images/12.jpg",false,tabs[50])
- Gui_Image13 = guiCreateStaticImage(155,8,189,162,"images/13.jpg",false,tabs[50])
- Gui_Image14 = guiCreateStaticImage(155,8,189,162,"images/14.jpg",false,tabs[50])
- Gui_Image15 = guiCreateStaticImage(155,8,189,162,"images/15.jpg",false,tabs[50])
- Gui_Image16 = guiCreateStaticImage(155,8,189,162,"images/16.jpg",false,tabs[50])
- Gui_JantLabel = guiCreateLabel(360,50,1000,1000,"",false,tabs[50])
- guiSetFont(Gui_JantLabel,font8qxjx)
- guiLabelSetColor(Gui_JantLabel,255,102,0)
- guiSetText (Gui_JantLabel, "1 / 16")
- Gui_Sol = guiCreateButton(130,180,100,50,"Back",false,tabs[50])
- Gui_Sag = guiCreateButton(250,180,100,50,"Next",false,tabs[50])
- Gui_Jantbuy = guiCreateButton(180,250,130,27,"Buy",false,tabs[50])
- guiSetFont(Gui_Sol,butonfont)
- guiSetFont(Gui_Sag,butonfont)
- guiSetFont(Gui_Jantbuy,butonfont)
- --[[
- Gui_JantLabelx = guiCreateLabel(20,50,100,100,"ARK",false,tabs[50])
- guiSetFont(Gui_JantLabelx,font8qxj)
- guiLabelSetColor(Gui_JantLabelx,255,102,0)
- --]]
- GUIEditor_Label[50] = guiCreateLabel(0.54,0.8585,0.5905,0.952,"Prince: $ 31.000",true,tabs[50])
- guiLabelSetColor(GUIEditor_Label[50],255,102,0)
- guiSetFont(GUIEditor_Label[50],font8q3)
- guiLabelSetVerticalAlign(GUIEditor_Label[50],"top")
- guiLabelSetHorizontalAlign(GUIEditor_Label[50],"left",false)
- guiSetVisible(Gui_Image1,true)
- guiSetVisible(Gui_Image2,false)
- guiSetVisible(Gui_Image3,false)
- guiSetVisible(Gui_Image4,false)
- guiSetVisible(Gui_Image5,false)
- guiSetVisible(Gui_Image6,false)
- guiSetVisible(Gui_Image7,false)
- guiSetVisible(Gui_Image8,false)
- guiSetVisible(Gui_Image9,false)
- guiSetVisible(Gui_Image10,false)
- guiSetVisible(Gui_Image11,false)
- guiSetVisible(Gui_Image12,false)
- guiSetVisible(Gui_Image13,false)
- guiSetVisible(Gui_Image14,false)
- guiSetVisible(Gui_Image15,false)
- guiSetVisible(Gui_Image16,false)
- -- istatik
- -- kisim 1
- GUIEditor_Label[1] = guiCreateLabel(0.0291,0.1185,0.1905,0.052,"Para :",true,tabs[10])
- guiLabelSetColor(GUIEditor_Label[1],255,102,0)
- guiSetFont(GUIEditor_Label[1],font8qx)
- guiLabelSetVerticalAlign(GUIEditor_Label[1],"top")
- guiLabelSetHorizontalAlign(GUIEditor_Label[1],"left",false)
- GUIEditor_Label[20] = guiCreateLabel(0.0291,0.2185,0.8905,0.052,"DM/Toplam Oyun:",true,tabs[10])
- guiLabelSetColor(GUIEditor_Label[20],255,102,0)
- guiSetFont(GUIEditor_Label[20],font8qx)
- guiLabelSetVerticalAlign(GUIEditor_Label[20],"top")
- guiLabelSetHorizontalAlign(GUIEditor_Label[20],"left",false)
- GUIEditor_Label[3] = guiCreateLabel(0.0291,0.3185,0.1905,0.052,"DM/Kazanma:",true,tabs[10])
- guiLabelSetColor(GUIEditor_Label[3],255,102,0)
- guiSetFont(GUIEditor_Label[3],font8qx)
- guiLabelSetVerticalAlign(GUIEditor_Label[3],"top")
- guiLabelSetHorizontalAlign(GUIEditor_Label[3],"left",false)
- GUIEditor_Label[4] = guiCreateLabel(0.0291,0.4185,0.1905,0.052,"Point:",true,tabs[10])
- guiLabelSetColor(GUIEditor_Label[4],255,102,0)
- guiSetFont(GUIEditor_Label[4],font8qx)
- guiLabelSetVerticalAlign(GUIEditor_Label[4],"top")
- guiLabelSetHorizontalAlign(GUIEditor_Label[4],"left",false)
- GUIEditor_Label[5] = guiCreateLabel(0.0291,0.5185,0.1905,0.052,"Rank:",true,tabs[10])
- guiLabelSetColor(GUIEditor_Label[5],255,102,0)
- guiSetFont(GUIEditor_Label[5],font8qx)
- guiLabelSetVerticalAlign(GUIEditor_Label[5],"top")
- guiLabelSetHorizontalAlign(GUIEditor_Label[5],"left",false)
- GUIEditor_Label[6] = guiCreateLabel(0.0291,0.6185,0.1905,0.052,"Level:",true,tabs[10])
- guiLabelSetColor(GUIEditor_Label[6],255,102,0)
- guiSetFont(GUIEditor_Label[6],font8qx)
- guiLabelSetVerticalAlign(GUIEditor_Label[6],"top")
- guiLabelSetHorizontalAlign(GUIEditor_Label[6],"left",false)
- GUIEditor_Label[7] = guiCreateLabel(0.0291,0.7185,0.8905,0.052,"DD/Toplam Oyun:",true,tabs[10])
- guiLabelSetColor(GUIEditor_Label[7],255,102,0)
- guiSetFont(GUIEditor_Label[7],font8qx)
- guiLabelSetVerticalAlign(GUIEditor_Label[7],"top")
- guiLabelSetHorizontalAlign(GUIEditor_Label[7],"left",false)
- GUIEditor_Label[8] = guiCreateLabel(0.0291,0.8185,0.8905,0.052,"DD/Kazanma:",true,tabs[10])
- guiLabelSetColor(GUIEditor_Label[8],255,102,0)
- guiSetFont(GUIEditor_Label[8],font8qx)
- guiLabelSetVerticalAlign(GUIEditor_Label[8],"top")
- guiLabelSetHorizontalAlign(GUIEditor_Label[8],"left",false)
- -------------------------------------------------------------------------------------
- -- kasim 2
- GUIEditor_Label[9] = guiCreateLabel(0.5,0.1185,0.1905,0.052,"Oyun zamani:",true,tabs[10])
- guiLabelSetColor(GUIEditor_Label[9],255,102,0)
- guiSetFont(GUIEditor_Label[9],font8qx)
- guiLabelSetVerticalAlign(GUIEditor_Label[9],"top")
- guiLabelSetHorizontalAlign(GUIEditor_Label[9],"left",false)
- GUIEditor_Label[10] = guiCreateLabel(0.5,0.2185,0.1905,0.052,"Son cikis:",true,tabs[10])
- guiLabelSetColor(GUIEditor_Label[10],255,102,0)
- guiSetFont(GUIEditor_Label[10],font8qx)
- guiLabelSetVerticalAlign(GUIEditor_Label[10],"top")
- guiLabelSetHorizontalAlign(GUIEditor_Label[10],"left",false)
- GUIEditor_Label[11] = guiCreateLabel(0.5,0.3185,0.1905,0.052,"DM Oran:",true,tabs[10])
- guiLabelSetColor(GUIEditor_Label[11],255,102,0)
- guiSetFont(GUIEditor_Label[11],font8qx)
- guiLabelSetVerticalAlign(GUIEditor_Label[11],"top")
- guiLabelSetHorizontalAlign(GUIEditor_Label[11],"left",false)
- GUIEditor_Label[12] = guiCreateLabel(0.5,0.4185,0.1905,0.052,"DD Oran:",true,tabs[10])
- guiLabelSetColor(GUIEditor_Label[12],255,102,0)
- guiSetFont(GUIEditor_Label[12],font8qx)
- guiLabelSetVerticalAlign(GUIEditor_Label[12],"top")
- guiLabelSetHorizontalAlign(GUIEditor_Label[12],"left",false)
- GUIEditor_Label[13] = guiCreateLabel(0.5,0.7185,0.5905,0.952,"",true,tabs[10])
- guiLabelSetColor(GUIEditor_Label[13],255,0,0)
- guiSetFont(GUIEditor_Label[13],font8q3)
- guiLabelSetVerticalAlign(GUIEditor_Label[13],"top")
- guiLabelSetHorizontalAlign(GUIEditor_Label[13],"left",false)
- --[[
- GUIEditor_Label[13] = guiCreateLabel(0.5,0.5185,0.1905,0.052,"Hunter:",true,tabs[10])
- guiLabelSetColor(GUIEditor_Label[13],255,102,0)
- guiSetFont(GUIEditor_Label[13],font8qx)
- guiLabelSetVerticalAlign(GUIEditor_Label[13],"top")
- guiLabelSetHorizontalAlign(GUIEditor_Label[13],"left",false) --]]
- --kasim 1 (2)
- serkan1 = guiCreateLabel(0.08,0.1185,0.4841,0.0578,"$0",true,tabs[10])
- guiLabelSetColor(serkan1,255 , 255, 255)
- guiSetFont(serkan1,font8qx)
- guiLabelSetVerticalAlign(serkan1,"top")
- guiLabelSetHorizontalAlign(serkan1,"center",false)
- serkanzx = guiCreateLabel(0.08,0.2185,0.4841,0.0578,"0",true,tabs[10])
- guiLabelSetColor(serkanzx,255 , 255, 255)
- guiSetFont(serkanzx,font8qx)
- guiLabelSetVerticalAlign(serkanzx,"top")
- guiLabelSetHorizontalAlign(serkanzx,"center",false)
- serkan3 = guiCreateLabel(0.08,0.3185,0.4841,0.0578,"0",true,tabs[10])
- guiLabelSetColor(serkan3,255 , 255, 255)
- guiSetFont(serkan3,font8qx)
- guiLabelSetVerticalAlign(serkan3,"top")
- guiLabelSetHorizontalAlign(serkan3,"center",false)
- serkan4 = guiCreateLabel(0.08,0.4185,0.4841,0.0578,"0",true,tabs[10])
- guiLabelSetColor(serkan4,255 , 255, 255)
- guiSetFont(serkan4,font8qx)
- guiLabelSetVerticalAlign(serkan4,"top")
- guiLabelSetHorizontalAlign(serkan4,"center",false)
- serkan5 = guiCreateLabel(0.08,0.5185,0.4841,0.0578,"0",true,tabs[10])
- guiLabelSetColor(serkan5,255 , 255, 255)
- guiSetFont(serkan5,font8qx)
- guiLabelSetVerticalAlign(serkan5,"top")
- guiLabelSetHorizontalAlign(serkan5,"center",false)
- serkan6 = guiCreateLabel(0.08,0.6185,0.4841,0.0578,"N/A",true,tabs[10])
- guiLabelSetColor(serkan6,255 , 255, 255)
- guiSetFont(serkan6,font8qx)
- guiLabelSetVerticalAlign(serkan6,"top")
- guiLabelSetHorizontalAlign(serkan6,"center",false)
- serkan7 = guiCreateLabel(0.08,0.7185,0.4841,0.0578,"0",true,tabs[10])
- guiLabelSetColor(serkan7,255 , 255, 255)
- guiSetFont(serkan7,font8qx)
- guiLabelSetVerticalAlign(serkan7,"top")
- guiLabelSetHorizontalAlign(serkan7,"center",false)
- serkan8 = guiCreateLabel(0.08,0.8185,0.4841,0.0578,"0",true,tabs[10])
- guiLabelSetColor(serkan8,255 , 255, 255)
- guiSetFont(serkan8,font8qx)
- guiLabelSetVerticalAlign(serkan8,"top")
- guiLabelSetHorizontalAlign(serkan8,"center",false)
- ---------------------------------------------------------------------------------
- -- kisim (2)
- serkan9 = guiCreateLabel(0.58,0.1185,0.4841,0.0578,"0",true,tabs[10])
- guiLabelSetColor(serkan9,255 , 255, 255)
- guiSetFont(serkan9,font8qx)
- guiLabelSetVerticalAlign(serkan9,"top")
- guiLabelSetHorizontalAlign(serkan9,"center",false)
- serkan10 = guiCreateLabel(0.58,0.2185,0.4841,0.0578,"0",true,tabs[10])
- guiLabelSetColor(serkan10,255 , 255, 255)
- guiSetFont(serkan10,font8qx)
- guiLabelSetVerticalAlign(serkan10,"top")
- guiLabelSetHorizontalAlign(serkan10,"center",false)
- serkan11 = guiCreateLabel(0.58,0.3185,0.4841,0.0578,"0",true,tabs[10])
- guiLabelSetColor(serkan11,255 , 255, 255)
- guiSetFont(serkan11,font8qx)
- guiLabelSetVerticalAlign(serkan11,"top")
- guiLabelSetHorizontalAlign(serkan11,"center",false)
- serkan12 = guiCreateLabel(0.58,0.4185,0.4841,0.0578,"0",true,tabs[10])
- guiLabelSetColor(serkan12,255 , 255, 255)
- guiSetFont(serkan12,font8qx)
- guiLabelSetVerticalAlign(serkan12,"top")
- guiLabelSetHorizontalAlign(serkan12,"center",false)
- --[[
- serkan13 = guiCreateLabel(0.58,0.4185,0.4841,0.0578,"0",true,tabs[10])
- guiLabelSetColor(serkan13,255 , 255, 255)
- guiSetFont(serkan13,font8qx)
- guiLabelSetVerticalAlign(serkan13,"top")
- guiLabelSetHorizontalAlign(serkan13,"center",false)
- --]]
- ------------------------------------------------------------------------------
- --[[
- -- trubky
- -- Create horns
- hornName={
- "Default GTA horn",
- "Airhorn",
- "Clown",
- "Train",
- "Fog horn",
- "Submarine",
- "Military trumpet",
- "Mr. Whoopie",
- "Meep Meep",
- "Tra-la-la",
- "Yehaw",
- "Train #2",
- "Magoo",
- "Ahooga",
- "Cluck",
- "Carhorn",
- "Shipshorn"}
- hornPrice={
- "N/A",
- 2000,
- 4000,
- 6000,
- 8000,
- 10000,
- 12000,
- 14000,
- 16000,
- 18000,
- 20000,
- 22000,
- 24000,
- 26000,
- 28000,
- 30000,
- 31310
- }
- hornSound={
- "sounds/airhorn.wav",
- "sounds/clownhorn.mp3",
- "sounds/trainhorn.mp3",
- "sounds/cargoshiphorn.mp3",
- "sounds/submarinehorn.wav",
- "sounds/generalleehorn.mp3",
- "sounds/whoopiehorn.mp3",
- "sounds/meepmeep.mp3",
- "sounds/tralalala.mp3",
- "sounds/yehaw.mp3",
- "sounds/roadtrain.mp3",
- "sounds/magoo.mp3",
- "sounds/ahooga.mp3",
- "sounds/cluck.mp3",
- "sounds/carhorn.mp3",
- "sounds/shipshorn.mp3"}
- -- horn interface
- gridHorns = guiCreateGridList(24,56,191,260,false,tabs[8])
- guiGridListAddColumn(gridHorns,"Horn",0.6)
- guiGridListAddColumn(gridHorns,"Price",0.3)
- guiGridListSetSortingEnabled(gridHorns,false)
- for _,horn in ipairs(hornName) do
- local row = guiGridListAddRow(gridHorns)
- guiGridListSetItemText(gridHorns,row,1,horn,false,false)
- guiGridListSetItemColor(gridHorns,row,1,180,180,180,255)
- end
- for _,price in ipairs(hornPrice) do
- guiGridListSetItemText(gridHorns,_-1,2,price,false,false)
- guiGridListSetItemColor(gridHorns,_-1,2,180,180,180,255)
- end
- lblCustomHornInfo = guiCreateLabel(30,10,170,50,"Horns",false,tabs[8])
- guiLabelSetColor(lblCustomHornInfo,255,120,0)
- guiSetFont(lblCustomHornInfo,font8qxjxx)
- btnSetHornSound = guiCreateButton(220,250,120,40,"selects Use",false,tabs[8])
- guiSetEnabled(btnSetHornSound,false)
- guiSetFont(btnSetHornSound,butonfont)
- --xssbtnPreviewHornxx = guiCreateStaticImage(225,80,83,26,"files/window.png",false,tabs[8])
- btnPreviewHorn = guiCreateButton(225,80,95,30,"Try honk",false,tabs[8])
- guiSetEnabled(btnPreviewHorn,false)
- guiSetFont(btnPreviewHorn,butonfont)
- btnBuyHorn = guiCreateButton(225,167,95,30,"Buy-in",false,tabs[8])
- guiSetEnabled(btnBuyHorn,false)
- guiSetFont(btnBuyHorn,butonfont)
- lblHornPriceNot = guiCreateLabel(225,127,83,15,"price",false,tabs[8])
- guiLabelSetColor(lblHornPriceNot,255,120,0)
- guiLabelSetHorizontalAlign(lblHornPriceNot,"center",false)
- guiSetFont(lblHornPriceNot,font8qx)
- lblHornPrice = guiCreateLabel(225,142,83,15,"N/A",false,tabs[8])
- guiLabelSetVerticalAlign(lblHornPrice,"center")
- guiLabelSetHorizontalAlign(lblHornPrice,"center",false)
- guiSetFont(lblHornPrice,font8qx)
- lblCurrentHorn = guiCreateLabel(370,220,200,100,"",false,tabs[8])
- guiSetFont(lblCurrentHorn,font8q3x)
- lblCurrentHornxz = guiCreateLabel(365,170,170,100,"Horns",false,tabs[8])
- guiSetFont(lblCurrentHornxz,font8qxjxxs)
- guiLabelSetColor(lblCurrentHornxz,255,120,0)
- kornaimg = guiCreateStaticImage(0.55,0.08,0.4,0.4,"files/korna.png",true,tabs[8])
- lblCustomHornInfox = guiCreateLabel(500,700,143,16,"Custom horn sounds",false,tabs[8])
- guiLabelSetColor(lblCustomHornInfox,255,120,0)
- guiSetFont(lblCustomHornInfox,font8q)
- --]]
- -------------------------------------------------------------
- lblBuyColor = guiCreateLabel(25,25,560,15,"Change color by your vehicle.",false,tabs[2])
- guiLabelSetHorizontalAlign(lblBuyColor, "center")
- --guiLabelSetVerticalAlign(lblBuyColor, "center")
- guiSetFont(lblBuyColor,font8qx)
- btnMixColor = guiCreateButton(25,50,170,35,"Renk 1 Sec",false,tabs[2])
- guiSetFont(btnMixColor,butonfont)
- btnMixColor2 = guiCreateButton(25,90,170,35,"Renk 2 Sec",false,tabs[2])
- guiSetFont(btnMixColor2,butonfont)
- btnBuyColor = guiCreateButton(215,50,170,75,"color Buy\n$ 25.000",false,tabs[2])
- guiSetFont(btnBuyColor,butonfont)
- btnRmvColor = guiCreateButton(405,50,170,75,"color Remove\nBedava!",false,tabs[2])
- guiSetFont(btnRmvColor,butonfont)
- asfg = guiCreateLabel(25,130,560,15,"______________________________________________________________________________",false,tabs[2])
- guiLabelSetHorizontalAlign(asfg, "center")
- btnDisco = guiCreateButton(215,170,170,150,"Disco Far Al\n$ 100.000",false,tabs[2])
- guiSetFont(btnDisco,butonfont)
- btnBuyLight = guiCreateButton(25,170,170,70,"Normal Far\n$ 15.000",false,tabs[2])
- guiSetFont(btnBuyLight,butonfont)
- btnBChangeLight = guiCreateButton(25,250,170,70,"Shadow Color exchange",false,tabs[2])
- guiSetFont(btnBChangeLight,butonfont)
- btnDisco2 = guiCreateButton(405,170,170,150,"Remove all\nBedava!",false,tabs[2])
- guiSetFont(btnDisco2,butonfont)
- -------------------------------------------------------------
- btnClose = guiCreateButton(575,10,20,20,"X",false,tabs[5])
- guiSetFont(btnClose,butonfont)
- btnClose2 = guiCreateButton(575,10,20,20,"X",false,tabs[2])
- guiSetFont(btnClose2,butonfont)
- guiSetVisible(window,false)
- btnClose3 = guiCreateButton(575,10,20,20,"X",false,tabs[10])
- guiSetFont(btnClose3,butonfont)
- btnClose5 = guiCreateButton(575,10,20,20,"X",false,tabs[50])
- guiSetFont(btnClose5,butonfont)
- -- btnClose6 = guiCreateButton(575,10,20,20,"X",false,tabs[8])
- --guiSetFont(btnClose6,butonfont)
- guiSetFont(btnClose7,butonfont)
- gridMaps = guiCreateGridList(20,20,400,250,false,tabs[5])
- guiGridListSetSortingEnabled(gridMaps,false)
- guiGridListAddColumn(gridMaps,"Map name",0.9)
- lblMapsInfo = guiCreateLabel(342,210,245,45,"",false,tabs[5])
- guiLabelSetVerticalAlign(lblMapsInfo,"center")
- guiLabelSetHorizontalAlign(lblMapsInfo,"center",true)
- guiSetFont(lblMapsInfo,font8qx)
- lblSearchForMaps = guiCreateLabel(25,280,101,14,"Search",false,tabs[5])
- guiLabelSetColor(lblSearchForMaps,255,120,0)
- guiLabelSetVerticalAlign(lblSearchForMaps,"center")
- guiSetFont(lblSearchForMaps,font8qx)
- editMapSearch = guiCreateEdit(132,280,210,30,"",false,tabs[5])
- btnBuyNextMap = guiCreateButton(433,136,169,44,"Buy Map \n $5000",false,tabs[5])
- guiSetFont(btnBuyNextMap,butonfont)
- function cursorInfo()
- local showing = isCursorShowing ()
- if showing then -- if the cursor is showing
- local screenx, screeny, worldx, worldy, worldz = getCursorPosition()
- outputChatBox( string.format( "Cursor screen position (relative): X=%.4f Y=%.4f", screenx, screeny ) ) -- make the accuracy of floats 4 decimals
- outputChatBox( string.format( "Cursor world position: X=%.4f Y=%.4f Z=%.4f", worldx, worldy, worldz ) ) -- make the accuracy of floats 4 decimals accurate
- else
- outputChatBox( "Your cursor is not showing." )
- end
- end
- addCommandHandler( "pos", cursorInfo )
- isTabPremCreated = false
- function checkIfPlayerIsPrem (isPrem)
- if isPrem == true then
- if isTabPremCreated == false then
- PremTab = guiCreateTab("MTA-TRF",tabs[1])
- btnClose3 = guiCreateButton(575,10,20,20,"X",false,PremTab)
- btnChangeChatColor = guiCreateButton(10,10,555,50,"Chat Renk Bakımda..",false,PremTab)
- addEventHandler ( "onClientGUIClick", btnClose3, btnCloseWIndowsss3, false )
- addEventHandler ( "onClientGUIClick", btnChangeChatColor, changechatColor_func, false )
- guiCreateLabel(10,62,580,15,"__________________________________________________________________________________",false,PremTab)
- editChangeWinText = guiCreateEdit(10,90,580,21,"Win Text TRF clan by ozel oyuncular vyrobil by 8Q (renkkodlari aktiftir)",false,PremTab)
- btnChangeWinText = guiCreateButton(10,121,580,50,"Change Win-Text",false,PremTab)
- addEventHandler ( "onClientGUIClick", btnChangeWinText, changeWinText_func, false )
- thxSagung = guiCreateLabel(10,181,580,150,"MTA-TRF 8Q",false,PremTab)
- guiLabelSetColor(thxSagung, 255, 102, 0)
- guiLabelSetHorizontalAlign(thxSagung, "center")
- guiLabelSetVerticalAlign(thxSagung, "center")
- guiSetFont(thxSagung,"sa-header")
- isTabPremCreated = true
- end
- elseif isPrem == false then
- if isTabPremCreated == true then
- guiDeleteTab(PremTab,tabs[1])
- removeEventHandler ( "onClientGUIClick", btnClose3, btnCloseWIndowsss3, false )
- removeEventHandler ( "onClientGUIClick", btnChangeChatColor, changechatColor_func, false )
- removeEventHandler ( "onClientGUIClick", btnChangeWinText, changeWinText_func, false )
- isTabPremCreated = false
- end
- end
- end
- addEvent("playerIsPremium", true)
- addEventHandler("playerIsPremium", getRootElement(), checkIfPlayerIsPrem )
- function giveMoney(source)
- outputChatBox("What is Under Construction basıyon amk diyoz!",source,255,0,0,true)
- end
- function changechatColor_func()
- exports.cpicker:openPicker("cPicChatColor", "#FFFFFF", "Select your Chatcolor")
- showCursor(false)
- guiSetVisible (window, false)
- end
- function changeWinText_func()
- wintext = guiGetText(editChangeWinText)
- if wintext ~= "" then
- triggerServerEvent("buyWinText", getLocalPlayer(), wintext)
- else
- outputChatBox("Please enter a text.", 255, 0, 0)
- end
- end
- showHunterReached = false
- function playerHunterAlarmSound()
- showHunterReached = true
- playSound("files/hunter.mp3", false)
- timerTime = 850
- setTimer(function()
- showHunterReached = false
- setTimer(function()
- showHunterReached = true
- setTimer(function()
- showHunterReached = false
- setTimer(function()
- showHunterReached = true
- setTimer(function()
- showHunterReached = false
- setTimer(function()
- showHunterReached = true
- setTimer(function()
- showHunterReached = false
- setTimer(function()
- showHunterReached = true
- setTimer(function()
- showHunterReached = false
- end, timerTime, 1)
- end, timerTime, 1)
- end, timerTime, 1)
- end, timerTime, 1)
- end, timerTime, 1)
- end, timerTime, 1)
- end, timerTime, 1)
- end, timerTime, 1)
- end, timerTime, 1)
- end
- addEvent("playerHunterAlarmSound", true)
- addEventHandler("playerHunterAlarmSound", getRootElement(), playerHunterAlarmSound )
- winnerText = " "
- winnerText2 = " "
- timeTimer = 6000
- showWinnerText = false
- function showDDWinnerAndHisText (text)
- winnerText = text
- winnerText2 = winnerText:gsub("#%x%x%x%x%x%x","")
- showWinnerText = true
- setTimer(function()
- winnerText = " "
- winnerText2 = " "
- showWinnerText = false
- end, timeTimer, 1)
- end
- addEvent("showDDWinnerAndHisText", true)
- addEventHandler("showDDWinnerAndHisText", getRootElement(), showDDWinnerAndHisText )
- font = guiCreateFont("font.ttf", 1)
- screenWidth, screenHeight = guiGetScreenSize ( )
- function drawHunterReached()
- if showHunterReached then
- local hud1 = dxDrawText("Hunter reached", 0+2, 0+2, screenWidth+2, screenHeight+2, tocolor ( 0, 0, 0, 255 ), 2, "bankgothic","center","center")
- local hud1 = dxDrawText("Hunter reached", 0, 0, screenWidth, screenHeight, tocolor (math.random(255),math.random(255),math.random(255),255), 2, "bankgothic","center","center")
- elseif showWinnerText then
- dxDrawText(winnerText2, 0+2, 0+2, screenWidth+2, screenHeight/3+2, tocolor ( 0, 0, 0, 255 ), 1.3, "bankgothic","center","center")
- dxDrawColorText(winnerText, 0, 0, screenWidth, screenHeight/3, tocolor ( 255, 0, 0, 255 ), 1.3, "bankgothic","center","center")
- end
- end
- addEventHandler("onClientRender", getRootElement(), drawHunterReached)
- setTimer( function()
- hud1:setColor(tocolor(math.random(255),math.random(255),math.random(255),255))
- end,2000,0)
- function dxDrawColorText(str, ax, ay, bx, by, color, scale, font, alignX, alignY)
- if alignX then
- if alignX == "center" then
- local w = dxGetTextWidth(str:gsub("#%x%x%x%x%x%x",""), scale, font)
- ax = ax + (bx-ax)/2 - w/2
- elseif alignX == "right" then
- local w = dxGetTextWidth(str:gsub("#%x%x%x%x%x%x",""), scale, font)
- ax = bx - w
- end
- end
- if alignY then
- if alignY == "center" then
- local h = dxGetFontHeight(scale, font)
- ay = ay + (by-ay)/2 - h/2
- elseif alignY == "bottom" then
- local h = dxGetFontHeight(scale, font)
- ay = by - h
- end
- end
- local pat = "(.-)#(%x%x%x%x%x%x)"
- local s, e, cap, col = str:find(pat, 1)
- local last = 1
- while s do
- if cap == "" and col then color = tocolor(tonumber("0x"..col:sub(1, 2)), tonumber("0x"..col:sub(3, 4)), tonumber("0x"..col:sub(5, 6)), 255) end
- if s ~= 1 or cap ~= "" then
- local w = dxGetTextWidth(cap, scale, font)
- dxDrawText(cap, ax, ay, ax + w, by, color, scale, font)
- ax = ax + w
- color = tocolor(tonumber("0x"..col:sub(1, 2)), tonumber("0x"..col:sub(3, 4)), tonumber("0x"..col:sub(5, 6)), 255)
- end
- last = e + 1
- s, e, cap, col = str:find(pat, last)
- end
- if last <= #str then
- cap = str:sub(last)
- local w = dxGetTextWidth(cap, scale, font)
- dxDrawText(cap, ax, ay, ax + w, by, color, scale, font)
- end
- end
- -- Get all maps on server
- function getMaps()
- totalServerMaps = 0
- totalDmMaps = 0
- totalDdMaps = 0
- setTimer(callServerfunction,500,1,"getServerMaps",getLocalPlayer())
- end
- addEventHandler("onClientResourceStart",getResourceRootElement(getThisResource()),getMaps)
- function btnCloseWIndowsss(ele)
- guiSetVisible (window, false)
- showCursor (false)
- guiSetInputEnabled(false)
- end
- addEventHandler ( "onClientGUIClick", btnClose, btnCloseWIndowsss, false )
- function btnCloseWIndowsss2(ele)
- guiSetVisible (window, false)
- showCursor (false)
- guiSetInputEnabled(false)
- end
- addEventHandler ( "onClientGUIClick", btnClose2, btnCloseWIndowsss2, false )
- function btnCloseWIndowsss3(ele)
- guiSetVisible (window, false)
- showCursor (false)
- guiSetInputEnabled(false)
- end
- addEventHandler ( "onClientGUIClick", btnClose3, btnCloseWIndowsss3, false )
- function btnCloseWIndowsss4(ele)
- guiSetVisible (window, false)
- showCursor (false)
- guiSetInputEnabled(false)
- end
- addEventHandler ( "onClientGUIClick", btnClose4, btnCloseWIndowsss4, false )
- function btnCloseWIndowsss5(ele)
- guiSetVisible (window, false)
- showCursor (false)
- guiSetInputEnabled(false)
- end
- addEventHandler ( "onClientGUIClick", btnClose5, btnCloseWIndowsss5, false )
- function btnCloseWIndowsss6(ele)
- guiSetVisible (window, false)
- showCursor (false)
- guiSetInputEnabled(false)
- end
- addEventHandler ( "onClientGUIClick", btnClose6, btnCloseWIndowsss6, false )
- function btnCloseWIndowsss7(ele)
- guiSetVisible (window, false)
- showCursor (false)
- guiSetInputEnabled(false)
- end
- addEventHandler ( "onClientGUIClick", btnClose7, btnCloseWIndowsss7, false )
- function btnCloseWIndowsss3(ele)
- guiSetVisible (window, false)
- showCursor (false)
- guiSetInputEnabled(false)
- end
- function removeCC(ele)
- triggerServerEvent("removeCarColor", getLocalPlayer())
- end
- addEventHandler ( "onClientGUIClick", btnRmvColor, removeCC, false )
- function buyDL(ele)
- triggerServerEvent("buyDiscoLights", getLocalPlayer())
- end
- addEventHandler ( "onClientGUIClick", btnDisco, buyDL, false )
- function removeDL(ele)
- triggerServerEvent("removeDiscoLights", getLocalPlayer())
- end
- addEventHandler ( "onClientGUIClick", btnDisco2, removeDL, false )
- function buyNL(ele)
- triggerServerEvent("buyNormalLights", getLocalPlayer())
- end
- addEventHandler ( "onClientGUIClick", btnBuyLight, buyNL, false )
- function changeNormalLight(ele)
- exports.cpicker:openPicker("cPicNormalLightColor", "#FFFFFF", "Select your light color")
- showCursor(false)
- guiSetVisible (window, false)
- end
- addEventHandler ( "onClientGUIClick", btnBChangeLight, changeNormalLight, false )
- function shopPickups(ele)
- exports.cpicker:openPicker("cPicCarColor", "#FFFFFF", "The selected color")
- showCursor(false)
- guiSetVisible (window, false)
- end
- addEventHandler ( "onClientGUIClick", btnMixColor, shopPickups, false )
- function shopPickups2(ele)
- exports.cpicker:openPicker("cPicCarColor2", "#FFFFFF", "The selected color")
- showCursor(false)
- guiSetVisible (window, false)
- end
- addEventHandler ( "onClientGUIClick", btnMixColor2, shopPickups2, false )
- function buyColor(ele)
- triggerServerEvent("buyCarColor", getLocalPlayer())
- end
- addEventHandler ( "onClientGUIClick", btnBuyColor, buyColor, false )
- function aktualisiereCPicer(element, hex, r, g, b)
- if element == "cPicCarColor" then
- guiLabelSetColor(lblBuyColor, r, g, b)
- selectedR, selectedG, selectedB = r, g, b
- guiSetVisible (window, true)
- triggerServerEvent("saveCarColor", getLocalPlayer(), selectedR, selectedG, selectedB)
- showCursor(true)
- elseif element == "cPicCarColor2" then
- guiLabelSetColor(lblBuyColor, r, g, b)
- selectedR, selectedG, selectedB = r, g, b
- guiSetVisible (window, true)
- triggerServerEvent("saveCarColor2", getLocalPlayer(), selectedR, selectedG, selectedB)
- showCursor(true)
- elseif element == "cPicNormalLightColor" then
- selectedR, selectedG, selectedB = r, g, b
- guiSetVisible (window, true)
- triggerServerEvent("saveLightColor", getLocalPlayer(), selectedR, selectedG, selectedB)
- showCursor(true)
- elseif element == "cPicChatColor" then
- guiSetVisible (window, true)
- triggerServerEvent("saveChatColor", getLocalPlayer(), hex)
- showCursor(true)
- end
- end
- addEventHandler ("onColorPickerOK", getRootElement(), aktualisiereCPicer)
- function loadMaps(gamemodeMapTable, gamemode, map)
- guiGridListClear(gridMaps)
- if gamemodeMapTable then
- aGamemodeMapTable = gamemodeMapTable
- for id,gamemode in pairs (gamemodeMapTable) do
- if (gamemode.name == "Race") then
- for id,map in ipairs (gamemode.maps) do
- local row = guiGridListAddRow ( gridMaps )
- guiGridListSetItemText ( gridMaps, row, 1, map.name, false, false )
- guiGridListSetItemData ( gridMaps, row, 1, map.resname)
- totalServerMaps = totalServerMaps+1
- if (string.find(map.name,"[DM]",1,true)) then
- totalDmMaps = totalDmMaps+1
- elseif (string.find(map.name,"[DD]",1,true)) then
- totalDdMaps = totalDdMaps+1
- end
- updateMapLabels(1)
- end
- end
- end
- end
- end
- -- Map search
- function mapSearch()
- guiGridListClear(gridMaps)
- local searchString = string.lower(guiGetText(editMapSearch))
- if ( searchString == "" ) then
- for id,gamemode in pairs (aGamemodeMapTable) do
- if (gamemode.name == "Race") then
- for id,map in ipairs (gamemode.maps) do
- local row = guiGridListAddRow ( gridMaps )
- guiGridListSetItemText ( gridMaps, row, 1, map.name, false, false )
- guiGridListSetItemData ( gridMaps, row, 1, map.resname)
- end
- end
- end
- else
- for id,gamemode in pairs (aGamemodeMapTable) do
- if (gamemode.name == "Race") then
- local noMapsFound = true
- for id,map in ipairs (gamemode.maps) do
- if string.find(string.lower(map.name.." "..map.resname), searchString, 1, true) then
- local row = guiGridListAddRow ( gridMaps )
- guiGridListSetItemText ( gridMaps, row, 1, map.name, false, false )
- guiGridListSetItemData ( gridMaps, row, 1, map.resname)
- noMapsFound = false
- end
- end
- if noMapsFound == true then
- local row = guiGridListAddRow(gridMaps)
- guiGridListSetItemText (gridMaps, row, 1, "No maps matching your search query!", false, false)
- guiGridListSetItemColor (gridMaps, row, 1, 255,50,50)
- end
- end
- end
- end
- updateMapLabels(2)
- end
- function buyNextMap()
- local row,column = guiGridListGetSelectedItem(gridMaps)
- local mapName = guiGridListGetItemText(gridMaps,row,1)
- callServerfunction("buyMap",getLocalPlayer(),mapName)
- end
- -- Update labels
- function updateMapLabels(updateMode)
- if updateMode == 1 then
- guiSetText(lblTotalMapsOnServer,"Total maps on the server: "..totalServerMaps)
- guiSetText(lblTotalDmMaps,"Total DM Maps: "..totalDmMaps)
- guiSetText(lblTotalDdMaps,"Total DD Maps: "..totalDdMaps)
- else
- local row,column = guiGridListGetSelectedItem(gridMaps)
- local mapName = guiGridListGetItemText(gridMaps,row,1)
- if mapName == "" then
- guiSetText(lblSelectedMapName,"N/A")
- guiSetText(lblSelectedMapAuthor,"N/A")
- else
- guiSetText(lblSelectedMapName,mapName)
- if string.find(mapName,"[DM]",1,true) then
- guiSetText(lblSelectedMapAuthor,"Deathmatch")
- elseif string.find(mapName,"[DD]",1,true) then
- guiSetText(lblSelectedMapAuthor,"Destruction Derby")
- elseif string.find(mapName,"[FUN]",1,true) then
- guiSetText(lblSelectedMapAuthor,"Fun map")
- else
- guiSetText(lblSelectedMapAuthor,"UNKNOWN")
- end
- end
- end
- end
- addEventHandler ( "onClientGUIClick", gridMaps, updateMapLabels, false )
- addEventHandler ( "onClientGUIClick", btnBuyNextMap, buyNextMap, false )
- addEventHandler ( "onClientGUIChanged", editMapSearch, mapSearch, false )
- ------------------------------------------
- -- Calling function from the client's side
- ------------------------------------------
- function callClientfunction(funcname, ...)
- local arg = { ... }
- if (arg[1]) then
- for key, value in next, arg do arg[key] = tonumber(value) or value end
- end
- loadstring("return "..funcname)()(unpack(arg))
- end
- addEvent("onServerCallsClientFunction", true)
- addEventHandler("onServerCallsClientFunction", resourceRoot, callClientfunction)
- -----------------------
- -- Call server function
- -----------------------
- function callServerfunction(funcname, ...)
- local arg = { ... }
- if (arg[1]) then
- for key, value in next, arg do
- if (type(value) == "number") then arg[key] = tostring(value) end
- end
- end
- triggerServerEvent("onClientCallsServerFunction", resourceRoot , funcname, unpack(arg))
- end
- -- horns
- -- Horns
- function updateHornsOnStart()
- callServerfunction("getPurchasedHorns",getLocalPlayer())
- callServerfunction("getLastSetHorn",getLocalPlayer())
- end
- addEventHandler("onClientResourceStart",getResourceRootElement(getThisResource()),updateHornsOnStart)
- function updateHorns(thePlayer,h1,h2,h3,h4,h5,h6,h7,h8,h9,h10,h11,h12,h13,h14,h15)
- guiGridListSetItemColor(gridHorns,0,1,100,255,60,255)
- guiGridListSetItemColor(gridHorns,0,2,100,255,60,255)
- if h1 == 1 then
- guiGridListSetItemColor(gridHorns,1,1,100,255,60,255)
- guiGridListSetItemColor(gridHorns,1,2,100,255,60,255)
- end
- if h2 == 1 then
- guiGridListSetItemColor(gridHorns,2,1,100,255,60,255)
- guiGridListSetItemColor(gridHorns,2,2,100,255,60,255)
- end
- if h3 == 1 then
- guiGridListSetItemColor(gridHorns,3,1,100,255,60,255)
- guiGridListSetItemColor(gridHorns,3,2,100,255,60,255)
- end
- if h4 == 1 then
- guiGridListSetItemColor(gridHorns,4,1,100,255,60,255)
- guiGridListSetItemColor(gridHorns,4,2,100,255,60,255)
- end
- if h5 == 1 then
- guiGridListSetItemColor(gridHorns,5,1,100,255,60,255)
- guiGridListSetItemColor(gridHorns,5,2,100,255,60,255)
- end
- if h6 == 1 then
- guiGridListSetItemColor(gridHorns,6,1,100,255,60,255)
- guiGridListSetItemColor(gridHorns,6,2,100,255,60,255)
- end
- if h7 == 1 then
- guiGridListSetItemColor(gridHorns,7,1,100,255,60,255)
- guiGridListSetItemColor(gridHorns,7,2,100,255,60,255)
- end
- if h8 == 1 then
- guiGridListSetItemColor(gridHorns,8,1,100,255,60,255)
- guiGridListSetItemColor(gridHorns,8,2,100,255,60,255)
- end
- if h9 == 1 then
- guiGridListSetItemColor(gridHorns,9,1,100,255,60,255)
- guiGridListSetItemColor(gridHorns,9,2,100,255,60,255)
- end
- if h10 == 1 then
- guiGridListSetItemColor(gridHorns,10,1,100,255,60,255)
- guiGridListSetItemColor(gridHorns,10,2,100,255,60,255)
- end
- if h11 == 1 then
- guiGridListSetItemColor(gridHorns,11,1,100,255,60,255)
- guiGridListSetItemColor(gridHorns,11,2,100,255,60,255)
- end
- if h12 == 1 then
- guiGridListSetItemColor(gridHorns,12,1,100,255,60,255)
- guiGridListSetItemColor(gridHorns,12,2,100,255,60,255)
- end
- if h13 == 1 then
- guiGridListSetItemColor(gridHorns,13,1,100,255,60,255)
- guiGridListSetItemColor(gridHorns,13,2,100,255,60,255)
- end
- if h14 == 1 then
- guiGridListSetItemColor(gridHorns,14,1,100,255,60,255)
- guiGridListSetItemColor(gridHorns,14,2,100,255,60,255)
- end
- if h15 == 1 then
- guiGridListSetItemColor(gridHorns,15,1,100,255,60,255)
- guiGridListSetItemColor(gridHorns,15,2,100,255,60,255)
- end
- if h16 == 1 then
- guiGridListSetItemColor(gridHorns,16,1,100,255,60,255)
- guiGridListSetItemColor(gridHorns,16,2,100,255,60,255)
- end
- end
- addEventHandler("onClientResourceStart",getResourceRootElement(getThisResource()),updateHorns)
- function setLastUsedHorn(horn)
- if not (horn == 0) then
- setHornSound = horn
- toggleControl("horn",false)
- guiSetText(lblCurrentHorn,""..hornName[horn+1])
- else
- toggleControl("horn",true)
- guiSetText(lblCurrentHorn,"Normal Korna")
- end
- bindKey ("h", "down", playCustomHorn)
- end
- function hornPreview()
- local selectedHorn = guiGridListGetSelectedItem(gridHorns)
- if selectedHorn <= 0 then
- return
- end
- if selectedHorn == 6 then
- local previewHorn = playSound(hornSound[selectedHorn])
- setSoundVolume(previewHorn,0.6)
- else
- local previewHorn = playSound(hornSound[selectedHorn])
- setSoundVolume(previewHorn,0.8)
- end
- end
- function buyHorn()
- local selectedHorn = guiGridListGetSelectedItem(gridHorns)
- if selectedHorn == -1 then
- outputChatBox("#ff6600Lütfen alınacak kornayı seçin",255,255,255,true)
- return
- end
- if selectedHorn == 0 then
- outputChatBox("#ff6600Bu korna saten alınmış.",255,255,255,true)
- return
- end
- callServerfunction("purchaseHorn",getLocalPlayer(),selectedHorn,hornName[selectedHorn+1])
- end
- function setHornCheck()
- local selectedHorn = guiGridListGetSelectedItem(gridHorns)
- if selectedHorn == -1 then
- outputChatBox("#ff6600Lütfen kornayı seçin",255,255,255,true)
- return
- end
- if selectedHorn == 0 then
- outputChatBox("#ff6600 Selected is no longer horn Horn #ABCDEF"..hornName[selectedHorn+1],255,255,255,true)
- callServerfunction("setLastSetHorn",getLocalPlayer(),selectedHorn)
- setHornSound = 0
- toggleControl("horn",true)
- guiSetText(lblCurrentHorn,"Normal Korna")
- return
- end
- callServerfunction("checkForPurchasedHorn",getLocalPlayer(),selectedHorn)
- end
- function setHorn(horn)
- outputChatBox("#ff6600 Selected is no longer horn Horn#ABCDEF"..hornName[horn+1],255,255,255,true)
- callServerfunction("setLastSetHorn",getLocalPlayer(),horn)
- toggleControl("horn",false)
- setHornSound = horn
- guiSetText(lblCurrentHorn,""..hornName[horn+1])
- end
- function updateHornPriceLabel()
- local row = guiGridListGetSelectedItem(gridHorns)
- if (row > 0) then
- local price = guiGridListGetItemText(gridHorns,row,2)
- guiSetText(lblHornPrice,"$"..string.gsub(price," ",""))
- else
- guiSetText(lblHornPrice,"N/A")
- end
- end
- -- Play the actual horn sound
- function playCustomHorn()
- if isControlEnabled("horn") == false then
- if getElementData(getLocalPlayer(),"state") == "alive" then
- if hornNum == 0 then
- callServerfunction("playHornForAllClients",getLocalPlayer(),tostring(hornSound[setHornSound]),setHornSound)
- end
- end
- elseif setHornSound ~= 0 then
- toggleControl("horn",false)
- playCustomHorn()
- end
- end
- function playCustomHornxx()
- if isControlEnabled("horn") == false then
- if setHornSound == 0 then
- toggleControl("horn",true)
- playCustomHorn()
- return
- end
- if getElementCacheData(getLocalPlayer(),"state") == "alive" then
- if hornNum == 0 then
- callServerfunction("playHornForAllClients",getLocalPlayer(),tostring(hornSound[setHornSound]),setHornSound)
- end
- end
- elseif setHornSound ~= 0 then
- toggleControl("horn",false)
- playCustomHorn()
- end
- end
- function playHornSound(horningPlayer,hornSoundPath,cSetHornSound)
- local numItems = 0
- for k,v in pairs(customHorn) do
- numItems = numItems + 1
- end
- if (cSetHornSound ~= 0) then
- customHorn[numItems+1] = playSound3D(hornSoundPath,getElementPosition(horningPlayer))
- if horningPlayer == getLocalPlayer() then
- hornNum = numItems+1
- else
- hornNum = 0
- end
- setSoundMaxDistance(customHorn[numItems+1],75)
- setSoundVolume(customHorn[numItems+1],0.95)
- attachElements(customHorn[numItems+1],horningPlayer,0,0,0.5)
- local length = getSoundLength(customHorn[numItems+1])
- detachTimer = setTimer(
- function()
- if (customHorn[numItems+1]) then
- if isElementAttached(customHorn[numItems+1]) == true then
- detachElements(customHorn[numItems+1])
- end
- stopSound(customHorn[numItems+1])
- end
- customHorn[numItems+1] = nil
- hornNum = 0
- end,length*1000 - 100,1)
- end
- end
- addEvent("onRecieveHorn",true)
- addEventHandler("onRecieveHorn",getRootElement(),playHornSound)
- --setTimer ( playHornSound, 1000, 1, )
- --------------------------------------------------------------------------
- --------------------------------------------------------------------------------------------------
- --general--
- local root = getRootElement()
- local resRoot = getResourceRootElement(getThisResource())
- local localPlayer = getLocalPlayer()
- --end general--
- --distance--
- local distanceTravelled
- local oldx,oldy,oldz
- --end distance--
- --[[*************************************************
- * Part I: sounds *
- *****************************************************]]
- --PLAY UEFA SOUND
- function playUefaSoundForPlayer(forAll)
- if (forAll) then
- playSound("/files/uefa.mp3",false)
- else
- if (source == localPlayer) then
- playSound("/files/uefa.mp3",false)
- else
- local x,y,z = getElementPosition(source)
- local sound = playSound3D("/files/uefa.mp3",x,y,z,false)
- setSoundMinDistance(sound,5)
- setSoundMaxDistance(sound,40)
- attachElements(sound,source)
- end
- end
- end
- addEvent("onPlayerPlayUEFASound", true)
- addEventHandler("onPlayerPlayUEFASound", root, playUefaSoundForPlayer)
- --PUBLIC MESSAGE FOR ALL PLAYERS
- local pmsgtexts = {}
- function displayPMSG(msg)
- local tick = getTickCount()
- local msg = "|"..getPlayerName(source).."#FF7800|: " ..msg
- table.insert(pmsgtexts,{tostring(msg), tick})
- if (#pmsgtexts == 1) then
- addEventHandler("onClientRender", getRootElement(), pmsgdraw_func)
- end
- end
- local sw,sh = guiGetScreenSize()
- function pmsgdraw_func()
- local tick2 = getTickCount()
- if (#pmsgtexts < 1) then
- removeEventHandler("onClientRender", getRootElement(), pmsgdraw_func)
- end
- for i,v in ipairs(pmsgtexts) do
- if tick2 - pmsgtexts[i][2] < 6000 then
- dxDrawColorText( true, pmsgtexts[i][1], sw/2, sh/2, sw/2, sh/2, tocolor(255,102,0), 1.25, "bankgothic", "center")
- else
- table.remove(pmsgtexts,i)
- end
- end
- end
- addEvent("onAdminSendPMSG", true)
- addEventHandler("onAdminSendPMSG", getRootElement(), displayPMSG)
- --[[*************************************************
- * Part II: client events/functions *
- *****************************************************]]
- function playerRankUp()
- if source == localPlayer then
- playSound("/files/RankUp.mp3",false)
- else
- local x,y,z = getElementPosition(source)
- local sound = playSound3D("/files/RankUp.mp3",x,y,z,false)
- setSoundMinDistance(sound,5)
- setSoundMaxDistance(sound,40)
- attachElements(sound,source)
- end
- end
- addEvent("onPlayerRankUp",true)
- addEventHandler("onPlayerRankUp",root,playerRankUp)
- --[[function startRecordingDistanceTravelled()
- distanceTravelled = 0
- addEventHandler("onClientRender",root,distanceRecord)
- end
- addEvent("startRecordingDistanceTravelled",true)
- addEventHandler("startRecordingDistanceTravelled",root,startRecordingDistanceTravelled)
- function getRecordedDistanceTravelled(stop)
- triggerServerEvent("onDistanceTravelledReturn",localPlayer,distanceTravelled)
- distanceTravelled = 0
- if stop then
- removeEventHandler("onClientRender",root,distanceRecord)
- end
- end
- addEvent("getRecordedDistanceTravelled",true)
- addEventHandler("getRecordedDistanceTravelled",root,getRecordedDistanceTravelled)
- function resourceStop()
- if distanceTravelled > 0 then
- triggerServerEvent("onDistanceTravelledReturn",localPlayer,distanceTravelled)
- end
- end
- addEventHandler("onClientResourceStop",resRoot,resourceStop)
- function distanceRecord()
- local veh = getPedOccupiedVehicle(getLocalPlayer())
- if veh then
- local x,y,z = getElementPosition(veh)
- if oldx then
- distanceTravelled = distanceTravelled + getDistanceBetweenPoints3D(x,y,z,oldx,oldy,oldz)
- end
- oldx,oldy,oldz = x,y,z
- end
- end]]
- --[[*************************************************
- * Part III: disco functions *
- *****************************************************]]
- local cr,cg,cb
- local polilight
- local cablight
- addEvent("onAtzenFun",true)
- addEventHandler("onAtzenFun",getRootElement(),
- function ()
- playSound("disco_pogo.mp3")
- local vehic = getPedOccupiedVehicle ( getLocalPlayer() )
- if ( vehic ) then
- cr,cg,cb = getVehicleHeadLightColor(vehic)
- local polilight = getVehicleSirensOn(vehic)
- local cablight = isVehicleTaxiLightOn(vehic)
- triggerServerEvent("globalSirensOn",getRootElement(),vehic,true)
- triggerServerEvent("globalTaxiLight",getRootElement(),vehic,true)
- setTimer(party,300,46)
- setTimer(orig,(300*46+3000),1)
- end
- end
- )
- function party()
- local vehic = getPedOccupiedVehicle ( getLocalPlayer() )
- if ( vehic ) then
- triggerServerEvent("globalTaxiLight",getRootElement(),vehic,not isVehicleTaxiLightOn(vehic))
- triggerServerEvent("globalLightColor",getRootElement(),vehic,math.random(0,255),math.random(0,255),math.random(0,255))
- end
- end
- function orig()
- local vehic = getPedOccupiedVehicle ( getLocalPlayer() )
- if ( vehic ) then
- triggerServerEvent("globalLightColor",getRootElement(),vehic,cr,cg,cb)
- triggerServerEvent("globalSirensOn",getRootElement(),vehic,polilight)
- triggerServerEvent("globalTaxiLight",getRootElement(),vehic,not cablight)
- end
- end
- --[[*************************************************
- * Part IV: 2D countdown *
- *****************************************************]]
- local instructionText
- function showCursorForStart()
- if (source == localPlayer) then
- showCursor(true)
- instructionText = dxText:create("Please Click somewhere on your screen where you want the countdown to appear!", 0.5, 0.6, true, "sans", 2, "center")
- instructionText:color(0,255, 55)
- setTimer(
- function()
- instructionText:destroy()
- end
- , 5000, 1)
- addEventHandler("onClientClick", root, onPlayerClickReturnPosition)
- end
- end
- addEvent("onPlayerUseCountdown", true)
- addEventHandler("onPlayerUseCountdown", root, showCursorForStart)
- function onPlayerClickReturnPosition(btn, state, sx, sy, x, y, z, element)
- if (btn == "left") and (state == "down") then
- removeEventHandler("onClientClick", root, onPlayerClickReturnPosition)
- local startTime = getTickCount()
- showCursor(false)
- triggerServerEvent("onPlayerClickDrawCountdownSendServer",root, x, y, z, element)
- end
- end
- function drawCountdownInWorld(px, py, pz,element)
- local nx, ny, nz = getCameraMatrix(localPlayer)
- local between = getDistanceBetweenPoints3D(px, py, pz, nx, ny, nz)
- local start = getTickCount()
- if (between < 125) then
- setTimer(playSoundFrontEnd, 1000, 1, 44)
- setTimer(playSoundFrontEnd, 2000, 1, 44)
- setTimer(playSoundFrontEnd, 3000, 1, 44)
- setTimer(playSoundFrontEnd, 4000, 1, 44)
- setTimer(playSoundFrontEnd, 5000, 1, 44)
- setTimer(playSoundFrontEnd, 6000, 1, 45)
- end
- function drawCd()
- local sx,sy = getScreenFromWorldPosition(px,py,pz+5,0.06)
- local timePassed = getTickCount() - start
- if sx and sy then
- local cx,cy,cz = getCameraMatrix()
- local size = getDistanceBetweenPoints3D(cx,cy,cz,px,py,pz)
- local pixel = 200 - size*2
- if size <= 125 then
- if (timePassed > 1000) and (timePassed < 1500) then
- dxDrawImage(sx-(pixel*0.5),sy-(pixel*0.5),pixel,pixel,"files/5.png")
- elseif (timePassed > 2000) and (timePassed <2500) then
- dxDrawImage(sx-(pixel*0.5),sy-(pixel*0.5),pixel,pixel,"files/4.png")
- elseif (timePassed > 3000) and (timePassed < 3500) then
- dxDrawImage(sx-(pixel*0.5),sy-(pixel*0.5),pixel,pixel,"files/3.png")
- elseif (timePassed > 4000) and (timePassed <4500) then
- dxDrawImage(sx-(pixel*0.5),sy-(pixel*0.5),pixel,pixel,"files/2.png")
- elseif (timePassed > 5000) and (timePassed <5500) then
- dxDrawImage(sx-(pixel*0.5),sy-(pixel*0.5),pixel,pixel,"files/1.png")
- elseif (timePassed > 6000) and (timePassed <9000) then
- dxDrawImage(sx-(pixel*0.5),sy-(pixel*0.5),pixel,pixel,"files/go.png")
- elseif (timePassed > 9000) then
- triggerServerEvent("onClientStopCountdown", root)
- triggerServerEvent("getplayername", localPlayer, timePassed)
- removeEventHandler("onClientRender", root, drawCd)
- else
- --nothing
- end
- else
- if (timePassed > 9000) then
- triggerServerEvent("onClientStopCountdown", root)
- triggerServerEvent("getplayername", localPlayer, timePassed)
- removeEventHandler("onClientRender", root, drawCd)
- end
- end
- else
- if (timePassed > 9000) then
- triggerServerEvent("onClientStopCountdown", root)
- triggerServerEvent("getplayername", localPlayer, timePassed)
- removeEventHandler("onClientRender", root, drawCd)
- end
- end
- end
- addEventHandler("onClientRender", root, drawCd)
- function onPlayerQuitCD()
- triggerServerEvent("onClientStopCountdown", source)
- end
- addEventHandler("onClientResourceStop", resRoot, onPlayerQuitCD)
- end
- addEvent("onPlayerClickDrawCountdown", true)
- addEventHandler("onPlayerClickDrawCountdown", root, drawCountdownInWorld)
- --[[*************************************************
- * Part V: Ghostmode *
- *****************************************************]]
- --[[
- local width, height = 175, 35
- local gmimage
- local screenWidth, screenHeight = guiGetScreenSize()
- local path = "files/ghostmode.png"
- addEventHandler("onClientResourceStart", resRoot,
- function()
- gmimage = guiCreateStaticImage(screenWidth/2 - 75, 65, width, height, "files/ghostmode.png", false)
- end)
- addEventHandler("onClientRender", root,
- function()
- dxDrawImage(screenWidth/2 - 70, 60, width, height, path)
- end)
- function switchGhostModeImage(mapinfo, mapMode)
- local mapType = mapinfo.modename
- if (mapType == "Destruction derby") then
- if (mapMode == "DM") then
- --guiStaticImageLoadImage(gmimage, "files/ghostmode_on.png")
- path = "files/ghostmode_on.png"
- elseif (mapMode == "DD") then
- --guiStaticImageLoadImage(gmimage, "files/ghostmode_off.png")
- path = "files/ghostmode_off.png"
- end
- else
- --guiStaticImageLoadImage(gmimage, "files/ghostmode_on.png")
- path = "files/ghostmode_on.png"
- end
- end
- addEvent("onClientDestructionDerbyModeMapStart", true)
- addEventHandler("onClientDestructionDerbyModeMapStart", root, switchGhostModeImage)
- function toggleGhostmodeByAdmin(gm)
- if (gm) then
- --guiStaticImageLoadImage(gmimage, "files/ghostmode_on.png")
- path = "files/ghostmode_on.png"
- else
- --guiStaticImageLoadImage(gmimage, "files/ghostmode_off.png")
- path = "files/ghostmode_off.png"
- end
- end
- addEvent("onClientAdminToggleGhostmode", true)
- addEventHandler("onClientAdminToggleGhostmode", root, toggleGhostmodeByAdmin)]]
- local counter = 0
- local starttick
- local currenttick
- addEventHandler("onClientRender",getRootElement(),
- function()
- if not starttick then
- starttick = getTickCount()
- end
- counter = counter + 1
- currenttick = getTickCount()
- if currenttick - starttick >= 1000 then
- setElementData(getLocalPlayer(),"fps",counter)
- counter = 0
- starttick = false
- end
- end
- )
- function sol()
- if (guiGetVisible (Gui_Image1) == true) then
- guiSetVisible (Gui_Image1, false)
- guiSetVisible(Gui_Image2,true)
- guiSetText (Gui_JantLabel, "2 / 16")
- elseif (guiGetVisible (Gui_Image2) == true) then
- guiSetVisible (Gui_Image2, false)
- guiSetVisible(Gui_Image3,true)
- guiSetText (Gui_JantLabel, "3 / 16")
- elseif (guiGetVisible (Gui_Image3) == true) then
- guiSetVisible (Gui_Image3, false)
- guiSetVisible(Gui_Image4,true)
- guiSetText (Gui_JantLabel, "4 / 16")
- elseif (guiGetVisible (Gui_Image4) == true) then
- guiSetVisible (Gui_Image4, false)
- guiSetVisible(Gui_Image5,true)
- guiSetText (Gui_JantLabel, "5 / 16")
- elseif (guiGetVisible (Gui_Image5) == true) then
- guiSetVisible (Gui_Image5, false)
- guiSetVisible(Gui_Image6,true)
- guiSetText (Gui_JantLabel, "6 / 16")
- elseif (guiGetVisible (Gui_Image6) == true) then
- guiSetVisible (Gui_Image6, false)
- guiSetVisible(Gui_Image7,true)
- guiSetText (Gui_JantLabel, "7 / 16")
- elseif (guiGetVisible (Gui_Image7) == true) then
- guiSetVisible (Gui_Image7, false)
- guiSetVisible(Gui_Image8,true)
- guiSetText (Gui_JantLabel, "8 / 16")
- elseif (guiGetVisible (Gui_Image8) == true) then
- guiSetVisible (Gui_Image8, false)
- guiSetVisible(Gui_Image9,true)
- guiSetText (Gui_JantLabel, "9 / 16")
- elseif (guiGetVisible (Gui_Image9) == true) then
- guiSetVisible (Gui_Image9, false)
- guiSetVisible(Gui_Image10,true)
- guiSetText (Gui_JantLabel, "10 / 16")
- elseif (guiGetVisible (Gui_Image10) == true) then
- guiSetVisible (Gui_Image10, false)
- guiSetVisible(Gui_Image11,true)
- guiSetText (Gui_JantLabel, "11 / 16")
- elseif (guiGetVisible (Gui_Image11) == true) then
- guiSetVisible (Gui_Image11, false)
- guiSetVisible(Gui_Image12,true)
- guiSetText (Gui_JantLabel, "12 / 16")
- elseif (guiGetVisible (Gui_Image12) == true) then
- guiSetVisible (Gui_Image12, false)
- guiSetVisible(Gui_Image13,true)
- guiSetText (Gui_JantLabel, "13 / 16")
- elseif (guiGetVisible (Gui_Image13) == true) then
- guiSetVisible (Gui_Image13, false)
- guiSetVisible(Gui_Image14,true)
- guiSetText (Gui_JantLabel, "14 / 16")
- elseif (guiGetVisible (Gui_Image14) == true) then
- guiSetVisible (Gui_Image14, false)
- guiSetVisible(Gui_Image15,true)
- guiSetText (Gui_JantLabel, "15 / 16")
- elseif (guiGetVisible (Gui_Image15) == true) then
- guiSetVisible (Gui_Image15, false)
- guiSetVisible(Gui_Image16,true)
- guiSetText (Gui_JantLabel, "16 / 16")
- end
- end
- function sam()
- if (guiGetVisible (Gui_Image16) == true) then
- guiSetVisible (Gui_Image16, false)
- guiSetVisible(Gui_Image15,true)
- guiSetText (Gui_JantLabel, "15 / 16")
- elseif (guiGetVisible (Gui_Image15) == true) then
- guiSetVisible (Gui_Image15, false)
- guiSetVisible(Gui_Image14,true)
- guiSetText (Gui_JantLabel, "14 / 16")
- elseif (guiGetVisible (Gui_Image14) == true) then
- guiSetVisible (Gui_Image14, false)
- guiSetVisible(Gui_Image13,true)
- guiSetText (Gui_JantLabel, "13 / 16")
- elseif (guiGetVisible (Gui_Image13) == true) then
- guiSetVisible (Gui_Image13, false)
- guiSetVisible(Gui_Image12,true)
- guiSetText (Gui_JantLabel, "12 / 16")
- elseif (guiGetVisible (Gui_Image12) == true) then
- guiSetVisible (Gui_Image12, false)
- guiSetVisible(Gui_Image11,true)
- guiSetText (Gui_JantLabel, "11 / 16")
- elseif (guiGetVisible (Gui_Image11) == true) then
- guiSetVisible (Gui_Image11, false)
- guiSetVisible(Gui_Image10,true)
- guiSetText (Gui_JantLabel, "10 / 16")
- elseif (guiGetVisible (Gui_Image10) == true) then
- guiSetVisible (Gui_Image10, false)
- guiSetVisible(Gui_Image9,true)
- guiSetText (Gui_JantLabel, "9 / 16")
- elseif (guiGetVisible (Gui_Image9) == true) then
- guiSetVisible (Gui_Image9, false)
- guiSetVisible(Gui_Image8,true)
- guiSetText (Gui_JantLabel, "8 / 16")
- elseif (guiGetVisible (Gui_Image8) == true) then
- guiSetVisible (Gui_Image8, false)
- guiSetVisible(Gui_Image7,true)
- guiSetText (Gui_JantLabel, "7 / 16")
- elseif (guiGetVisible (Gui_Image7) == true) then
- guiSetVisible (Gui_Image7, false)
- guiSetVisible(Gui_Image6,true)
- guiSetText (Gui_JantLabel, "6 / 16")
- elseif (guiGetVisible (Gui_Image6) == true) then
- guiSetVisible (Gui_Image6, false)
- guiSetVisible(Gui_Image5,true)
- guiSetText (Gui_JantLabel, "5 / 16")
- elseif (guiGetVisible (Gui_Image5) == true) then
- guiSetVisible (Gui_Image5, false)
- guiSetVisible(Gui_Image4,true)
- guiSetText (Gui_JantLabel, "4 / 16")
- elseif (guiGetVisible (Gui_Image4) == true) then
- guiSetVisible (Gui_Image4, false)
- guiSetVisible(Gui_Image3,true)
- guiSetText (Gui_JantLabel, "3 / 16")
- elseif (guiGetVisible (Gui_Image3) == true) then
- guiSetVisible (Gui_Image3, false)
- guiSetVisible(Gui_Image2,true)
- guiSetText (Gui_JantLabel, "2 / 16")
- elseif (guiGetVisible (Gui_Image2) == true) then
- guiSetVisible (Gui_Image2, false)
- guiSetVisible(Gui_Image1,true)
- guiSetText (Gui_JantLabel, "1 / 16")
- end
- end
- function replaceModel()
- txd = engineLoadTXD("wheel_sr6.dff", 1073 )
- engineImportTXD(txd, 411)
- dff = engineLoadDFF("wheel_sr6.txd", 1073 )
- engineReplaceModel(dff, 411)
- end
- addEventHandler ( "onClientResourceStart", getResourceRootElement(getThisResource()), replaceModel)
- function save()
- if (guiGetVisible (Gui_Image1) == true) then
- callServerfunction("buyjant",getLocalPlayer(),1098)
- elseif (guiGetVisible (Gui_Image2) == true) then
- callServerfunction("buyjant",getLocalPlayer(),1073)
- elseif (guiGetVisible (Gui_Image3) == true) then
- callServerfunction("buyjant",getLocalPlayer(),1074)
- elseif (guiGetVisible (Gui_Image4) == true) then
- callServerfunction("buyjant",getLocalPlayer(),1075)
- elseif (guiGetVisible (Gui_Image5) == true) then
- callServerfunction("buyjant",getLocalPlayer(),1076)
- elseif (guiGetVisible (Gui_Image6) == true) then
- callServerfunction("buyjant",getLocalPlayer(),1077)
- elseif (guiGetVisible (Gui_Image7) == true) then
- callServerfunction("buyjant",getLocalPlayer(),1078)
- elseif (guiGetVisible (Gui_Image8) == true) then
- callServerfunction("buyjant",getLocalPlayer(),1079)
- elseif (guiGetVisible (Gui_Image9) == true) then
- callServerfunction("buyjant",getLocalPlayer(),1080)
- elseif (guiGetVisible (Gui_Image10) == true) then
- callServerfunction("buyjant",getLocalPlayer(),1081)
- elseif (guiGetVisible (Gui_Image11) == true) then
- callServerfunction("buyjant",getLocalPlayer(),1082)
- elseif (guiGetVisible (Gui_Image12) == true) then
- callServerfunction("buyjant",getLocalPlayer(),1083)
- elseif (guiGetVisible (Gui_Image13) == true) then
- callServerfunction("buyjant",getLocalPlayer(),1084)
- elseif (guiGetVisible (Gui_Image14) == true) then
- callServerfunction("buyjant",getLocalPlayer(),1085)
- elseif (guiGetVisible (Gui_Image15) == true) then
- callServerfunction("buyjant",getLocalPlayer(),1096)
- elseif (guiGetVisible (Gui_Image16) == true) then
- callServerfunction("buyjant",getLocalPlayer(),1097)
- end
- end
- [/code]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement