Jump to content

Ayuda con script 2


iFigaro

Recommended Posts

Miren tengo este script que hace que aparesca una cama con skin haciendo una acion pero al momento de iniciarlo me aparecen los skins a lado mio y no en la cama

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(1,2) 
    end 
    if not female then 
        female = math.random(0,300) 
    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 
  
  
end 
  
function sexBind() 
    bindKey(source,"m","down","accion") 
    outputChatBox("Recurso iniciado",source,0,255,0,true) 
end 
  
function sexBindStart() 
    outputChatBox("Recurso iniciado",getRootElement(),0,255,0,true) 
    players = getElementsByType("player") 
    for i,player in ipairs (players) do 
        bindKey(player,"m","down","accion") 
    end 
end 
  
function sexKeeper() 
    if not sexy then 
        sexy = true 
        outputChatBox("Stay horny!",getRootElement(),0,255,0) 
        else 
        sexy = nil 
        outputChatBox("Cheap slut...",getRootElement(),255,0,0) 
    end 
end 
  
addCommandHandler("accion",pedFun) 
addCommandHandler("sexy",sexKeeper) 
addEventHandler("onPlayerJoin",getRootElement(),sexBind) 
addEventHandler("onResourceStart",getResourceRootElement(getThisResource()),sexBindStart) 

Cambie Estas cordenadas

    bed[countnumber] = createObject(2299,2485,-1667,13.34375,0,0,180) 

Intente cambiando estas cordenadas pero no funciono

    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]) 

Gracias

Link to comment
allPlayers = {} 
x, y, z = 2485, -1667, 13.34375 
  
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(1,2) 
    end 
    if not female then 
        female = math.random(0,300) 
    end 
    if not bed then 
        bed = {} 
    end 
    bed[countnumber] = createObject(2299,x,y,z,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 
  
  
end 
  
function sexBind() 
    bindKey(source,"m","down","accion") 
    outputChatBox("Recurso iniciado",source,0,255,0,true) 
end 
  
function sexBindStart() 
    outputChatBox("Recurso iniciado",getRootElement(),0,255,0,true) 
    players = getElementsByType("player") 
    for i,player in ipairs (players) do 
        bindKey(player,"m","down","accion") 
    end 
end 
  
function sexKeeper() 
    if not sexy then 
        sexy = true 
        outputChatBox("Stay horny!",getRootElement(),0,255,0) 
        else 
        sexy = nil 
        outputChatBox("Cheap slut...",getRootElement(),255,0,0) 
    end 
end 
  
addCommandHandler("accion",pedFun) 
addCommandHandler("sexy",sexKeeper) 
addEventHandler("onPlayerJoin",getRootElement(),sexBind) 
addEventHandler("onResourceStart",getResourceRootElement(getThisResource()),sexBindStart) 

Link to comment
  • Recently Browsing   0 members

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