BluntZ Posted July 17, 2015 Posted July 17, 2015 Hello Any one can help me ? I tried to make group spawner but its not working , Can you help me find error And solve it ? GUIEditor_Button = {} GUIEditor_Grid = {} GUIEditor_Marker = {} GUIEditor_Window = {} local marker = {} local groupName = 'Military' vehicleId = {402} marker = createMarker(270.71, 2045.76, 34.32,"cylinder",1.5,0,0,150,150) local x,y = guiGetScreenSize() local x = x - 208 local y = y - 321 GUIEditor_Window[1] = guiCreateWindow(500,147,246,413,"Select Car",false) guiSetVisible(GUIEditor_Window[1],false) guiSetAlpha(GUIEditor_Window[1],1) guiWindowSetSizable(GUIEditor_Window[1],false) GUIEditor_Grid[1] = guiCreateGridList(9,34,228,255,false,GUIEditor_Window[1]) guiGridListSetSelectionMode(GUIEditor_Grid[1],2) column = guiGridListAddColumn(GUIEditor_Grid[1],"vehicle name",0.5) GUIEditor_Button[2] = guiCreateButton(20,308,210,41,"Select",false,GUIEditor_Window[1]) GUIEditor_Button[1] = guiCreateButton(20,352,210,41,"Close",false,GUIEditor_Window[1]) for i,id in ipairs ( vehicleId ) do guiGridListSetItemText ( GUIEditor_Grid[1], guiGridListAddRow( GUIEditor_Grid[1] ), column, getVehicleNameFromModel( id ), false, false ) end addEventHandler ("onClientMarkerHit", marker, function( player ) if getPlayerTeam( player ) and getTeamName( getPlayerTeam( player ) ) == 'No Team' and not isPedInVehicle( player ) and player == localPlayer and getElementData ( player , "Group" ) == groupName then x999,y999,z999 = getElementPosition( localPlayer ) setElementFrozen ( localPlayer, true ) guiSetVisible(GUIEditor_Window[1],true) showCursor( true ) end end ) Thanks in advance
GTX Posted July 17, 2015 Posted July 17, 2015 What is not working specifically? Any errors in /debugscript 3?
BluntZ Posted July 17, 2015 Author Posted July 17, 2015 THere is no bugs in debugscript 3 I also cant understand why its not working
GTX Posted July 17, 2015 Posted July 17, 2015 I said what is not working, not why. Anyways, try this: GUIEditor_Button = {} GUIEditor_Grid = {} GUIEditor_Marker = {} GUIEditor_Window = {} local marker = {} local groupName = 'Military' vehicleId = {402} marker = createMarker(270.71, 2045.76, 34.32,"cylinder",1.5,0,0,150,150) local x,y = guiGetScreenSize() local x = x - 208 local y = y - 321 GUIEditor_Window[1] = guiCreateWindow(500,147,246,413,"Select Car",false) guiSetVisible(GUIEditor_Window[1],false) guiSetAlpha(GUIEditor_Window[1],1) guiWindowSetSizable(GUIEditor_Window[1],false) GUIEditor_Grid[1] = guiCreateGridList(9,34,228,255,false,GUIEditor_Window[1]) guiGridListSetSelectionMode(GUIEditor_Grid[1],2) column = guiGridListAddColumn(GUIEditor_Grid[1],"vehicle name",0.5) GUIEditor_Button[2] = guiCreateButton(20,308,210,41,"Select",false,GUIEditor_Window[1]) GUIEditor_Button[1] = guiCreateButton(20,352,210,41,"Close",false,GUIEditor_Window[1]) for i,id in ipairs ( vehicleId ) do guiGridListSetItemText ( GUIEditor_Grid[1], guiGridListAddRow( GUIEditor_Grid[1] ), column, getVehicleNameFromModel( id ), false, false ) end addEventHandler ("onClientMarkerHit", marker, function( player ) if not isPedInVehicle( player ) and player == localPlayer and getElementData ( player , "Group" ) == groupName then x999,y999,z999 = getElementPosition( localPlayer ) setElementFrozen ( localPlayer, true ) guiSetVisible(GUIEditor_Window[1],true) showCursor( true ) end end )
BluntZ Posted July 17, 2015 Author Posted July 17, 2015 I said what is not working, not why. Anyways, try this: GUIEditor_Button = {} GUIEditor_Grid = {} GUIEditor_Marker = {} GUIEditor_Window = {} local marker = {} local groupName = 'Military' vehicleId = {402} marker = createMarker(270.71, 2045.76, 34.32,"cylinder",1.5,0,0,150,150) local x,y = guiGetScreenSize() local x = x - 208 local y = y - 321 GUIEditor_Window[1] = guiCreateWindow(500,147,246,413,"Select Car",false) guiSetVisible(GUIEditor_Window[1],false) guiSetAlpha(GUIEditor_Window[1],1) guiWindowSetSizable(GUIEditor_Window[1],false) GUIEditor_Grid[1] = guiCreateGridList(9,34,228,255,false,GUIEditor_Window[1]) guiGridListSetSelectionMode(GUIEditor_Grid[1],2) column = guiGridListAddColumn(GUIEditor_Grid[1],"vehicle name",0.5) GUIEditor_Button[2] = guiCreateButton(20,308,210,41,"Select",false,GUIEditor_Window[1]) GUIEditor_Button[1] = guiCreateButton(20,352,210,41,"Close",false,GUIEditor_Window[1]) for i,id in ipairs ( vehicleId ) do guiGridListSetItemText ( GUIEditor_Grid[1], guiGridListAddRow( GUIEditor_Grid[1] ), column, getVehicleNameFromModel( id ), false, false ) end addEventHandler ("onClientMarkerHit", marker, function( player ) if not isPedInVehicle( player ) and player == localPlayer and getElementData ( player , "Group" ) == groupName then x999,y999,z999 = getElementPosition( localPlayer ) setElementFrozen ( localPlayer, true ) guiSetVisible(GUIEditor_Window[1],true) showCursor( true ) end end ) Thanks but now GUI is not closing/Can't spawn Any vehicle
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now