Jump to content

PiojitoS

Members
  • Posts

    46
  • Joined

  • Last visited

About PiojitoS

  • Birthday 03/03/2000

Details

  • Gang
    GTA | Project Army
  • Location
    Argentina - Cordoba
  • Occupation
    My nickname in game is: PiojitoS | My Server: GTA | Project Army
  • Interests
    Games

Recent Profile Visitors

1,042 profile views

PiojitoS's Achievements

Rat

Rat (9/54)

0

Reputation

  1. Hi, I need help with this function is for a Trucker job. I want the player to enter the truck to have ghostmode activated with other players, the problem is that only the local player recognizes me and I don't know how to make everyone see the ghostmode. I wrote this: **The problem is that the Ghost Mode is only activated for the local player who is in the truck, it is not activated for the server players. -----------------------------------CLIENT ----------------------------------- ----GHOSTMODE function ghostmodeTRUCKER(Trailertruck) --Trailertruck is a TRAILER in Server.lua local playerVehicle = getPedOccupiedVehicle(localPlayer) -- Get the players vehicle if playerVehicle then -- Check the return value. for i,v in pairs(getElementsByType("vehicle")) do --LOOP through all vehicles setElementCollidableWith(v, playerVehicle, false) -- Set the collison off with the other vehicles. setElementCollidableWith(v, Trailertruck, false) --A la inversa setElementCollidableWith(playerVehicle, v, false) setElementCollidableWith(Trailertruck, v, false) end end end addEvent( "ghostModeTRUCK", true ) addEventHandler("ghostModeTRUCK", getRootElement(), ghostmodeTRUCKER)
  2. ya se que el end no iba pero no funciona asi ni idea jaja no importa ya esta...
  3. Si lees bien lo que te conteste antes hay claramente te estoy nombrando al servidor en si y no solo a este script, asiq porfavor mejor deja de hablar sin saber, gracias...
  4. Ya probe todo y nada, es un bug del script algo de mta asiq me cago en la remaravillosa concha de mi madre ... No importa gracias igual, ya me da lo mismo q les aparesca a todos...
  5. Estos: outputChatBox("ADVERTENCIA: Vuelve al colectivo o perderas el trabajo", Player, 255, 255, 0, false) outputChatBox("Abandonaste el colectivo perdiste el trabajo", Player, 255, 0, 0) outputChatBox("Antes de sacar un colectivo debes seleccionar un recorrido.", source, 255, 0, 0)
  6. Los argumentos innecesarios estaban porq ya no sabia que hacer, puse tal como vos lo pusiste y tampoco funciona
  7. function AgarrarColectivo () if (not isPedInVehicle(localPlayer)) then if ( EstadoCivil == 1 ) then if ( ColectivosSacados == 0 ) and (not isPedInVehicle(localPlayer)) then triggerServerEvent ( "SacarColectivos", localPlayer ) ColectivosSacados = 1 else triggerServerEvent ( "YaTienesColectivo", localPlayer ) end else triggerServerEvent ( "SeleccionaRecorrido", localPlayer ) end end end addEventHandler( "onClientMarkerHit", MarkerColectivo, AgarrarColectivo ) function TomarTiempo () if ( ColectivosSacados == 0 ) then triggerServerEvent ( "MensajeDeCancel", localPlayer ) Seleccion = 0 EstadoCivil = 0 ColectivosSacados = 0 ViajeElejido = 0 Repeticiones = 1 end end function ComenzarViaje () x, y, z = viajesDestinos () ParadaSelect = createMarker ( x, y, z, "cylinder", 3, 0, 185, 85, 60, localPlayer ) BlipParada = createBlipAttachedTo ( ParadaSelect, 41, 2, 255, 255, 0, 255 ) triggerServerEvent ( "MensajeEmpezar", localPlayer ) end addEvent( "EmpezarLaburo", true ) addEventHandler( "EmpezarLaburo", localPlayer, ComenzarViaje ) function MensajeParaVolver () triggerServerEvent ( "MensajeVolver", localPlayer ) ParadaFinal = createMarker ( 1796.75427, -1930.97595, 12.5, "cylinder", 3, 0, 185, 85, 60, localPlayer ) BlipTerminal = createBlipAttachedTo ( ParadaFinal, 41, 2, 255, 255, 0, 255 ) Repeticiones = 1 end function RecorridosVariados(hitElement) if source == ParadaSelect and localPlayer == hitElement then local vehicle = getPedOccupiedVehicle ( localPlayer ) if vehicle and getElementModel(vehicle) == 431 then triggerServerEvent ( "PagoGeneral", localPlayer ) destroyElement ( ParadaSelect ) if isElement(BlipParada) then destroyElement ( BlipParada ) end if ( ViajeElejido == 1 ) then MensajeParaVolver () end if ( ViajeElejido == 2 ) then if ( Repeticiones < 3 ) then RepetirSecuencia () else MensajeParaVolver () end end if ( ViajeElejido == 3 ) then if ( Repeticiones < 5 ) then RepetirSecuencia () else MensajeParaVolver () end end if ( ViajeElejido == 4 ) then if ( Repeticiones < 10 ) then RepetirSecuencia () else MensajeParaVolver () end end if ( ViajeElejido == 5 ) then if ( Repeticiones < 15 ) then RepetirSecuencia () else MensajeParaVolver () end end if ( ViajeElejido == 6 ) then if ( Repeticiones < 20 ) then RepetirSecuencia () else MensajeParaVolver () end end if ( ViajeElejido == 7 ) then if ( Repeticiones < 30 ) then RepetirSecuencia () else MensajeParaVolver () end end if ( ViajeElejido == 8 ) then if ( Repeticiones < 50 ) then RepetirSecuencia () else MensajeParaVolver () end end if ( ViajeElejido == 9 ) then if ( Repeticiones < 75 ) then RepetirSecuencia () else MensajeParaVolver () end end if ( ViajeElejido == 10 ) then if ( Repeticiones < 100 ) then RepetirSecuencia () else MensajeParaVolver () end end end end end addEventHandler( "onClientMarkerHit", root, RecorridosVariados )
  8. No, eso era porque estaba enloquecido y no sabia que mas poner ya me canso... en otras funciones los output anda bien, estan al player local menos en estas function SacarUnColectivo (localPlayer) if not isPedInVehicle(source, thePlayer) then local x, y, z = getElementPosition ( source ) Bus = createVehicle ( 431, x, y, z + 3 ) warpPedIntoVehicle ( source, Bus ) Posicion = 1 triggerClientEvent("EmpezarLaburo",source) addEventHandler("onVehicleEnter", Bus, Adentro) addEventHandler("onVehicleExit", Bus, salioDelVehiculo) else outputChatBox("Debes estar afuera del vehiculo para subir a un colectivo.", source, 255, 0, 0) end end addEvent( "SacarColectivos", true ) addEventHandler( "SacarColectivos", getRootElement (), SacarUnColectivo ) function Adentro () Posicion = 1 end --function MensajeAdvertencia2 (thePlayer) --outputChatBox("ADVERTENCIA: Vuelve al colectivo o perderas el trabajo", source, 255, 255, 0, false) --end function salioDelVehiculo() setTimer ( function() outputChatBox("ADVERTENCIA: Vuelve al colectivo o perderas el trabajo", Player, 255, 255, 0, false) end, 50, 1 ) --setTimer ( MensajeAdvertencia2, 50, 1 ) Posicion = 0 setTimer ( PerdisteElTrabajo, 21000, 1 ) setTimer ( RomperColectivo, 21000, 1 ) end function RomperColectivo () if (Posicion == 0) then destroyElement (Bus) end end function PerdisteElTrabajo () if ( Posicion == 0 ) then outputChatBox("Abandonaste el colectivo perdiste el trabajo", Player, 255, 0, 0) SeAcabo () end end
  9. Tengo este problema: Estos dos output les aparecen a todos los player en cambio todos los otros estan iguales y no pasa eso, alguien me dice porq mierda me pasa ese efecto de magia negra ... function PerdisteElTrabajo (Player, localPlayer) if ( Posicion == 0 ) then outputChatBox("Abandonaste el colectivo perdiste el trabajo", source, 255, 0, 0) SeAcabo () end end function MensajeAdvertencia2 (player, localPlayer) outputChatBox("ADVERTENCIA: Vuelve al colectivo o perderas el trabajo", localPlayer, 255, 255, 0) end outputChatBox("Antes de sacar un colectivo debes seleccionar un recorrido.", source, 255, 0, 0) end addEvent( "SeleccionaRecorrido", true ) addEventHandler( "SeleccionaRecorrido", getRootElement (), SeleccionaUnRecorrido )
  10. Probe como tu dices y tampoco, por lo que yo veo el error no es en la funcion esa sino en las green, hay otro archivo que es donde estan las greenzones, yo no se si esta bien lo que hize o no peor me guie en base a un greenzone original... -----Zonas Zombie ----- "1812.9423828125" posY="-2161.5244140625" sizeX="180" sizeY="180" color="#ff0000" dimension="0" />--ZZ LS
  11. pero si pongo que no dañe al ped, le afecta a los zombies, en cambio esa funcion es para el jugador
  12. En mi servidor yo tengo las llamadas "Zonas Zombies" que es un mapeo en donde hay zombies encerrados y al matarlos te da dinero. Lo que yo busco es hacer que los players que entran hay adentro no se puedan matar entre ellos pero que los zombies si los puedan matar... Yo hize lo siguiente peor no funciona, ensima no me da ningun error: Client: addEvent("siGodMode", true) addEventHandler ("siGodMode", getRootElement(), function() addEventHandler ("onClientPlayerDamage", getLocalPlayer, cancelarEventoEvento) end) addEvent("noGodMode", true) addEventHandler ("noGodMode", getRootElement(), function() removeEventHandler ("onClientPlayerDamage", getLocalPlayer, cancelarEventoEvento) end) function cancelarEventoEvento (theplayer, attacker, weapon, bodypart) cancelEvent() end Server: addEventHandler ("onResourceStart", getRootElement(), function() local todasGreenzZz = getElementsByType ("radararea") for i,v in ipairs (todasGreenzZz) do local r,g,b,a = getRadarAreaColor (v) if (r == 255) and (g == 0) and (b == 0) and (a == 127) then local x,y = getElementPosition (v) local sx,sy = getRadarAreaSize (v) local col = createColCuboid (x,y, -50, sx,sy, 7500) setElementID (col, "greenzoneColshape") end end end) addEventHandler ("onColShapeHit", getRootElement(), function(hitElement, matchingDimension) if (getElementType (hitElement) == "player") and (getElementID (source) == "greenzoneColshape") then toggleControl (hitElement, "vehicle_fire", false) triggerClientEvent (hitElement, "siGodMode", hitElement) end end ) addEventHandler ("onColShapeLeave", getRootElement(), function(leaveElement, matchingDimension) if (getElementType (leaveElement) == "player") and (getElementID (source) == "greenzoneColshape") then toggleControl (leaveElement, "vehicle_fire", true) triggerClientEvent (leaveElement, "noGodMode", leaveElement) end end )
  13. me ayudan con ese ultimo error porfavor...
×
×
  • Create New...