Jump to content

Alguno puede decirme por que no anda esto


Plate

Recommended Posts

Posted

cuando lo empieso me dice

Bad Argument : " getPlayerAccount" 

Bad Argument : "getAccountName" 

attempt to concatenate local "usuario" 

addEvent("enviarVariable",true) 
addEventHandler("enviarVariable",root,function (playerName) 
        local elPlayer = getPlayerFromName(playerName) 
        local usuario = getAccountName ( getPlayerAccount ( elPlayer ) ) 
        if isObjectInACLGroup ( "user.".. usuario, aclGetGroup ( "LiderFTFP" ) )  then 
            if ( accountName ) then 
                local pname = getPlayerName ( elPlayer ) 
                aclGroupAddObject ( aclGetGroup ( "FTFP" ), "user.".. accountName ) 
                outputChatBox ( tostring ( pname ) .." agrego a  '".. accountName .."' a S.T.A.R.S", getRootElement(), 0, 255, 255, true ) 
            end 
        end 
    end 
) 

Visita Full GameZ DayZ Mod

Server IP: mtasa://158.69.125.144:29015

Posted

'elPlayer' no debe ser un jugador, debe ser 'nil'.

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

Me parece que no me entendiste,

local elPlayer = getPlayerFromName(playerName) 

El jugador no existe.

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

ahh gracias pero como lo soluciono ^^

en lugar de eso que tengo que poner

Visita Full GameZ DayZ Mod

Server IP: mtasa://158.69.125.144:29015

Posted

Postea como usas el evento: "enviarVariable".

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
addEventHandler ( "onClientResourceStart", resourceRoot, 
    function ( ) 
        GUIEditor_Window = {} 
        GUIEditor_Button = {} 
        GUIEditor_Grid = {} 
  
        Panel = guiCreateWindow(138,146,499,282,"",false) 
        GUIEditor_Grid[1] = guiCreateGridList(363,59,127,195,false,Panel) 
        guiGridListSetSelectionMode(GUIEditor_Grid[1],2) 
  
        guiGridListAddColumn(GUIEditor_Grid[1],"Players in F",0.-- s8) -->
        Players = guiCreateGridList(9,58,127,196,false,Panel) 
        guiGridListSetSelectionMode(Players,2) 
  
        guiGridListAddColumn(Players,"Players",0.-- s8) -->
        Add = guiCreateButton(177,60,135,49,"Add Player",false,Panel) 
        Remove = guiCreateButton(174,132,142,51,"Remove Player",false,Panel) 
        Leader = guiCreateButton(173,203,145,48,"Give Leader",false,Panel) 
  
        addEventHandler ( "onClientGUIClick", Add,random, false ) -- El evento tiene que ir dentro de esta funcion. 
        loadPlayers ( ) 
    end 
) 
  
  
function addP ( ) 
    guiSetVisible ( Panel, true ) 
    showCursor ( true ) 
end 
addCommandHandler("AFP",addP) 
  
function closePanel ( ) 
    if guiGetVisible ( Panel ) then 
        guiSetVisible ( Panel, false ) 
        showCursor ( false ) 
    end 
end 
addCommandHandler ( "CFP", closePanel ) 
  
function STARS ( ) 
    triggerServerEvent ( "addST", localPlayer, accountName ) 
end 
 addEventHandler("onClientGUIClick",Add,STARS, false) 
function loadPlayers ( ) 
    guiGridListClear ( Players ) 
  
    for index, player in ipairs ( getElementsByType ( "player" ) ) do 
        guiGridListSetItemText ( Players, guiGridListAddRow ( Players ), 1, tostring ( getPlayerName ( player ) ), false, false ) 
    end 
end 
addEventHandler ( "onClientPlayerJoin", root, loadPlayers ) 
addEventHandler ( "onClientPlayerQuit", root, loadPlayers ) 
addEventHandler ( "onClientPlayerChangeNick", root, loadPlayers ) 
function random() 
local playerName = guiGridListGetItemText ( GUIEditor_Grid[1], guiGridListGetSelectedItem ( GUIEditor_Grid[1] ), 1 ) 
triggerServerEvent("enviarVariable",localPlayer,playerName) 
end 
 addEventHandler("onClientGUIClick",Add,random, false) 

addEvent("enviarVariable",true) 
addEventHandler("enviarVariable",root,function (playerName, accountName) 
        local elPlayer = getPlayerFromName(playerName) 
        local usuario = getAccountName ( getPlayerAccount ( nil ) ) 
        if isObjectInACLGroup ( "user.".. usuario, aclGetGroup ( "LiderFTFP" ) )  then 
            if ( accountName ) then 
                local pname = getPlayerName ( nil ) 
                aclGroupAddObject ( aclGetGroup ( "FTFP" ), "user.".. accountName ) 
                outputChatBox ( tostring ( pname ) .." agrego a  '".. accountName .."' a S.T.A.R.S", getRootElement(), 0, 255, 255, true ) 
            end 
        end 
    end 
) 

Visita Full GameZ DayZ Mod

Server IP: mtasa://158.69.125.144:29015

Posted

Antes de:

triggerServerEvent("enviarVariable",localPlayer,playerName) 

Agrega:

outputChatBox ( tostring ( playerName ) ) 

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

Eso era nomas para que te dijiera que decia en el chat. Que dijo?

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

me dice

Bad Argument: "getPlayerAccount" 

Bad Argument :" getAccountName" 

attempt to concatenate local "usuario" 

Visita Full GameZ DayZ Mod

Server IP: mtasa://158.69.125.144:29015

Posted

No estoy hablando de eso, que dijo en el chat despues de poner la linea que te dije?

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

no aparece nada en el chat es como si dejeara un espacio basio

Visita Full GameZ DayZ Mod

Server IP: mtasa://158.69.125.144:29015

Posted

Osea que no estas enviando nada al server side.

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

puede ser eso creo pero si en el script se ve que lo envia u.u

Visita Full GameZ DayZ Mod

Server IP: mtasa://158.69.125.144:29015

  • Recently Browsing   0 members

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