Narutimmy Posted July 11, 2013 Posted July 11, 2013 Hola tengo este Error en el debug --[[***************************************************************************** * * PROJECT: PlayerBlips * LICENSE: GNU GPLv3 * FILE: :PlayerBlips/cPlayerBlips.lua * PURPOSE: Player blips. * DEVELOPERS: John_Michael * ********************************************************************************]] local playerBlipRoot = createElement("playerBlipRoot", "playerBlipRoot") --This function creates blips for all players when the resource starts. local function resourceStart() for _, player in ipairs(getElementsByType("player")) do if player ~= localPlayer then local r, g, b = getTeamColor(getPlayerTeam(player)) local blip = createBlipAttachedTo(player, 0, 2, r, g, b, 255, 1) setElementParent(blip, playerBlipRoot) end end end addEventHandler("onClientResourceStart", root, resourceStart) --This function creates a blip for new players when they join. local function playerJoin() local r, g, b = getTeamColor(getPlayerTeam(player)) local blip = createBlipAttachedTo(player, 0, 2, r, g, b, 255, 1) setElementParent(blip, playerBlipRoot) setTimer(updateBlipColor, 1000, 0, blip) --Upadate in 5 seconds, in case the server sets the color. end addEventHandler("onClientPlayerJoin", root, playerJoin) --This function destroys a players blip when they quit. local function playerQuit() for _, blip in ipairs(getElementChildren(playerBlipRoot)) do if getElementAttachedTo(blip) == source then destroyElement(blip) end end end addEventHandler("onClientPlayerQuit", root, playerQuit) --This function updates a blip's color, ensuring the blip colors always match. function updateBlipColor(blip) local player = getElementAttachedTo(blip) == source if player then local r, g, b = getTeamColor(getPlayerTeam(player)) setBlipColor(blip, r, g, b, 255) end end mtasa://66.85.14.178:22003 Ts3: thezombiworld.com:7777
Alexs Posted July 11, 2013 Posted July 11, 2013 No defines 'player' en la función 'playerJoin', intenta usar 'source'. Developer @ MYVAL
Narutimmy Posted July 11, 2013 Author Posted July 11, 2013 No defines 'player' en la función 'playerJoin', intenta usar 'source'. Listo pero aun sale :I mtasa://66.85.14.178:22003 Ts3: thezombiworld.com:7777
Alexs Posted July 11, 2013 Posted July 11, 2013 Podría ser causado por jugadores sin 'Team'. Developer @ MYVAL
Narutimmy Posted July 11, 2013 Author Posted July 11, 2013 Podría ser causado por jugadores sin 'Team'. Ohh, cierto.. gracias mtasa://66.85.14.178:22003 Ts3: thezombiworld.com:7777
Narutimmy Posted July 12, 2013 Author Posted July 12, 2013 Ahora me tira este error mtasa://66.85.14.178:22003 Ts3: thezombiworld.com:7777
Alexs Posted July 12, 2013 Posted July 12, 2013 Revisa tu linea 47: local player = getElementAttachedTo(blip) == source Eso convierte a 'player' en un 'boolean', elimina la comparación y prueba. Developer @ MYVAL
Narutimmy Posted July 12, 2013 Author Posted July 12, 2013 Revisa tu linea 47: local player = getElementAttachedTo(blip) == source Eso convierte a 'player' en un 'boolean', elimina la comparación y prueba. Listo gracias mtasa://66.85.14.178:22003 Ts3: thezombiworld.com:7777
Recommended Posts