Jump to content

setPlayerTeam


Plate

Recommended Posts

Hola neceisto una ayuda con este script en el que me ayudo Solidsnake14 y Alex_Steel me dice:

Bad Argument @ setPlayerTeam 
Bad Argument @ getPlayerName [ Expected element at argument 1, got boolean ] 
attempt to concatentate a boolean valvue 

client:

    function deteam (player) 
        local row, col = guiGridListGetSelectedItem ( teamList ) 
        if ( row and col and row ~= -1 and col ~= -1 ) then 
            local team = guiGridListGetItemText ( teamList, row, columnA ) 
            triggerServerEvent ( "onClanPlayerMove", localPlayer, getPlayerFromName ( player ), team ) 
        end 
    end 
    addEventHandler ( "onClientGUIClick", mover, deteam, false ) 

server:

  
function setTeam(player, teamName) 
local theTeam = getTeamFromName ( teamName ) 
        if ( theTeam ) then 
setPlayerTeam ( player , theTeam ) 
outputChatBox(getPlayerName(source).." agrego a "..getPlayerName(player).." al clan "..getTeamName(theTeam).."", getRootElement(), 0, 255 ,255 ,true) 
end 
end 
addEvent("onClanPlayerMove", true) 
addEventHandler("onClanPlayerMove",getRootElement(), setTeam) 

Link to comment
    function deteam (player) 
        local row, col = guiGridListGetSelectedItem ( teamList ) 
        if ( row and col and row ~= -1 and col ~= -1 ) then 
        local row2, col2 = guiGridListGetSelectedItem ( playerList ) 
        if ( row2 and col2 and row2 ~= -1 and col2 ~= -1 ) then 
            local team = guiGridListGetItemText ( teamList, row, columnA ) 
            local player = guiGridListGetItemText ( playerList, row3, column ) 
            triggerServerEvent ( "onClanPlayerMove", localPlayer, getPlayerFromName ( player ), team ) 
        end 
    end 
    addEventHandler ( "onClientGUIClick", mover, deteam, false ) 

Link to comment
  • Recently Browsing   0 members

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