-
Posts
382 -
Joined
-
Last visited
Everything posted by yMassai
-
I did not quite understand What you tried to speak. I recommend that you explicase best and show the script.
-
We can help you get a problem you do not understand. First I would say for you to create the gui and then worry about the functions it can perform.
-
The window opens to a player out of a vehicle and for a player inside a vehicle.
-
function pQuit() destroyElement( carros[ source ] ) end addEventHandler("onPlayerQuit",getRootElement(),pQuit) detects bad argument on the console, why?
-
addEventHandler("onClientMarkerHit",carros [ source ], function(p) if p == localPlayer and not isPedInVehicle(localPlayer) then guiSetVisible(carrosWindow,true) showCursor(true) end end) No effect. The player opens the window in a car and outside the car. I want the window does not open when the player is in a vehicle.
-
This? addEventHandler("onClientMarkerHit",carros [ source ], function( p) if p == localPlayer and not isPedInVehicle(localPlayer) then guiSetVisible(carrosWindow,true) showCursor(true) end end) but as i use the "onPlayerQuit" to destroy the vehicle?
-
there is an error, this window open too inside a car.
-
Client carrosWindow = guiCreateWindow(100,100,175,200,"Criador de Carros",false) carrosList = guiCreateGridList ( 0.05, 0.10, 0.9, 0.7, true, carrosWindow) column = guiGridListAddColumn( carrosList, "Cars", 0.85 ) carrosCreate = guiCreateButton(05,170,85,45,"Create",false,carrosWindow) carrosClose = guiCreateButton(110,170,50,45,"Close",false,carrosWindow) guiWindowSetSizable( carrosWindow,false) guiSetVisible( carrosWindow, false ) row = guiGridListAddRow( carrosList ) row2 = guiGridListAddRow( carrosList ) row3 = guiGridListAddRow( carrosList ) guiGridListSetItemText( carrosList, row, column, "Rumpo", false, false ) guiGridListSetItemText( carrosList, row2, column, "Bullet", false, false ) guiGridListSetItemText( carrosList, row3, column, "PutUrCar", false, false ) carrosMarker = createMarker( 1543.98962, -1670.46398, 12.55753, "cylinder", 1.5, 255, 0, 0, 170 ) function elMarker( hitPlayer ) if ( hitPlayer == localPlayer ) then guiSetVisible ( carrosWindow, true ) showCursor(true) end end addEventHandler ( "onClientMarkerHit", carrosMarker, elMarker) addEventHandler ( "onClientGUIClick", root, function ( ) if ( source == carrosClose ) then guiSetVisible ( carrosWindow, false ) showCursor(false) elseif ( source == carrosCreate ) then triggerServerEvent("CreateCarros", getLocalPlayer()) guiSetVisible ( carrosWindow, false ) showCursor(false) end end ) Server local carros = { } addEvent ( "CreateCarros", true ) addEventHandler ( "CreateCarros", getRootElement(), function ( ) if ( isElement ( carros [ source ] ) ) then destroyElement ( carros [ source ] ) end carros [ source ] = createVehicle ( 440,1543.98962, -1670.46398, 13.600, 0, 0, 90 ) warpPedIntoVehicle ( source, carros [ source ] ) end ) To create a bullet too as i do?
-
again i will ask for a help. again, how can i configure to create the selected car?
-
local carros = { } addEvent ( "CreateCarros", true ) addEventHandler ( "CreateCarros", getRootElement(), function ( ) if ( isElement ( carros [ source ] ) ) then destroyElement ( carros [ source ] ) end carros [ source ] = createVehicle ( 440,1543.98962, -1670.46398, 13.600, 0, 0, 90 ) warpPedIntoVehicle ( source, carros [ source ] ) end ) you do not recalled the "then"
-
SCRIPT ERROR: CarrosTest\server.lua:7: 'then' expected near 'destroyElement' WARNING: Loading script failed: CarrosTest\server.lua:7: 'then' expected near 'destroyElement'
-
Client carrosWindow = guiCreateWindow(100,100,175,200,"Criador de Carros",false) carrosList = guiCreateGridList ( 0.05, 0.10, 0.9, 0.7, true, carrosWindow) column = guiGridListAddColumn( carrosList, "Cars", 0.85 ) carrosCreate = guiCreateButton(05,170,85,45,"Create",false,carrosWindow) carrosClose = guiCreateButton(110,170,50,45,"Close",false,carrosWindow) guiWindowSetSizable( carrosWindow,false) guiSetVisible( carrosWindow, false ) row = guiGridListAddRow( carrosList ) row2 = guiGridListAddRow( carrosList ) guiGridListSetItemText( carrosList, row, column, "Rumpo", false, false ) guiGridListSetItemText( carrosList, row2, column, "PutUrCar", false, false ) carrosMarker = createMarker( 1543.98962, -1670.46398, 12.55753, "cylinder", 1.5, 255, 0, 0, 170 ) function elMarker( hitPlayer ) if ( hitPlayer == localPlayer ) then guiSetVisible ( carrosWindow, true ) end end addEventHandler ( "onClientMarkerHit", carrosMarker, elMarker) addEventHandler ( "onClientGUIClick", root, function ( ) if ( source == carrosClose ) then guiSetVisible ( carrosWindow, false ) elseif ( source == carrosCreate ) then triggerServerEvent("CreateCarros", getLocalPlayer()) end end ) Server local carros = { } addEvent("CreateCarros", true) addEventHandler("CreateCarros", getRootElement(), function() carros = createVehicle ( 440,1543.98962, -1670.46398, 13.600, 0,0,90) warpPedIntoVehicle ( source, carros ) if ( isElement ( carrosVehicle[ source ] ) ) destroyElement ( carrosVehicle[ source ] ) end end ) to the server * this way go create only a car?
-
Sorry but i do not understand very well. This part you could create this for me? Sorry for not knowing everything.
-
Client carrosWindow = guiCreateWindow(100,100,175,200,"Criador de Carros",false) carrosList = guiCreateGridList ( 0.05, 0.10, 0.9, 0.7, true, carrosWindow) column = guiGridListAddColumn( carrosList, "Cars", 0.85 ) carrosCreate = guiCreateButton(05,170,85,45,"Create",false,carrosWindow) carrosClose = guiCreateButton(110,170,50,45,"Close",false,carrosWindow) guiWindowSetSizable( carrosWindow,false) guiSetVisible( carrosWindow, false ) row = guiGridListAddRow( carrosList ) row2 = guiGridListAddRow( carrosList ) guiGridListSetItemText( carrosList, row, column, "Rumpo", false, false ) guiGridListSetItemText( carrosList, row2, column, "PutUrCar", false, false ) carrosMarker = createMarker( 1543.98962, -1670.46398, 12.55753, "cylinder", 1.5, 255, 0, 0, 170 ) function elMarker( hitPlayer ) if ( hitPlayer == localPlayer ) then guiSetVisible ( carrosWindow, true ) end end addEventHandler ( "onClientMarkerHit", carrosMarker, elMarker) addEventHandler ( "onClientGUIClick", root, function ( ) if ( source == carrosClose ) then guiSetVisible ( carrosWindow, false ) elseif ( source == carrosCreate ) then triggerServerEvent("CreateCarros", getLocalPlayer()) end end ) Server addEvent("CreateCarros", true) addEventHandler("CreateCarros", getRootElement(), function() carros = createVehicle ( 440,1543.98962, -1670.46398, 13.300, 0,0,90) warpPedIntoVehicle ( carros ) end ) The warpPedIntoVehicle dont work!
-
carrosWindow = guiCreateWindow(100,100,175,200,"Criador de Carros",false) carrosList = guiCreateGridList ( 0.05, 0.10, 0.9, 0.7, true, carrosWindow) column = guiGridListAddColumn( carrosList, "Cars", 0.85 ) carrosCreate = guiCreateButton(05,170,85,45,"Create",false,carrosWindow) carrosClose = guiCreateButton(110,170,50,45,"Close",false,carrosWindow) guiWindowSetSizable( carrosWindow,false) guiSetVisible( carrosWindow, false ) carrosVis = { 440, 320 } for index, model in ipairs ( carrosVis ) do local row = guiGridListAddRow ( carrosList ) guiGridListSetItemText ( carrosList, row, column, tostring ( getVehicleNameFromModel ( model ) ), false, true ) end carrosMarker = createMarker( 1543.98962, -1670.46398, 12.55753, "cylinder", 1.5, 255, 0, 0, 170 ) createCarrosVehicle = createVehicle (??,0,0,0) warpPedIntoVehicle ( carrosCreateVehicles ) addEventHandler ( "onClientMarkerHit", root, function ( hitElement ) if ( hitElement == localPlayer ) then if ( source == carrosMarker ) then guiSetVisible ( carrosWindow, true ) end end end ) addEventHandler ( "onClientGUIClick", root, function ( ) if ( source == carrosClose ) then guiSetVisible ( carrosWindow, false ) end end ) This? Please help me, I have no time to start the script again.
-
Server local carrosCreateVehicle = { } function carrosCreateClick ( ) if ( source == carrosCreateVehicle ) then triggerServerEvent ( "testCreateTest", localPlayer ) testDestroyTestGUI ( ) if ( isElement ( carrosVehicle[ source ] ) ) destroyElement ( carrosVehicle[ source ] ) carrosCreateVehicle = createVehicle ( ??, 1543,98962 , -1670,46398 , 13,0213 ) warpPedIntoVehicle ( carrosVehicle ) end addEventHandler ( "onClientGUIClick", root, carrosCreateClick ) This?
-
you want it destroyed the "blip" when the player quit the game?
-
Maybe function clientClickGuiDoThat ( ) if ( source == blipbutplayer ) then row, col = guiGridListGetSelectedItem ( source ) if ( row and col and row ~= -1 and col ~= -1 ) then local playerblip = createBlipAttachedTo( localPlayer ) else destroyElement(playerblip) end end end addEventHandler("onClientGuiClick", root, clientClickGuiDoThat)
-
Server local carrosCreate = { } function carrosCreateVehicle ( ) carrosCreateVehicles = createVehicle ( ??, 1543.98962 , -1670.46398 , 13.0213 ) warpPedIntoVehicle ( carrosCreateVehicles ) if ( isElement ( carrosCreateVehicle[ source ] ) ) destroyElement ( carrosCreateVehicle[ source ] ) end end this? with i put? guiGridListGetSelectedItem guiGridListGetItemText
-
this? function carrosCreateVehicle ( ) carrosCreateVehicles = createVehicle ( ??, 4, 0, 3 ) warpPedIntoVehicle ( carrosCreateVehicles ) end how can I configure to create the car selected in the list?
-
local carrosCreate = { } if ( isElement ( carrosVehicle[ source ] ) ) destroyElement ( carrosVehicle[ source ] ) this argument would be used to not create more than one car?
-
function carrosCreateClick ( ) if ( source == carrosCreate ) then triggerServerEvent ( "testCreateTest", localPlayer ) testDestroyTestGUI ( ) end addEventHandler ( "onClientGUIClick", root, carrosCreateClick ) carrosVehicle = createVehicle ( ??, 1543,98962 , -1670,46398 , 13,0213 ) warpPedIntoVehicle ( carrosVehicle ) I use these arguments?