PiojitoS Posted May 28, 2014 Share Posted May 28, 2014 Necesito ayuda con un trabajo de camionero que estoy haciendo, yo quiero hacer que cuando te de el vehiculo te lo de con un acoplado (Trailer), no se como es eso yo solo puse que te de el camion solo... me ayudan?? ---Client---- for i = 1, 6 do guiGridListAddRow(gridlistVehiculosTrucker) end guiGridListSetItemText(gridlistVehiculosTrucker, 0, 1, "403", false, false) guiGridListSetItemText(gridlistVehiculosTrucker, 0, 2, "Linerunner", false, false) guiGridListSetItemText(gridlistVehiculosTrucker, 1, 1, "514", false, false) guiGridListSetItemText(gridlistVehiculosTrucker, 1, 2, "Tanker", false, false) ----Client---- function createvehTrucker() local pspawnerT = getLocalPlayer() local x, y, z = getElementPosition ( pspawnerT ) local vehicleT = guiGridListGetItemText ( gridlistVehiculosTrucker, guiGridListGetSelectedItem ( gridlistVehiculosTrucker ), 1 ) if vehicleT then triggerServerEvent("onSpawnVehT", localPlayer, tonumber(vehicleT)) guiSetVisible(windowVehTrucker, false) showCursor(false) end end addEventHandler("onClientGUIClick", spawnVehT, createvehTrucker, false) Link to comment
Tomas Posted May 29, 2014 Share Posted May 29, 2014 No te entendí mucho, tu quieres agregar un trailer atrás? Debes attachearlo al camión que spawneas. Link to comment
BorderLine Posted May 29, 2014 Share Posted May 29, 2014 ejemplo de la wiki. Donde usas createVehicle newvehicle = createVehicle ( 515, 500, 500, 40 ) -- create a trailer tower (roadtrain) trailer = createVehicle ( 435, 500, 505, 40 ) -- create a trailer attachTrailerToVehicle ( newvehicle, trailer ) -- attach them Link to comment
Recommended Posts