DefearT Posted August 18, 2012 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
BorderLine Posted August 18, 2012 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 ) ) ) ); ?
Callum Posted August 18, 2012 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
BorderLine Posted August 18, 2012 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.
Castillo Posted August 18, 2012 Posted August 18, 2012 Es como outputChatBox pero solo a la consola del servidor.
Alexs Posted August 18, 2012 Posted August 18, 2012 Es como outputChatBox pero solo a la consola del servidor. pensé que print no servia en el MTA.
DefearT Posted August 19, 2012 Author 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
Alexs Posted August 19, 2012 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.
DefearT Posted August 19, 2012 Author 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?
Recommended Posts