Rampin97 Posted January 14, 2013 Posted January 14, 2013 Ciao a tutti! Sto creando una mappa race e nello spawnpoint c'è un camion... E' possibile fare in modo che ci sia il rimorchio insieme al camion? Cioè vorrei che sia già collegato dall'inizio della gara. Premetto che non so niente di script .lua ma so come si mettono Grazie a tutti!
HunT Posted January 14, 2013 Posted January 14, 2013 Certo che si puo fare. Pero ho bisogno di informazioni: id camion id rimorchio
Rampin97 Posted January 14, 2013 Author Posted January 14, 2013 Grazie mille Huntrix! id camion: 515 id rimorchio: 450
HunT Posted January 15, 2013 Posted January 15, 2013 Purtroppo stasera sono al pc,se vuoi attendere. Cmq è molto semplice,basta fare un client side con : Evento onClientVehicleEnter getElementModel per controllare se entri nel camion Creare il rimorchio Ed attaccarlo
Rampin97 Posted January 15, 2013 Author Posted January 15, 2013 No no, sono proprio negato Puoi stare anche tranquillo se vuoi aspetto anche una settimana
HunT Posted January 15, 2013 Posted January 15, 2013 Gia Testata. Client Side : Fai un file e chiamalo -> rimorchio.lua <- ed inserisci questo : addEventHandler("onClientVehicleEnter", root, function(thePlayer, seat) local theVehicle = source if seat == 0 and thePlayer == localPlayer and getElementModel(theVehicle) == 515 then rimorchio = createVehicle ( 450, 0, 0, 0 ) attachTrailerToVehicle ( theVehicle, rimorchio) end end ) addEventHandler("onClientVehicleExit", root, function(thePlayer, seat) local theVehicle = source if seat == 0 and thePlayer == localPlayer and getElementModel(theVehicle) == 515 then destroyElement (rimorchio) end end ) Nel meta.xml aggiungi : <script src="rimorchio.lua" type="client" /> Aggiungi questa stringa subito dopo Esempio : <meta> <script src="rimorchio.lua" type="client" />
Rampin97 Posted January 15, 2013 Author Posted January 15, 2013 Grazie Mille! Mi sei stato d'aiuto! Grazie ancora
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