Jump to content

Ayuda con script


iFigaro

Recommended Posts

Hola

Soy nuevo en esto de el foro de MTA LoL

Un amigo me envio un script que al momento de poner un comando aparace una cama con 2 skins aciendo cosas malas :) pero lo que me pregunto es como puedo hacer para que al momento de iniciar el script aga spawn en un lugar en espesifico no alado del jugador (Quiero que aga spawn en una casa pero no lo consigo )

Script

allPlayers = {} 
  
function pedFun(playa,command,male,female) 
    triggerClientEvent(playa,"soundStart",playa) 
    if not countnumber then 
        countnumber = 1 
    else 
        countnumber = countnumber + 1 
    end 
    if not male then 
        male = math.random(0,2) 
    end 
    if not female then 
        female = math.random(6,7) 
    end 
    x,y,z = getElementPosition(playa) 
    if not bed then 
        bed = {} 
    end 
    bed[countnumber] = createObject(2299,x+3,y+2.2,z-1,0,0,180) 
    if not cj then 
        cj = {} 
    end 
    cj[countnumber] = createPed(male,x,y,z) 
    while not cj[countnumber] do 
       cj[countnumber] = createPed(math.random(0,300),x,y,z) 
    end 
    setPedRotation(cj[countnumber],180) 
    addPedClothes(cj[countnumber],"player_torso","torso",0) 
    addPedClothes(cj[countnumber],"player_legs","legs",2) 
    addPedClothes(cj[countnumber],"foot","feet",3) 
    if not slut then 
        slut = {} 
    end 
    slut[countnumber] = createPed(female,x,y,z) 
    while not slut[countnumber] do 
        slut[countnumber] = createPed(math.random(0,300),x,y,z) 
    end 
    addPedClothes(slut[countnumber],"player_torso","torso",0) 
    addPedClothes(slut[countnumber],"player_legs","legs",2) 
    addPedClothes(slut[countnumber],"foot","feet",3) 
    setElementPosition(cj[countnumber],x+2.5,y+0.5,z) 
    setElementPosition(slut[countnumber],x+2.5,y-0.5,z) 
    setTimer(pedFun2,100,1,cj[countnumber],slut[countnumber],bed[countnumber]) 
end 
  
function pedFun2(cj,slut,bed) 
    setPedAnimation(cj,"sex","sex_1_cum_p",1,true,false) 
    setPedAnimation(slut,"sex","sex_1_cum_w",1,true,false) 
    if not sexy then 
        setTimer(delPeds,14000,1,cj,slut,bed) 
    end 
end 
  
function sexBind() 
    bindKey(source,"m","down","sexo") 
    outputChatBox(""Si quieres fiesta preciona "M"!",source,0,255,0,true) 
end 
  
function sexBindStart() 
    outputChatBox("Si quieres fiesta preciona "M"!",getRootElement(),0,255,0,true) 
    players = getElementsByType("player") 
    for i,player in ipairs (players) do 
        bindKey(player,"m","down","sexo") 
    end 
end 
  
function sexKeeper() 
    if not sexy then 
        sexy = true 
        outputChatBox("????!",getRootElement(),0,255,0) 
        else 
        sexy = nil 
        outputChatBox("LoL..!",getRootElement(),255,0,0) 
    end 
end 
  
addCommandHandler("sexo",pedFun) 
addEventHandler("onPlayerJoin",getRootElement(),sexoBind) 
addEventHandler("onResourceStart",getResourceRootElement(getThisResource()),sexoBindStart) 

Gracias

Link to comment
allPlayers = {} 
position = { 0, 0, 5 } 
  
function pedFun(playa,command,male,female) 
    triggerClientEvent(playa,"soundStart",playa) 
    if not countnumber then 
        countnumber = 1 
    else 
        countnumber = countnumber + 1 
    end 
    if not male then 
        male = math.random(0,2) 
    end 
    if not female then 
        female = math.random(6,7) 
    end 
    x, y, z = unpack ( position ) 
    if not bed then 
        bed = {} 
    end 
    bed[countnumber] = createObject(2299,x+3,y+2.2,z-1,0,0,180) 
    if not cj then 
        cj = {} 
    end 
    cj[countnumber] = createPed(male,x,y,z) 
    while not cj[countnumber] do 
       cj[countnumber] = createPed(math.random(0,300),x,y,z) 
    end 
    setPedRotation(cj[countnumber],180) 
    addPedClothes(cj[countnumber],"player_torso","torso",0) 
    addPedClothes(cj[countnumber],"player_legs","legs",2) 
    addPedClothes(cj[countnumber],"foot","feet",3) 
    if not slut then 
        slut = {} 
    end 
    slut[countnumber] = createPed(female,x,y,z) 
    while not slut[countnumber] do 
        slut[countnumber] = createPed(math.random(0,300),x,y,z) 
    end 
    addPedClothes(slut[countnumber],"player_torso","torso",0) 
    addPedClothes(slut[countnumber],"player_legs","legs",2) 
    addPedClothes(slut[countnumber],"foot","feet",3) 
    setElementPosition(cj[countnumber],x+2.5,y+0.5,z) 
    setElementPosition(slut[countnumber],x+2.5,y-0.5,z) 
    setTimer(pedFun2,100,1,cj[countnumber],slut[countnumber],bed[countnumber]) 
end 
  
function pedFun2(cj,slut,bed) 
    setPedAnimation(cj,"sex","sex_1_cum_p",1,true,false) 
    setPedAnimation(slut,"sex","sex_1_cum_w",1,true,false) 
    if not sexy then 
        setTimer(delPeds,14000,1,cj,slut,bed) 
    end 
end 
  
function sexBind() 
    bindKey(source,"m","down","sexo") 
    outputChatBox(""Si quieres fiesta preciona "M"!",source,0,255,0,true) 
end 
  
function sexBindStart() 
    outputChatBox("Si quieres fiesta preciona "M"!",getRootElement(),0,255,0,true) 
    players = getElementsByType("player") 
    for i,player in ipairs (players) do 
        bindKey(player,"m","down","sexo") 
    end 
end 
  
function sexKeeper() 
    if not sexy then 
        sexy = true 
        outputChatBox("????!",getRootElement(),0,255,0) 
        else 
        sexy = nil 
        outputChatBox("LoL..!",getRootElement(),255,0,0) 
    end 
end 
  
addCommandHandler("sexo",pedFun) 
addEventHandler("onPlayerJoin",getRootElement(),sexBind) 
addEventHandler("onResourceStart",getResourceRootElement(getThisResource()),sexBindStart) 
  
 

Ok, lo que hice fue agregar una tabla con las coordenadas que vos quieras.

Para cambiarlas edita:

position = { 0, 0, 5 } 

0 = x 
0 = y 
5 = z 

Link to comment
  • Recently Browsing   0 members

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