DefearT Posted August 18, 2012 Share Posted August 18, 2012 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
BorderLine Posted August 18, 2012 Share Posted August 18, 2012 sacame una duda, quieres detruir los blips cierto? y porq el asunto del print( "number of players in team: " .. tostring( countPlayersInTeam( getPlayerTeam( player ) ) ) ); ? Link to comment
Callum Posted August 18, 2012 Share Posted August 18, 2012 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
iFoReX Posted August 18, 2012 Share Posted August 18, 2012 una duda para que sirve el print ? Link to comment
BorderLine Posted August 18, 2012 Share Posted August 18, 2012 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
Castillo Posted August 18, 2012 Share Posted August 18, 2012 Es como outputChatBox pero solo a la consola del servidor. Link to comment
Alexs Posted August 18, 2012 Share Posted August 18, 2012 Es como outputChatBox pero solo a la consola del servidor. pensé que print no servia en el MTA. Link to comment
DefearT Posted August 19, 2012 Author Share Posted August 19, 2012 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
Alexs Posted August 19, 2012 Share Posted August 19, 2012 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
DefearT Posted August 19, 2012 Author Share Posted August 19, 2012 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
Recommended Posts