Jump to content

Por que :S


Arsilex

Recommended Posts

Por que no me funciona esto :S

function M5 (thePlayer) 
local vehicle = getPedOccupiedVehicle ( localPlayer ) 
local x,y,z = getElementPosition( vehicle ) 
local collision = createColSphere ( x, y, z, 10.0 ) 
local playersincol = getElementsWithinColShape( collision, "player" ) 
stopSound( sound ) 
    for theKey,localPlayer in ipairs(playersincol) do  
        sound = playSound3D( "http://listen.radionomy.com/abc-dance.m3u", x, y, z, true ) 
        setSoundVolume( sound, 5 ) 
        setSoundMaxDistance( sound, 20 ) 
        attachElements ( sound, vehicle ) 
        attachElements ( playersincol, vehicle ) 
    end 
end 

Link to comment

claro pero yo hize esto mira

Client--

function M5Triger() 
triggerServerEvent ( "onM5", root )  
end 
  
function M5 (thePlayer) 
local vehicle = getPedOccupiedVehicle ( localPlayer ) 
local x,y,z = getElementPosition( vehicle ) 
local collision = createColSphere ( x, y, z, 10.0 ) 
local playersincol = getElementsWithinColShape( collision, "player" ) 
stopSound( sound ) 
    for theKey,localPlayer in ipairs(playersincol) do  
        sound = playSound3D( "http://listen.radionomy.com/abc-dance.m3u", x, y, z, true ) 
        setSoundVolume( sound, 5 ) 
        setSoundMaxDistance( sound, 20 ) 
        attachElements ( sound, vehicle ) 
        attachElements ( collision, vehicle ) 
    end 
end 
addEvent( "onM5Repro", true ) 
addEventHandler( "onM5Repro", localPlayer, M5 ) 

Server--

function M5() 
triggerClientEvent ( "onM5Repro", root )  
end 
addEvent( "onM5", true ) 
addEventHandler( "onM5", getRootElement(), M5 ) 

es un poco lioso pero ejecuta el root de server y lo pasa a client reproduciendo

Link to comment
  • Recently Browsing   0 members

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