Jump to content

setPlayerTeam


Plate

Recommended Posts

Posted

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) 

Visita Full GameZ DayZ Mod

Server IP: mtasa://158.69.125.144:29015

Posted

"player" no esta definido client 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
function deteam (player) 

Estas cometiendo el mismo error que en el tema donde te ayude hoy.

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
    guiGridListGetSelectedItem 
    guiGridListGetItemText 

eso no?

Visita Full GameZ DayZ Mod

Server IP: mtasa://158.69.125.144:29015

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

Visita Full GameZ DayZ Mod

Server IP: mtasa://158.69.125.144:29015

Posted

"row3" no esta definido.

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
            local player = guiGridListGetItemText ( playerList, row2, column ) 

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...