Plate Posted June 8, 2012 Share Posted June 8, 2012 hola miren me tome mucho mucho tiempo estudiando (me parece que esta mal pero bue ) auto = createVehicle createVehicle ( 433, -2270, 2300.8999023438, 5.4000000953674, 0, 0, 270 ) function autos(player, seat, jacked) if source == auto then local accountname = getAccountName (getPlayerAccount(player)) if isObjectInACLGroup ( "user." .. accountname, aclGetGroup ( "Umbrella" ) ) then return end cancelEvent() outputChatBox ( "solamente umbrella puede usar estos vehiculos", player, 255, 0, 0, true ) end end addEventHandler ( "onVehicleStartEnter", getRootElement(), autos ) pero no siirveeee Link to comment
iFoReX Posted June 8, 2012 Share Posted June 8, 2012 lol , tienes errores de sintaxis basicos auto = createVehicle ( 433, -2270, 2300.8999023438, 5.4000000953674, 0, 0, 270 ) function autos(thePlayer, seat) if seat ~= 0 then and source == auto then --------- talvez no entiendas lo que significa ~=, es : si es diferente a local accountname = getAccountName (getPlayerAccount(thePlayer)) if isObjectInACLGroup ( "user." .. accountname, aclGetGroup ( "Umbrella" ) ) then return end cancelEvent() outputChatBox ( "solamente umbrella puede usar estos vehiculos", thePlayer, 255, 0, 0, true ) end end addEventHandler ( "onVehicleStartEnter", root, autos ) ----Si hay ifs tienes que poner root Link to comment
Castillo Posted June 8, 2012 Share Posted June 8, 2012 ----Si hay ifs tienes que poner root Que??????????????? 'root' es lo mismo que getRootElement ( ) salvo que mas corto. Link to comment
Plate Posted June 8, 2012 Author Share Posted June 8, 2012 (edited) muchas gracias ElMota y Solid son los mejores una cosa mas : que esta mal de esto cylinder3 = createMarker(206.76786804199,1860.228515625,13.140625 ,"cylinder3",1.5,0,125,250,153) function mostrarTienda(hitPlayer) triggerClientEvent(hitPlayer,"mostrarTienda",getRootElement(),hitPlayer) end addEventHandler("onMarkerHit",cylinder,mostrarTienda) me disculpo con edi por lo de la otra ves es que estaba demaciado cansado y en enojado , el me dijo eso y enojo mas todabia ElMota tiene un error el script dice main_s.lua:14: unexpect symbol near "and" Edited June 8, 2012 by Guest Link to comment
Castillo Posted June 8, 2012 Share Posted June 8, 2012 El tipo de marker esta mal, porque pusistes: "cylinder3" ? es "cylinder". Link to comment
Plate Posted June 8, 2012 Author Share Posted June 8, 2012 es que solid uso el mismo recurso (tienda_de_armas) le cambio las imagenes y las id de las armas para que de otras (osea seria otra tienda) y se me mesclan las 2 Link to comment
Castillo Posted June 8, 2012 Share Posted June 8, 2012 Pero eso es el tipo de marker, no el ID. Link to comment
Plate Posted June 8, 2012 Author Share Posted June 8, 2012 ya lo se solid es qe nose como cambiar el marker solid el recurso que corrigio ElMota no funciona me dice main_s.lua:14: unexpect symbol near "and" Link to comment
iFoReX Posted June 8, 2012 Share Posted June 8, 2012 lol plate, no estas entendiendo a solid, borra el 3 solamente ya que ese es un argumento del tipo de marker Link to comment
Plate Posted June 8, 2012 Author Share Posted June 8, 2012 hay ? mira cylinder3 = createMarker(206.76786804199,1860.228515625,13.140625 ,"cylinder",1.5,0,125,250,153) function mostrarTienda(hitPlayer) triggerClientEvent(hitPlayer,"mostrarTienda",getRootElement(),hitPlayer) end addEventHandler("onMarkerHit",cylinder3,mostrarTienda) ElMota hay un error en el script que me pasastes auto = createVehicle ( 433, -2270, 2300.8999023438, 5.4000000953674, 0, 0, 270 ) function autos(thePlayer, seat) if seat ~= 0 then and source == auto then local accountname = getAccountName (getPlayerAccount(thePlayer)) if isObjectInACLGroup ( "user." .. accountname, aclGetGroup ( "Umbrella" ) ) then return end cancelEvent() outputChatBox ( "solamente umbrella puede usar estos vehiculos", thePlayer, 255, 0, 0, true ) end end addEventHandler ( "onVehicleStartEnter", root, autos ) Link to comment
Edikosh998 Posted June 8, 2012 Share Posted June 8, 2012 No tendria que ser if seat == 0 Osea, es cuando entra al asiento del conductor. Link to comment
Plate Posted June 8, 2012 Author Share Posted June 8, 2012 cuando pongo start recurso1 en el panel de la consola sale esto main_s.lua:14: unexpect symbol near "and" y despues warning load script failed Link to comment
iFoReX Posted June 8, 2012 Share Posted June 8, 2012 function autos(thePlayer, seat) if seat ~= 0 and source == auto then local accountname = getAccountName (getPlayerAccount(thePlayer)) if isObjectInACLGroup ( "user." .. accountname, aclGetGroup ( "Umbrella" ) ) then return end cancelEvent() outputChatBox ( "solamente umbrella puede usar estos vehiculos", thePlayer, 255, 0, 0, true ) end end addEventHandler ( "onVehicleStartEnter", root, autos ) sorry se me habia olvidado borrar ese then lol Link to comment
Recommended Posts