Jump to content

Jokeℝ1472771893

Members
  • Posts

    334
  • Joined

  • Last visited

Everything posted by Jokeℝ1472771893

  1. sorry for double posting but can someone help me?
  2. this is right? local pArea = createRadarArea( 2130, 630, 200, 100, 0, 255, 0, 175 ) local pCuboid = createColCuboid( 2133.1950683594, 633.66455078125, 10, 197.5, 92, 30 ) addEventHandler( 'onColShapeHit', root, function( p ) -- you should have added player param here if (getPlayerGang( p )) then if( source == pCuboid ) then outputChatBox("------||~ INFO ~||------", p, 0,255,0) outputChatBox("Turf owners: coming soon!", p, 255,255,0) outputChatBox("Taken time: 10minutes.", p, 255,255,0) outputChatBox("Wait 10min to take turf.", p, 255,255,0) outputChatBox("------||~ END ~||------", p, 255,0,0) setRadarAreaFlashing( pArea, true ) local pGang = getPlayerGang( p ) -- source is the col shape, you should use 'p', the player arg setTimer( function() setRadarAreaColor (pArea, iR2, iG2, iB2, 100); givePlayerMoney( p, 4000 ); outputChatBox( "Congratulations, #FFFF00 you have taken the turf!", p, 0, 255, 0, true ); setRadarAreaFlashing( pArea, false ) end, 600000, 1 ) end else outputChatBox("Get in a group first!",p, 255, 0, 0) end end ) addEventHandler( 'onColShapeLeave', root, function( ) if( source == pCuboid ) then setRadarAreaFlashing( pArea, false ) end end )
  3. local pArea = createRadarArea( 2130, 630, 200, 100, 0, 255, 0, 175 ) local pArea2 = createRadarArea( 2488.8793945313, 680.78289794922, 250, 130, 0, 255, 0, 175 ) local pCuboid = createColCuboid( 2133.1950683594, 633.66455078125, 10, 197.5, 92, 30 ) local pCuboid2 = createColCuboid( 2486.5935058594, 678.20172119141, 9.5689830780029, 245, 133, 30 ) local pArea3 = createRadarArea( 1858, 623, 140, 165, 0, 255, 0, 175 ) local pCuboid3 = createColCuboid( 1856.2864990234, 627.07629394531, 9, 138.25, 152.75, 30 ) local pArea4 = createRadarArea( 1577, 663, 180, 130, 0, 255, 0, 175 ) local pCuboid4 = createColCuboid( 1576.8956298828, 662.84362792969, 9.671875, 181, 120.5, 30 ) local pArea4 = createRadarArea( 2778, 834, 110, 190, 0, 255, 0, 175 ) local pCuboid4 = createColCuboid( 2777.4248046875, 833.88018798828, 9.6484375, 113.5, 188, 30 ) addEventHandler("onResourceStart",resourceRoot,function() outputDebugString("Turf system by Enjoy ( manve ) |~| Has been turned on!") -- Please don't remove this =) end ) function info() ---- dont remove this please outputChatBox("------||~ INFO ~||------",source,0,255,0) outputChatBox("Made by: Manve",source,255,255,0) outputChatBox("Helpers: MTA Community",source,255,255,0) outputChatBox("Testers: Enjoy + Takashi",source,255,255,0) outputChatBox("Have Fun turfing",source,255,255,0) outputChatBox("------||~ END ~||------",source,255,0,0) end addEventHandler("onPlayerJoin", root, info) addEventHandler( 'onColShapeHit', root, function( p ) -- you should have added player param here if (getPlayerTeam( p )) then if( source == pCuboid ) then outputChatBox("------||~ INFO ~||------", p, 0,255,0) outputChatBox("Turf owners: coming soon!", p, 255,255,0) outputChatBox("Taken time: 10minutes.", p, 255,255,0) outputChatBox("Wait 10min to take turf.", p, 255,255,0) outputChatBox("------||~ END ~||------", p, 255,0,0) setRadarAreaFlashing( pArea, true ) getElementData(p, "gang") -- source is the col shape, you should use 'p', the player arg local iR, iG, iB = getTeamColor( pTeam ) setTimer( function() setRadarAreaColor (pArea, iR, iG, iB, 100); givePlayerMoney( p, 4000 ); outputChatBox( "Congratulations, #FFFF00 you have taken the turf!", p, 0, 255, 0, true ); setRadarAreaFlashing( pArea, false ) end, 600000, 1 ) end else outputChatBox("Get in a group first!",p, 255, 0, 0) end end ) addEventHandler( 'onColShapeLeave', root, function( ) if( source == pCuboid ) then setRadarAreaFlashing( pArea, false ) end end ) ----------------------------- addEventHandler( 'onColShapeHit', root, function( p ) -- you should have added player param here if (getPlayerTeam( p )) then if( source == pCuboid2 ) then outputChatBox("------||~ INFO ~||------", p, 0,255,0) outputChatBox("Turf owners: coming soon!", p, 255,255,0) outputChatBox("Taken time: 10minutes.", p, 255,255,0) outputChatBox("Wait 10min to take turf.", p, 255,255,0) outputChatBox("------||~ END ~||------", p, 255,0,0) setRadarAreaFlashing( pArea2, true ) getElementData(p, "gang") -- source is the col shape, you should use 'p', the player arg local iR2, iG2, iB2 = getTeamColor( pTeam2 ) setTimer( function() setRadarAreaColor (pArea2, iR2, iG2, iB2, 100); givePlayerMoney( p, 4000 ); outputChatBox( "Congratulations, #FFFF00 you have taken the turf!", p, 0, 255, 0, true ); setRadarAreaFlashing( pArea2, false ) end, 600000, 1 ) end else outputChatBox("Get in a group first!",p, 255, 0, 0) end end ) addEventHandler( 'onColShapeLeave', root, function( ) if( source == pCuboid2 ) then setRadarAreaFlashing( pArea2, false ) end end ) ------------------------------------ addEventHandler( 'onColShapeHit', root, function( p ) -- you should have added player param here if (getPlayerTeam( p )) then if( source == pCuboid3 ) then outputChatBox("------||~ INFO ~||------", p, 0,255,0) outputChatBox("Turf owners: coming soon!", p, 255,255,0) outputChatBox("Taken time: 10minutes.", p, 255,255,0) outputChatBox("Wait 10min to take turf.", p, 255,255,0) outputChatBox("------||~ END ~||------", p, 255,0,0) setRadarAreaFlashing( pArea3, true ) getElementData(p, "gang") -- source is the col shape, you should use 'p', the player arg local iR2, iG2, iB2 = getTeamColor( pTeam3 ) setTimer( function() setRadarAreaColor (pArea3, iR2, iG2, iB2, 100); givePlayerMoney( p, 4000 ); outputChatBox( "Congratulations, #FFFF00 you have taken the turf!", p, 0, 255, 0, true ); setRadarAreaFlashing( pArea3, false ) end, 600000, 1 ) end else outputChatBox("Get in a group first!",p, 255, 0, 0) end end ) addEventHandler( 'onColShapeLeave', root, function( ) if( source == pCuboid3 ) then setRadarAreaFlashing( pArea3, false ) end end ) ------------------------------------- addEventHandler( 'onColShapeHit', root, function( p ) -- you should have added player param here if (getPlayerTeam( p )) then if( source == pCuboid4 ) then outputChatBox("------||~ INFO ~||------", p, 0,255,0) outputChatBox("Turf owners: coming soon!", p, 255,255,0) outputChatBox("Taken time: 10minutes.", p, 255,255,0) outputChatBox("Wait 10min to take turf.", p, 255,255,0) outputChatBox("------||~ END ~||------", p, 255,0,0) setRadarAreaFlashing( pArea4, true ) getElementData(p, "gang") -- source is the col shape, you should use 'p', the player arg local iR2, iG2, iB2 = getTeamColor( pTeam4 ) setTimer( function() setRadarAreaColor (pArea4, iR2, iG2, iB2, 100); givePlayerMoney( p, 4000 ); outputChatBox( "Congratulations, #FFFF00 you have taken the turf!", p, 0, 255, 0, true ); setRadarAreaFlashing( pArea4, false ) end, 600000, 1 ) end else outputChatBox("Get in a group first!",p, 255, 0, 0) end end ) addEventHandler( 'onColShapeLeave', root, function( ) if( source == pCuboid4 ) then setRadarAreaFlashing( pArea4, false ) end end ) here.
  4. same thing "Get in a group first!". maybe there is the problem in script?
  5. it's says "Get in Group First".but i have group.
  6. local pArea = createRadarArea( 2130, 630, 200, 100, 0, 255, 0, 175 ) local pArea2 = createRadarArea( 2488.8793945313, 680.78289794922, 250, 130, 0, 255, 0, 175 ) local pCuboid = createColCuboid( 2133.1950683594, 633.66455078125, 10, 197.5, 92, 30 ) local pCuboid2 = createColCuboid( 2486.5935058594, 678.20172119141, 9.5689830780029, 245, 133, 30 ) local pArea3 = createRadarArea( 1858, 623, 140, 165, 0, 255, 0, 175 ) local pCuboid3 = createColCuboid( 1856.2864990234, 627.07629394531, 9, 138.25, 152.75, 30 ) local pArea4 = createRadarArea( 1577, 663, 180, 130, 0, 255, 0, 175 ) local pCuboid4 = createColCuboid( 1576.8956298828, 662.84362792969, 9.671875, 181, 120.5, 30 ) local pArea4 = createRadarArea( 2778, 834, 110, 190, 0, 255, 0, 175 ) local pCuboid4 = createColCuboid( 2777.4248046875, 833.88018798828, 9.6484375, 113.5, 188, 30 ) addEventHandler("onResourceStart",resourceRoot,function() outputDebugString("Turf system by Enjoy ( manve ) |~| Has been turned on!") -- Please don't remove this =) end ) function info() ---- dont remove this please outputChatBox("------||~ INFO ~||------",source,0,255,0) outputChatBox("Made by: Manve",source,255,255,0) outputChatBox("Helpers: MTA Community",source,255,255,0) outputChatBox("Testers: Enjoy + Takashi",source,255,255,0) outputChatBox("Have Fun turfing \"{SMILIES_PATH}/icon_wink.gif\" alt=\"\" title=\"Wink\" />",source,255,255,0) outputChatBox("------||~ END ~||------",source,255,0,0) end addEventHandler("onPlayerJoin", root, info) addEventHandler( 'onColShapeHit', root, function( p ) -- you should have added player param here if (getPlayerTeam( p )) then if( source == pCuboid ) then outputChatBox("------||~ INFO ~||------", p, 0,255,0) outputChatBox("Turf owners: coming soon!", p, 255,255,0) outputChatBox("Taken time: 10minutes.", p, 255,255,0) outputChatBox("Wait 10min to take turf.", p, 255,255,0) outputChatBox("------||~ END ~||------", p, 255,0,0) setRadarAreaFlashing( pArea, true ) local pGang4 = getPlayerGang( p ) -- source is the col shape, you should use 'p', the player arg setTimer( function() setRadarAreaColor (pArea, iR, iG, iB, 100); givePlayerMoney( p, 4000 ); outputChatBox( "Congratulations, #FFFF00 you have taken the turf!", p, 0, 255, 0, true ); setRadarAreaFlashing( pArea, false ) end, 600000, 1 ) end else outputChatBox("Get in a group first!",p, 255, 0, 0) end end ) addEventHandler( 'onColShapeLeave', root, function( ) if( source == pCuboid ) then setRadarAreaFlashing( pArea, false ) end end ) ----------------------------- addEventHandler( 'onColShapeHit', root, function( p ) -- you should have added player param here if (getPlayerGang( p )) then if( source == pCuboid2 ) then outputChatBox("------||~ INFO ~||------", p, 0,255,0) outputChatBox("Turf owners: coming soon!", p, 255,255,0) outputChatBox("Taken time: 10minutes.", p, 255,255,0) outputChatBox("Wait 10min to take turf.", p, 255,255,0) outputChatBox("------||~ END ~||------", p, 255,0,0) setRadarAreaFlashing( pArea2, true ) local pGang4 = getPlayerGang( p ) -- source is the col shape, you should use 'p', the player arg setTimer( function() setRadarAreaColor (pArea2, iR2, iG2, iB2, 100); givePlayerMoney( p, 4000 ); outputChatBox( "Congratulations, #FFFF00 you have taken the turf!", p, 0, 255, 0, true ); setRadarAreaFlashing( pArea2, false ) end, 600000, 1 ) end else outputChatBox("Get in a group first!",p, 255, 0, 0) end end ) addEventHandler( 'onColShapeLeave', root, function( ) if( source == pCuboid2 ) then setRadarAreaFlashing( pArea2, false ) end end ) ------------------------------------ addEventHandler( 'onColShapeHit', root, function( p ) -- you should have added player param here if (getPlayerGang( p )) then if( source == pCuboid3 ) then outputChatBox("------||~ INFO ~||------", p, 0,255,0) outputChatBox("Turf owners: coming soon!", p, 255,255,0) outputChatBox("Taken time: 10minutes.", p, 255,255,0) outputChatBox("Wait 10min to take turf.", p, 255,255,0) outputChatBox("------||~ END ~||------", p, 255,0,0) setRadarAreaFlashing( pArea3, true ) local pGang4 = getPlayerGang( p ) -- source is the col shape, you should use 'p', the player arg setTimer( function() setRadarAreaColor (pArea3, iR2, iG2, iB2, 100); givePlayerMoney( p, 4000 ); outputChatBox( "Congratulations, #FFFF00 you have taken the turf!", p, 0, 255, 0, true ); setRadarAreaFlashing( pArea3, false ) end, 600000, 1 ) end else outputChatBox("Get in a group first!",p, 255, 0, 0) end end ) addEventHandler( 'onColShapeLeave', root, function( ) if( source == pCuboid3 ) then setRadarAreaFlashing( pArea3, false ) end end ) ------------------------------------- addEventHandler( 'onColShapeHit', root, function( p ) -- you should have added player param here if (getPlayerGang( p )) then if( source == pCuboid4 ) then outputChatBox("------||~ INFO ~||------", p, 0,255,0) outputChatBox("Turf owners: coming soon!", p, 255,255,0) outputChatBox("Taken time: 10minutes.", p, 255,255,0) outputChatBox("Wait 10min to take turf.", p, 255,255,0) outputChatBox("------||~ END ~||------", p, 255,0,0) setRadarAreaFlashing( pArea4, true ) local pGang4 = getPlayerGang( p ) -- source is the col shape, you should use 'p', the player arg setTimer( function() setRadarAreaColor (pArea4, iR2, iG2, iB2, 100); givePlayerMoney( p, 4000 ); outputChatBox( "Congratulations, #FFFF00 you have taken the turf!", p, 0, 255, 0, true ); setRadarAreaFlashing( pArea4, false ) end, 600000, 1 ) end else outputChatBox("Get in a group first!",p, 255, 0, 0) end end ) addEventHandler( 'onColShapeLeave', root, function( ) if( source == pCuboid4 ) then setRadarAreaFlashing( pArea4, false ) end end ) what is wrong here?
  7. if yes then i am trying to put it in ur Turf System.but nothing
  8. i wanna create Turf System and i am using Gang System by Castiol,SO i need function. local pGang4 = getPlayerGang( p ) this is right?
  9. still not working i tested it
  10. again nothing where i must put that line in this script? local screenX, screenY = guiGetScreenSize() local width, height = 200, 200 local x = (screenX/2) - (width/2) local y = (screenY/2) - (height/2) local lp = getLocalPlayer() theWindow = guiCreateWindow(x,y,width,height,"FOG Premium Panel",false) guiWindowSetSizable(theWindow,false) guiSetVisible (theWindow, false) spawnBut = guiCreateButton(0.0604,0.120,0.4,0.2,"Spawn",true,theWindow) engenieBut = guiCreateButton(0.0604,0.420,0.4,0.2,"Engenie",true,theWindow) lockBut = guiCreateButton(0.490,0.420,0.4,0.2,"Lock",true,theWindow) lightsBut = guiCreateButton(0.0604,0.720,0.4,0.2,"Lights",true,theWindow) destroyBut = guiCreateButton(0.490,0.120,0.4,0.2,"Destroy",true,theWindow) function resourceStart () bindKey ("F3", "down", menuShow) end addEventHandler ("onClientResourceStart", getResourceRootElement ( getThisResource () ), resourceStart) function menuShow () visableornot = guiGetVisible (theWindow) if (visableornot == true) then guiSetVisible (theWindow, false) showCursor (false) end if (visableornot == false) then guiSetVisible (theWindow, true) showCursor (true) end end addEvent ("carSpawn", true) addEvent ("carDestroy", true) function guiClick (button, state, absoluteX, absoluteY) if (source == spawnBut) then triggerServerEvent ("carSpawn", lp) elseif (source == destroyBut) then triggerServerEvent ("carDestroy", lp) elseif (source == engenieBut) then triggerServerEvent ("engenieSwitch", lp) elseif (source == lockBut) then triggerServerEvent ("lockSwitch", lp) elseif (source == lightsBut) then triggerServerEvent ("lightsSwitch", lp) end end addEventHandler ("onClientGUIClick", getRootElement(), guiClick) carshopWindow = guiCreateWindow(500,200,290,440,"Car Shop",false) guiSetVisible (carshopWindow, false) guiSetAlpha(carshopWindow,1) guiWindowSetSizable(carshopWindow,false) selectLabel = guiCreateLabel(0.0423,0.1009,0.8889,0.078,"Select your car",true,carshopWindow) guiSetAlpha(selectLabel,1) guiLabelSetColor(selectLabel,255,255,255) guiLabelSetVerticalAlign(selectLabel,"top") guiLabelSetHorizontalAlign(selectLabel,"left",false) guiSetFont(selectLabel,"default-bold-small") carGridList = guiCreateGridList(0.0476,0.1789,0.9048,0.6789,true,carshopWindow) guiGridListSetSelectionMode(carGridList,0) carColumn = guiGridListAddColumn(carGridList,"Car",0.5) costColumn = guiGridListAddColumn(carGridList,"$",0.3) local cars = {{579,60000},{400,60000},{404,28000},{489,65000},{505,65000},{479,45000},{442,45000},{458,45000},{602,50000},{496,42500},{401,41000},{518,60000},{527,75000},{589,75000},{419,45000},{533,75000},{526,50000},{474,55000},{545,50000},{517,45000},{410,41000},{600,50000},{436,41000},{580,50000},{439,75000},{549,75000},{491,45000},{445,45000},{507,45000},{585,45000},{587,75000},{466,55000},{492,50000},{546,45000},{551,45000},{516,45000},{467,45000},{426,47500},{547,45000},{405,55000},{409,75000},{550,45000},{566,45000},{540,45000},{421,50000},{529,45000},{402,120000},{542,65000},{603,120000},{475,75000},{562,120000},{565,95000},{559,120000},{561,50000},{560,120000},{558,100000},{429,120000},{541,120000},{415,120000},{480,95000},{434,100000},{494,120000},{502,120000},{503,120000},{411,120000},{506,120000},{451,120000},{555,95000},{477,95000},{499,25000},{498,25000},{578,50000},{486,70000},{455,75000},{588,50000},{403,75000},{414,50000},{443,75000},{515,75000},{514,75000},{531,12000},{456,45000},{422,45000},{482,95000},{530,12000},{418,45000},{572,12000},{582,50000},{413,50000},{440,50000},{543,65000},{583,12000},{478,35000},{554,50000},{536,75000},{575,75000},{534,75000},{567,75000},{535,75000},{576,75000},{412,75000},{568,75000},{457,12000},{483,45000},{508,40000},{571,10000},{500,55000},{444,120000},{556,120000},{557,120000},{471,20000},{495,100000},{539,75000},{481,2500},{509,2500},{581,45000},{462,12000},{521,60000},{463,50000},{522,75000},{448,12000},{468,45000},{586,45000},{485,12000},{431,60000},{438,45000},{437,60000},{574,12000},{420,45000},{525,75000},{408,50000},{428,65000}} for i,v in ipairs (cars) do local carName = getVehicleNameFromModel (v[1]) local row = guiGridListAddRow (carGridList) guiGridListSetItemText (carGridList, row, 1, carName, false, true) guiGridListSetItemText (carGridList, row, 2, tostring(v[2]), false, true) end guiSetAlpha(carGridList,1) buyButton = guiCreateButton(0.0476,0.8624,0.7778,0.0963,"Buy it!",true,carshopWindow) guiSetAlpha(buyButton,1) closeButton = guiCreateButton(0.8571,0.8624,0.0899,0.1009,"x",true,carshopWindow) addEvent ("viewGUI", true) function viewGUI () if (getLocalPlayer() == source) then guiSetVisible (carshopWindow, true) showCursor (true) end end addEventHandler ("viewGUI", getRootElement(), viewGUI) function onClientGUIClick (button, state, absoluteX, absoluteYe) if (source == buyButton) then guiSetVisible (carshopWindow, false) showCursor (false) if (guiGridListGetSelectedItem (carGridList)) then local carName = guiGridListGetItemText (carGridList, guiGridListGetSelectedItem (carGridList), 1) local carID = getVehicleModelFromName (carName) local carCost = guiGridListGetItemText (carGridList, guiGridListGetSelectedItem (carGridList), 2) triggerServerEvent ("carShopCarBuy", getLocalPlayer(), carID, carCost, carName) end elseif (source == closeButton) then guiSetVisible (carshopWindow, false) showCursor (false) end end addEventHandler ("onClientGUIClick", getRootElement(), onClientGUIClick)
  11. thnx i read it but i dunno how to convert i try to do it but nothing thats why i post it here
  12. ya but how to make F6 aviable only for Admins?
  13. GUIEditor_Label = {} local ListaAutos = {} theWindow = guiCreateWindow(15,50,300,400,"FOG Vehicle",false) guiWindowSetSizable(theWindow,false) guiSetVisible (theWindow, false) guiLabelSetHorizontalAlign(GUIEditor_Label[1],"left",false) guiSetFont(GUIEditor_Label[1],"default-bold-small") spawnBut = guiCreateButton(0.01,0.8,0.3,0.05,"Pick",true,theWindow) destroyBut = guiCreateButton(0.34,0.8,0.3,0.05,"Hide",true,theWindow) lockBut = guiCreateButton(0.65,0.06,0.3,0.1,"Lock/UnLock",true,theWindow) venderBut = guiCreateButton(0.65,0.8,0.3,0.05,"Sell",true,theWindow) locaBut = guiCreateButton(0.01,0.9,0.3,0.05,"Locate",true,theWindow) recoBut = guiCreateButton(0.34,0.9,0.3,0.05,"Verme",true,theWindow) closeBut = guiCreateButton(0.65,0.9,0.3,0.1,"Close",true,theWindow) info = guiCreateLabel(0.03,0.05,0.50,0.3,"Your Vehicle: No Vehicle!",true,theWindow) guiLabelSetColor(info, 255, 255, 0) info2 = guiCreateLabel(0.03,0.1,0.50,0.3,"Locacion: ",true,theWindow) guiLabelSetColor(info2, 255, 255, 0) -- es X, Y, Anchura, Altura addEvent("creamoslista",true) function creamoslista(ida,autos1) autos = guiCreateGridList ( 0.01, 0.19, 0.91, 0.60, true,theWindow ) ListaAutos = autos column = guiGridListAddColumn( autos, "Id:", 0.35)--, true, theWindow ) column1 = guiGridListAddColumn( autos, "Vehicle", 0.50 ) if ( column ) then for index, Vehi1 in ipairs ( ida ) do local row = guiGridListAddRow ( autos ) guiGridListSetItemText ( autos, row, 1, Vehi1 [ "id" ], false, false ) end row = 0 for index, Vehi1 in ipairs ( autos1 ) do guiGridListSetItemText ( autos, row, 2, Vehi1 [ "vehicle" ], false, false ) row = row + 1 end end end addEventHandler ("creamoslista", getRootElement(), creamoslista) function resourceStart () bindKey ("F2", "down", menuShow) listnone () end addEventHandler ("onClientResourceStart", getResourceRootElement ( getThisResource () ), resourceStart) function menuShow () visableornot = guiGetVisible (theWindow) triggerServerEvent ("pidoinformacion", localPlayer) --creamoslista() if (visableornot == true) then guiSetVisible (theWindow, false) showCursor (false) end if (visableornot == false) then guiSetVisible (theWindow, true) showCursor (true) end end addEvent ("carSpawn", true) addEvent ("carDestroy", true) addEvent ("lockSwitch", true) function guiClick (button, state, absoluteX, absoluteY) if (source == spawnBut) then if (guiGridListGetSelectedItem (ListaAutos)) then local carName = guiGridListGetItemText (ListaAutos, guiGridListGetSelectedItem (ListaAutos), 2) local carId = guiGridListGetItemText (ListaAutos, guiGridListGetSelectedItem (ListaAutos), 1) triggerServerEvent ("carSpawn", getLocalPlayer(),carName,carId) else return end elseif (source == destroyBut) then if (guiGridListGetSelectedItem (ListaAutos)) then local carName = guiGridListGetItemText (ListaAutos, guiGridListGetSelectedItem (ListaAutos), 2) local carId = guiGridListGetItemText (ListaAutos, guiGridListGetSelectedItem (ListaAutos), 1) triggerServerEvent ("carDestroy", getLocalPlayer(), carName,carId) else return end elseif (source == closeBut) then guiSetVisible ( theWindow, false ) showCursor ( false ) elseif (source == lockBut) then triggerServerEvent ("lockSwitch",getLocalPlayer()) elseif (source == locaBut) then triggerServerEvent ("VerCoche", getLocalPlayer()) elseif (source == recoBut) then setCameraTarget(getLocalPlayer()) elseif (source == venderBut) then if (guiGridListGetSelectedItem (ListaAutos)) then -- local carName = guiGridListGetItemText (autos, guiGridListGetSelectedItem (autos)) local carName = guiGridListGetItemText (ListaAutos, guiGridListGetSelectedItem (ListaAutos), 2) local carId = guiGridListGetItemText (ListaAutos, guiGridListGetSelectedItem (ListaAutos), 1) triggerServerEvent ("carVende", getLocalPlayer(), carName,carId) guiSetVisible ( theWindow, false ) showCursor ( false ) else return end end end addEventHandler ("onClientGUIClick", getRootElement(), guiClick) function listnone () autos = guiCreateGridList ( 0.01, 0.19, 0.91, 0.60, true,theWindow ) ListaAutos = autos column = guiGridListAddColumn( autos, "Id:", 0.35)--, true, theWindow ) column1 = guiGridListAddColumn( autos, "vehicle", 0.50 ) end addEvent ("listnone",true) addEventHandler ("listnone",getRootElement(),listnone) function doyauto1 (id,nombre) --creamoslista() local ids = id local nuevonombre = nombre Autos1 = guiGridListAddRow( autos ) guiGridListSetItemText(autos, Autos1 , column,nuevonombre,false,false) end addEvent ("doyauto1",true) addEventHandler ("doyauto1",getRootElement(),doyauto1) function doyauto2 (id,nombre) --creamoslista() local ids = id local nuevonombre = nombre Autos2 = guiGridListAddRow( autos ) guiGridListSetItemText(autos, Autos2 , column,nuevonombre,false,false) end addEvent ("doyauto2",true) addEventHandler ("doyauto2",getRootElement(),doyauto2) function vaciamosLista () guiGridListRemoveRow (ListaAutos, guiGridListGetSelectedItem (ListaAutos), 1 ) triggerServerEvent ("pidoinformacion", localPlayer) end addEvent ("vaciamosLista",true) addEventHandler ("vaciamosLista",getRootElement(),vaciamosLista) function DamosIDyNombre (AutoId,AutoNombre, Locacion) guiSetText(info,"your Vehicle : " .. AutoNombre) guiSetText(info2,"Locacion: " .. Locacion) end addEvent ("DamosIDyNombre",true) addEventHandler ("DamosIDyNombre",getRootElement(),DamosIDyNombre) function SinAuto () guiSetText(info,"Your Vehicle: No Vehicle!") guiSetText(info2,"Locacion: ") end addEvent ("SinAuto",true) addEventHandler ("SinAuto",getRootElement(),SinAuto) function CamaraCoche (x,y,z) setCameraMatrix(x - 20 ,y+10,z + 10.5,1468.388671875, -918.42474365234, 99.881813049316,0,90) end addEvent ("CamaraCoche",true) addEventHandler ("CamaraCoche",getRootElement(),CamaraCoche) function onSoundEvent (x,y,z ) -- playSoundFrontEnd ( 45 ) local sound1 = playSound3D("carAlarmArming.mp3", x,y,z, false) triggerServerEvent ("apagaluz", localPlayer) end addEvent ("alarm",true) addEventHandler ("alarm",getRootElement(),onSoundEvent) how to create this gui visible only for ACL group "VIP"?????
  14. lol for every vehicle it would be very hard is their any other way?
  15. how to make mechanic fix car by command? for example i stand near car and i type fixcar it wil fix car and it will take from owner money
  16. idk what is wrong here but when i enter 1st marker the second marker placed by not coordinats that i put in script local robberTable = { {662.77813720703,-1466.8835449219,14}; {1081.1281738281,-1697.1042480469,13}; {1889.9724121094,-1102.2674560547,25}; {2502.1149902344, -1348.7891845703,29}; {2267.6799316406,-1670.7275390625,15}; {2322.2175292969,-1796.1129150391,13}; } function unpackRobber () return unpack ( robberTable [ math.random ( #robberTable ) ] ) end function createRoute () if ( source == buttonrob ) then x, y, z = unpackRobber () robbMarker = createMarker ( x, y, z, "cylinder", 1.5, 250, 0, 0, 85 ) addEventHandler("onClientMarkerHit",robbMarker,unctrob) robberBlip = createBlipAttachedTo( robbMarker, 32 ) setElementVisibleTo( robbmarker, getRootElement(), false ) setElementVisibleTo( robberblip, getRootElement(), false ) setElementVisibleTo( robbmarker, source, true ) setElementVisibleTo( robberblip, source, true ) end end addEventHandler ( "onClientGUIClick", root, createRoute ) function unctrob ( hitElement ) if ( not isPedInVehicle ( localPlayer ) and hitElement == localPlayer ) then triggerServerEvent ( "givePayRob", localPlayer ) destroyElement ( robbMarker ) destroyElement ( robberBlip ) createRoute() end end function fun () cancelEvent () end addEventHandler ( "onClientPedDamage", resourceRoot, fun ) EDIT:It's placed by coordinats of another script wich is in that folder
×
×
  • Create New...