Jump to content

Alguno puede decirme por que no anda esto


Plate

Recommended Posts

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 
) 

Link to comment
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 
) 

Link to comment
  • Recently Browsing   0 members

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