Jump to content

Ayudaaaaaa


Plate

Recommended Posts

solid hasta hay va bien no??? (despues ago los detalles)

function team ( source ) 
local team = getTeamFromName( 'Umbrella') 
if ( team ) then 
setPlayerTeam( source, team ) 
outputChatBox("Umbrella ",source,255,255,0) 
end 
end 
addCommandHandler("umbrella", team) 
  

Link to comment

sigue bien ?( a medida que agregue cosas preguntare)

function teams ( source, thePlayer ) 
local accName = getAccountName ( getPlayerAccount ( thePlayer ) )  
if isObjectInACLGroup ("user."..accName, aclGetGroup ( "LiderUmbrella" ) ) then  
local teams = getTeamFromName( 'Umbrella') 
if ( teams ) then 
setPlayerTeam( source, teams ) 
outputChatBox("Umbrella ",source,255,255,0) 
end 
end 
end 
addCommandHandler("Umbrella", teams) 

Link to comment
function teams ( source ) 
    local accName = getAccountName ( getPlayerAccount ( source ) ) -- Porque pusiste 'thePlayer' si tu argumento es 'source'? 
    if isObjectInACLGroup ("user.".. accName, aclGetGroup ( "LiderUmbrella" ) ) then 
        local teams = getTeamFromName ( 'Umbrella') 
        if ( teams ) then 
            setPlayerTeam ( source, teams ) 
            outputChatBox ( "Umbrella ", source, 255, 255, 0 ) 
        end 
    end 
end 
addCommandHandler ( "Umbrella", teams ) 

Link to comment

exelente solid muchas gracias pero tengo otro problema

auto = createVehicle ( 433, -2270, 2300.8999023438, 5.4000000953674, 0, 0, 270 ) 
  
  
function autos(thePlayer, seat) 
if seat ~= 0 and source == auto then       
local accountname = getAccountName (getPlayerAccount(thePlayer)) 
if isObjectInACLGroup ( "user." .. accountname, aclGetGroup ( "guest" ) ) then return end 
cancelEvent() 
outputChatBox ( "solamente umbrella puede usar estos vehiculos", thePlayer, 255, 0, 0, true ) 
end 
end 
addEventHandler ( "onVehicleStartEnter", root, autos ) 

no me funciona

Link to comment
auto = createVehicle ( 433, -2270, 2300.8999023438, 5.4000000953674, 0, 0, 270 ) 
  
function autos ( thePlayer, seat ) 
    if ( seat ~= 0 and source == auto ) then 
        local accountName = getAccountName ( getPlayerAccount ( thePlayer ) ) 
        if ( not isObjectInACLGroup ( "user.".. accountName, aclGetGroup ( "guest" ) ) ) then 
            cancelEvent ( ) 
            outputChatBox ( "solamente umbrella puede usar estos vehiculos", thePlayer, 255, 0, 0, true ) 
        end 
    end 
end 
addEventHandler ( "onVehicleStartEnter", root, autos ) 

Tu ACL de Umbrella se llama "guest"?

Link to comment

emm eso espera

auto = createVehicle ( 433, -2270, 2300.8999023438, 5.4000000953674, 0, 0, 270 ) 
  
  
function autos(thePlayer, seat) 
if seat ~= 0 and source == auto then       
local accountname = getAccountName (getPlayerAccount(thePlayer)) 
if isObjectInACLGroup ( "user." .. accountname, aclGetGroup ( "Umbrella" ) ) then return end 
cancelEvent() 
outputChatBox ( "solamente umbrella puede usar estos vehiculos", thePlayer, 255, 0, 0, true ) 
end 
end 
addEventHandler ( "onVehicleStartEnter", root, autos ) 

pero igual no funciona u.u

Link to comment
auto = createVehicle ( 433, -2270, 2300.8999023438, 5.4000000953674, 0, 0, 270 ) 
  
function autos ( thePlayer, seat ) 
    if ( seat == 0 and source == auto ) then -- Aca tenias que checkear si el asiento era "0", no si no era "0". 
        local accountName = getAccountName ( getPlayerAccount ( thePlayer ) ) 
        if ( not isObjectInACLGroup ( "user.".. accountName, aclGetGroup ( "Umbrella" ) ) ) then 
            cancelEvent ( ) 
            outputChatBox ( "solamente umbrella puede usar estos vehiculos", thePlayer, 255, 0, 0, true ) 
        end 
    end 
end 
addEventHandler ( "onVehicleStartEnter", root, autos ) 

Link to comment

solid otro problema mas y no te jodo hasta como 1 semana (un milagro)

esto tiene un problema por que yo pongo /quitarUmbrella EL_X y me saca a mi y pongo /agregarUmbrella EL_X y me agrega a mi xD

function teams ( source ) 
    local accName = getAccountName ( getPlayerAccount ( source ) ) 
    if isObjectInACLGroup ("user.".. accName, aclGetGroup ( "LiderUmbrella" ) ) then 
        local teams = getTeamFromName ( 'Umbrella') 
        if ( teams ) then 
            setPlayerTeam ( source, teams ) 
        end 
    end 
end 
addCommandHandler ( "agregarUmbrella", teams ) 
  
function teams ( source ) 
    local accName = getAccountName ( getPlayerAccount ( source ) ) 
    if isObjectInACLGroup ("user.".. accName, aclGetGroup ( "LiderUmbrella" ) ) then 
        local teams = getTeamFromName ( 'Umbrella') 
        if ( teams ) then 
             setPlayerTeam ( source, nil ) 
        end 
    end 
end 
addCommandHandler ( "quitarUmbrella", teams ) 
  

Link to comment

hay va bien?

function teams ( sourcePlayer ) 
    local accName = getAccountName ( getPlayerAccount ( sourcePlayer ) ) 
    if isObjectInACLGroup ("user.".. accName, aclGetGroup ( "LiderUmbrella" ) ) then 
        local pname = getPlayerFromName ( sourcePlayer ) 
     if (pname) then 
        local teams = getTeamFromName ( 'Umbrella') 
        if ( teams ) then 
            setPlayerTeam ( sourcePlayer, teams ) 
           end 
        end 
    end 
end 
addCommandHandler ( "agregarUmbrella", teams ) 

Link to comment

No seria mas facil bloquear los autos , segun el ID del skin del team?

   umbrellaVehicles = { [490]=true,[497]=true,[597]=true,[599]=true } 
  umbrellaSkins = { [280]=true,[281]=true,[282]=true,[283]=true,[284]=true,[285]=true,[286]=true } 
  
function enterVehicle ( player, seat, jacked )  
    if ( umbrellaVehicles[getElementModel(source)] ) and ( not umbrellaSkins[getElementModel(player)] ) then  
        cancelEvent() 
        outputChatBox ( "Solo los miembros Umbrella pueden conducir estos vehiculos" 255 , 0 ,0 , true )  
    end 
end 
addEventHandler ( "onVehicleStartEnter", getRootElement(), enterVehicle ) 

Es mas facil (para Mi) 8)

Link to comment
  • Recently Browsing   0 members

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