Jump to content

Como crear comandos para teletrasportarse?


emaa24

Recommended Posts

Posted

Hola bueno, tengo pensado hacer un servidor de drift, y quisiera saber, como se hace para teletrasportarse a una pista con un comando, por ejemplo para ir a la colina de SF /bigear, y te lleva alla... desde ya muchas gracias, un saludo!

Posted

Facil, esto ponlo en "Server":

Code:

function teletransporte (thePlayer) 
    setElementPosition ( thePlayer, -310.43, 1522.56, 75.35937 ) 
end 
addCommandHandler ("bigear",teletransporte) 

esto te llevará a The Big Ear, en El desierto cerca del Area 51.

Posted
addCommandHandler("tp", function(p, c, x, y, z) 
     if not p or not type(x) == "number" or not type(y) == "number" or not type(z) == "number" then return end 
     setElementPosition(p, x, y, z) 
end) 

/tp 0 0 0 te llevaría a una granja

Posted (edited)

Muchas gracias a todos por responder, ahora mismo los pruebo y les comento como me fue :D

[EDIT] Genial!! Me funciono muchas gracias por la ayuda _:D

Edited by Guest
Posted

yo decía que podía hacer algo así..

function teletransporte (source) 
    setElementPosition ( source, 1109, 1541, 3269 ) -- Lugar al que vas al poner el comando 
end 
addCommandHandler ( "bigear", teletransporte ) 
  

Yo digo que mejor lo use así. y si le sirve el otro bueno :D

yo intente con thePlayer y solo te teletrasporta a ti, pero a los demás usuarios no les sirvió.

Posted
function teletransporte ( source, commandName, posX, posY, posZ ) 
    setElementPosition ( source, 1109, 1541, 3269 ) 
end 
addCommandHandler ( "bigear", teletransporte ) 

Posted
function teletransporte ( thePlayer ) 
    local theElement = ( isPedInVehicle ( thePlayer ) and getPedOccupiedVehicle ( thePlayer ) or thePlayer ) 
    setElementPosition ( theElement, 1109, 1541, 3269 ) 
end 
addCommandHandler ( "bigear", teletransporte ) 

  • Recently Browsing   0 members

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