Jump to content

Que esta mal?


DefearT

Recommended Posts

Hola alguien me puede ayudar con esto! No se que esta mal

Me dice y que el countPlayersInTeam es un Bag Argument @ number of players in team: false

function deleteAllPlayerBlips(player) 
    local elements = getAttachedElements(player) 
    if (elements) then 
        for i, element in ipairs(elements) do 
            if (getElementType(element) == "blip") then 
                destroyElement(element) 
            end 
        end 
    end 
    print( "number of players in team: " .. tostring( countPlayersInTeam( getPlayerTeam( player ) ) ) ); 
end 

Ayudenme porfavor

Link to comment
function deleteAllPlayerBlips(player) 
    for i, element in ipairs(getAttachedElements(player)) do 
        if isElement(element) and getElementType(element) == "blip" then 
            destroyElement(element) 
        end 
    end 
    local team = getPlayerTeam(player) 
    if isElement(team) then 
        print("Number of players in team: "..tostring(countPlayersInTeam(team))) 
    end 
end 

Link to comment

Receives any number of arguments, and prints their values to stdout, using the tostring function to convert them to strings. print is not intended for formatted output, but only as a quick way to show a value, typically for debugging. For formatted output, use string.format.

Link to comment
function deleteAllPlayerBlips(player) 
    for i, element in ipairs(getAttachedElements(player)) do 
        if isElement(element) and getElementType(element) == "blip" then 
            destroyElement(element) 
        end 
    end 
    local team = getPlayerTeam(player) 
    if isElement(team) then 
        print("Number of players in team: "..tostring(countPlayersInTeam(team))) 
    end 
end 

Gracias si me sirvio, pero ahora me empeso a fallar el spawnmanager\spawn.lua:105: spawnPlayerAtSpawnpoint

Link to comment
function deleteAllPlayerBlips(player) 
    for i, element in ipairs(getAttachedElements(player)) do 
        if isElement(element) and getElementType(element) == "blip" then 
            destroyElement(element) 
        end 
    end 
    local team = getPlayerTeam(player) 
    if isElement(team) then 
        print("Number of players in team: "..tostring(countPlayersInTeam(team))) 
    end 
end 

Gracias si me sirvio, pero ahora me empeso a fallar el spawnmanager\spawn.lua:105: spawnPlayerAtSpawnpoint

Menciona exactamente que te falla y publica la linea 105, quizá le moviste algo indebido.

Link to comment

Esto es lo que hay en la linea 105

    if not tonumber(x) then outputDebugString("spawnPlayerAtSpawnpoint: Specified spawnpoint lacks proper 'x' position",0,255,128,0) return false end 

Y esto fue el mensaje de error que salio

[2012-08-19 03:04:11] spawnmanager\spawn.lua:105: spawnPlayerAtSpawnpoint: Specified spawnpoint lacks proper 'x' position

Que esta fallando alguien sabe?

Link to comment
  • Recently Browsing   0 members

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