Jump to content

Ayudaaaaaa


Plate

Recommended Posts

Posted

Como se podria hacer para que con un comando uno user x del acl x agregue el player a un team instantaneamente y lo saque instantaneamente con ese comando

Visita Full GameZ DayZ Mod

Server IP: mtasa://158.69.125.144:29015

Posted
addCommandHandler 
isObjectInACLGroup 
getPlayerFromName 
setPlayerTeam 

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted

De nada.

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted

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) 
  

Visita Full GameZ DayZ Mod

Server IP: mtasa://158.69.125.144:29015

Posted

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) 

Visita Full GameZ DayZ Mod

Server IP: mtasa://158.69.125.144:29015

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

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted

Gracias ahora solamente me faltaria hacer que lo saque xD

Visita Full GameZ DayZ Mod

Server IP: mtasa://158.69.125.144:29015

Posted

En lugar de "teams" en setPlayerTeam, pones nil, deberia quitarlo del team.

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted

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

Visita Full GameZ DayZ Mod

Server IP: mtasa://158.69.125.144:29015

Posted
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"?

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted

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

Visita Full GameZ DayZ Mod

Server IP: mtasa://158.69.125.144:29015

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

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted

GRACIAS SOLID SOS EL MEJOR GRACIAS GRACIAS GRACIAS GRACIAS GRACIAS GRACIAS GRACIAS GRACIAS GRACIAS

Visita Full GameZ DayZ Mod

Server IP: mtasa://158.69.125.144:29015

Posted

De nada.

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted

Solid con el systema de reset tengo un problema cuando se desconnectan los players los pierden

deve ser por que no le puse un getAccountData y un setAccountData

Visita Full GameZ DayZ Mod

Server IP: mtasa://158.69.125.144:29015

Posted

Exacto, tendrias que guardar el element data cuando se vayan del servidor.

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted

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 ) 
  

Visita Full GameZ DayZ Mod

Server IP: mtasa://158.69.125.144:29015

Posted

Pues claro, si ahi estas usando el elemento 'source' que seria el que uso el comando.

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted

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 ) 

Visita Full GameZ DayZ Mod

Server IP: mtasa://158.69.125.144:29015

Posted

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)

------------------------------------------------------------------------------------------

My scripts

http://community.multitheftauto.com/index.php?p=resources&s=details&id=6977

http://community.multitheftauto.com/index.php?p=resources&s=details&id=7740

  • Recently Browsing   0 members

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