andrex123 Posted December 21, 2011 Posted December 21, 2011 Bueno, Ahora quiero crear un scrip, haciendo, que un user/player, cuando entre a un coche, desencadene algo, como outputChatBox, createBlip, Etc. Eso es todo me ayudan
Castillo Posted December 21, 2011 Posted December 21, 2011 function onEnter(thePlayer) -- Cuando entra a un vehiculo. outputChatBox("Hola ".. getPlayerName(thePlayer) .."!",thePlayer,0,255,0) -- Le enviamos un mensaje al jugador. end addEventHandler("onVehicleEnter",root,onEnter) -- Agregamos el evento para cuando un jugador entra a un vehiculo. San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
andrex123 Posted December 22, 2011 Author Posted December 22, 2011 Muy bien,pero, no podemos especificar un coche, por ejemplo cuando suba a un coche de bomberos
Castillo Posted December 22, 2011 Posted December 22, 2011 function onEnter(thePlayer) -- Cuando entra a un vehiculo. if (getElementModel(source) == 407) then -- Si el modelo del vehiculo es del camion de Bomberos.. outputChatBox("Hola ".. getPlayerName(thePlayer) .."!",thePlayer,0,255,0) -- Le enviamos un mensaje al jugador. end end addEventHandler("onVehicleEnter",root,onEnter) -- Agregamos el evento para cuando un jugador entra a un vehiculo. San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
Castillo Posted December 22, 2011 Posted December 22, 2011 De nada. San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
diegofkda Posted December 22, 2011 Posted December 22, 2011 Bloqueado y movido a la sección Scripting. "Everything exists, because otherwise nothing would", Bob Marley, 2015.
Recommended Posts