Jump to content

Como ago esto?


andrex123

Recommended Posts

addCommandHandler -- crear comando 
createMarker -- crear marker 
"onMarkerHit" -- (EVENTO)cuando pise marker 
givePlayerMoney -- dar dinero 

No creo que nesesites nada mas :)

Az click sobre esas funciones, te llevaran a la Wiki, alla encontraras las funciones para cada uno, y ya tu lo organizes en tu script

Link to comment

No se si esto es asi pero bueno lo intente xD

function CreateMarker ( playerSource ) 
    if ( playerSource ) then 
        local x, y, z = getElementPosition ( playerSource ) 
        createMarker ( x, y, z, "checkpoint", 2, 255, 0, 0, 255 ) 
        outputChatBox ( "Grasias por LLevarnos Aqui tienes tu paga 1000$", playerSource ) 
    end 
end 
addCommandHandler ( "ruta", consoleCreateMarker ) 
     
function MarkerHit( hitElement, matchingDimension ) 
        if getElementType( hitElement ) == "player" then 
                givePlayerMoney ( player, 1000 ) 

si no es asi porfavor ayudenme a saber cual erra mi error para la siguente vez :)

Link to comment
function CreateMarker ( playerSource ) 
    if ( playerSource ) then 
        local x, y, z = getElementPosition ( playerSource ) 
        createMarker ( x, y, z, "checkpoint", 2, 255, 0, 0, 255 ) 
        outputChatBox ( "Grasias por LLevarnos Aqui tienes tu paga 1000$", playerSource ) 
    end 
end 
addCommandHandler ( "ruta", CreateMarker ) 
     
function MarkerHit( hitElement, matchingDimension ) 
        if getElementType( hitElement ) == "player" then 
                givePlayerMoney ( player, 1000 ) 
        end 
end 
addEventHandler("onMarkerHit", resourceRoot, MarkerHit) 

Ese era todo tu codigo? o es que solo pegaste la mitad :)

Link to comment
pero si no ayudo numca podre aprender por que si ago un script mal aki sabre que algun me ayudara acorejirlo y si no lo ago pos numca aprendere mis errores

Puedes aprender de muchas maneras, no te procupes por ayudar, al principio mientras aprendas nosotros te ayudamos a ti en lo que podamos, y luego cuando sepas mas pasas a ser de los que ayudan, y asi es la cadena, ami al principio me ayudaban cuandoi no sabia nada, y ahora creo que me defiendo bien y me siento capaz de ayudar en algunas cosas :wink:

Link to comment
function CreateMarker ( playerSource ) 
    if ( playerSource ) then 
        local x, y, z = getElementPosition ( playerSource ) 
        marker = createMarker ( x, y, z, "checkpoint", 2, 255, 0, 0, 255 ) 
        addEventHandler("onMarkerHit", marker, MarkerHit) 
        outputChatBox ( "Grasias por LLevarnos Aqui tienes tu paga 1000$", playerSource ) 
    end 
end 
addCommandHandler ( "ruta", CreateMarker ) 
    
function MarkerHit( hitElement, matchingDimension ) 
        if getElementType( hitElement ) == "player" then 
                givePlayerMoney ( hitElement, 1000 ) 
        end 
end 

Link to comment
No se si esto es asi pero bueno lo intente xD
function CreateMarker ( playerSource ) 
    if ( playerSource ) then 
        local x, y, z = getElementPosition ( playerSource ) 
        createMarker ( x, y, z, "checkpoint", 2, 255, 0, 0, 255 ) 
        outputChatBox ( "Grasias por LLevarnos Aqui tienes tu paga 1000$", playerSource ) 
    end 
end 
addCommandHandler ( "ruta", consoleCreateMarker ) 
     
function MarkerHit( hitElement, matchingDimension ) 
        if getElementType( hitElement ) == "player" then 
                givePlayerMoney ( player, 1000 ) 

si no es asi porfavor ayudenme a saber cual erra mi error para la siguente vez :)

Woooowowowwo wait yo pense que este :arrowup::arrowup::arrowup: era el primer post, no vi lo del piloto y pense que pekio123 era el que necesitaba ayuda :lol:

@andrex123 avisanos si necesitas mas ayuda ok?

Link to comment
vale grasias y entonces cuando tenga algun script que este creando creo un nuevo tema con el script enseñandolo aver si lo ize bien?

Edit: pero me salio bien este mas o menos xD es el primero que ago yo desde 0 xD

Eso ultimo no te lo creo mucho, pero bue...

Si claro, puedes perfectamente crear temas para mostrarnos lo que has hecho, y te podemos ayudar a corregirlos o mejorarlos.

Link to comment
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...