-
Posts
1,004 -
Joined
-
Last visited
Everything posted by Narutimmy
-
Gracias creo ya esta
-
Tengo un error en "getTeamColor" , ayuda? local function playerJoin() local r, g, b = getTeamColor(getPlayerTeam(source)) local blip = createBlipAttachedTo(source, 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)
-
Algo asi? addEventHandler("onPlayerSpawn",root, function( source ) local Civi = getTeamFromName( "Civiles" ) local clanName = getTeamName(getPlayerTeam(source)) if not clanName then setTimer(setPlayerTeam, 6000, 1, source, Civi ) ; end end );
-
Lo da al hacer login Por que no vuelves a la idea original de ponerlos en el 'team Civiles' ? Porque tengo 3 Teams creados con un scrip, no seria problema, pero los otros 3 Teams (uno de ellos es civiles) lo crea el Spawn de 50p,por eso no puedo definirlo
-
Lo da al hacer login
-
Bueno lo intente de otra forma, al spawnear si no tienes un team mueres, pero todo bien, pero si reconnecto al spawnear muero addEventHandler("onPlayerSpawn",root, function( ) local clanName = getTeamName(getPlayerTeam(source)) if not clanName then setTimer(killPed, 6000, 1, source ) ; end end ); Al reconectar pierdes el 'team'. Pero uso el Save System... que guarda y pone el team al reconectar.
-
Bueno lo intente de otra forma, al spawnear si no tienes un team mueres, pero todo bien, pero si reconnecto al spawnear muero addEventHandler("onPlayerSpawn",root, function( ) local clanName = getTeamName(getPlayerTeam(source)) if not clanName then setTimer(killPed, 6000, 1, source ) ; end end );
-
En este caso ahora si no entendi mucho, me puede ayudar un poco mas?
-
Bueno quiero que al spawnear si no tienes un Team te envie al team Civiles que ya esta creado con otro scrip.. pero me da error de argumento en "setPlayerTeam" lo puse en Sv addEventHandler("onPlayerSpawn",root, function( source ) local clanName = getTeamName(getPlayerTeam(source)) if not clanName then setTimer(setPlayerTeam, 6000, 1, source, Civiles ) ; end end );
-
Hola tengo este bug pero nose porque es ---FOLT addEventHandler('onColShapeHit', pCuboid1, function(source) local getOwnedBy = getElementData(pCuboid1, "ownedBy") callClientFunction(source, "NeedMsg", 6, getOwnedBy) callClientFunction(source, "NeedMsg", 1) if (getPlayerTeam(source)) then local pTeam = getPlayerTeam( source ) local iR, iG, iB = getTeamColor( pTeam ) local rR, gG, bB = getRadarAreaColor( pArea1 ) local data = getElementData(pCuboid1, "friendly") if ( iR == rR ) and ( iG == gG ) and ( iB == bB ) and ( data == "yes" ) then callClientFunction(source, "NeedMsg", 2) else setRadarAreaFlashing( pArea1, true ) capturing = setTimer( function( ) setElementData(pCuboid1, "friendly", "yes") setElementData(pCuboid1, "ownedBy", getTeamName(pTeam)) givePlayerMoney( source, 4000 ) callClientFunction(source, "NeedMsg", 4) setRadarAreaColor( pArea1, iR, iG, iB ) setRadarAreaFlashing( pArea1, false ) outputChatBox ( "#ff0000La Base FOLT a sido Conquistada!!!", getRootElement(), 255, 255, 255, true) end, 300000, 1 ) end else callClientFunction(source, "NeedMsg", 3) end if (getPedOccupiedVehicle( source )) then callClientFunction(source, "NeedMsg", 5) end end )
-
pero con anims falla no? por ejemplo los zombies tiene una config para que tengan anim pero no te matan se van corriendo de largo y no te pegan...
-
Hola bueno queria saber como puedo hacer para que sea mas rapido? que pueda correr? porque solo camina...
-
Ahora me sale esto y al ponerse las Gafas desaparecen todos los blips, yo quiero que solo se borre el blip del jugador... que nadie mas lo vea en el map, pero el si a ellos EDIT: amm Ahi un super bug... al ponerte y quitarte las Gafas la funcion entra en un ciclo infinito.. ocacionando que el host se sature y se apague
-
Nose que pasa... al ponerse la Gafas ya muestra el mensaje pero el quitarselas no se activa la otra funcion Cl: addEventHandler( "onClientResourceStart", resourceRoot, function() bindKey("fire", "down", theGoggle) end ) function theGoggle() local weaponID = getPedWeapon (getLocalPlayer ()) if weaponID == 44 then setTimer (playerGoggles, 50, 0 ) end end function playerGoggles() if isPedDoingTask ( getLocalPlayer (), "TASK_SIMPLE_GOGGLES_ON" ) then triggerServerEvent("goooogles", localPlayer) end end if isPedDoingTask ( getLocalPlayer (), "TASK_SIMPLE_GOGGLES_OFF" ) then triggerServerEvent("off", localPlayer) end addEventHandler( "onResourceStop", resourceRoot, function() unbindKey("fire", "down", theGoggle) end ) sv function toggleInvis ( ) if ( source and getElementType ( source ) == "player" ) then setPlayerNametagShowing ( source, false ) local attachedElements = getAttachedElements ( source ) for ElementKey, ElementValue in ipairs ( attachedElements ) do if ( getElementType ( ElementValue ) == "blip" ) then destroyElement ( ElementValue ) end end outputChatBox ( "#FFFF00*INFO* #00FF00Invisible Enabled", source, 0, 255, 0, true ) end end addEvent('goooogles', true) addEventHandler('goooogles', root, toggleInvis) function toggleInvis2 ( ) setPlayerNametagShowing ( source, true ) local r, g, b = getTeamColor(getPlayerTeam(player)) local blip = createBlipAttachedTo(player, 0, 2, r, g, b, 255, 1) outputChatBox ( "#FFFF00*INFO* #00FF00Invisible Disable", source, 0, 255, 0, true ) end addEvent('off', true) addEventHandler('off', root, toggleInvis2)
-
addEventHandler( "onClientResourceStart", resourceRoot, function() bindKey("fire", "down", theGoggle) end ) function theGoggle() local weaponID = getPedWeapon (getLocalPlayer ()) if weaponID == 44 then setTimer (playerGoggles, 50, 0 ) end end function playerGoggles() if isPedDoingTask ( getLocalPlayer (), "TASK_SIMPLE_GOGGLES_ON" ) then triggerServerEvent("goooogles", localPlayer) end end if isPedDoingTask ( getLocalPlayer (), "TASK_SIMPLE_GOGGLES_OFF" ) then triggerServerEvent("goooogles", source) end addEventHandler( "onResourceStop", resourceRoot, function() unbindKey("fire", "down", theGoggle) end )
-
como puedo optener el blip del jugador? Intente con esto pero no me sirvio local attachedElements = getAttachedElements ( source ) for ElementKey, ElementValue in ipairs ( attachedElements ) do if ( getElementType ( ElementValue ) == "blip" ) then destroyElement ( ElementValue ) end
-
Bueno borre el otro porque arregle unas cosas... ahora nose que pasa que al ponerte las gafas (Activar la Funcion) se va hasta el else y no pasa por lo primero function toggleInvis ( source ) if ( source and getElementType ( source ) == "player" ) then setPlayerNametagShowing ( source, false ) local attachedElements = getAttachedElements ( source ) for ElementKey, ElementValue in ipairs ( attachedElements ) do if ( getElementType ( ElementValue ) == "blip" ) then destroyElement ( ElementValue ) end end outputChatBox ( "#FFFF00*INFO* #00FF00Invisible Enabled", source, 0, 255, 0, true ) else setPlayerNametagShowing ( source, true ) local r, g, b = getTeamColor(getPlayerTeam(player)) local blip = createBlipAttachedTo(player, 0, 2, r, g, b, 255, 1) outputChatBox ( "#FFFF00*INFO* #00FF00Invisible Disable", source, 0, 255, 0, true ) end end addEvent('goooogles', true) addEventHandler('goooogles', root, toggleInvis)
-
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
-
como me lo pones me tira un error de ")" lo puse asi no ahi error pero no funciona function team() local allTeams = getElementsByType ( "team" ) for index, theTeam in ipairs(allTeams) do if ( getTeamFriendlyFire ( theTeam ) == false ) then setTeamFriendlyFire ( theTeam, true ) end end end addEventHandler("onResourceStart", resourceRoot, team) EDIT: Listo jeje me olvide de cambiar setTeamFriendlyFire ( theTeam, true ) por false :3, gracias
-
Asi? -- Toma una tabla con todo los Equipos local allTeams = getElementsByType ( "team" )
-
Hola bueno quiero que no aya fuego amigo enlos del mismo team... pero no funciona addEventHandler("onResourceStart", resourceRoot, function() for _,t in ipairs(getElementsByType("team")) do setTeamFriendlyFire ( t , false ) end end)
