Git Product home page Git Product logo

Comments (12)

siddharth220 avatar siddharth220 commented on September 23, 2024

Were you able to figure it out?

from esx_xp.

rahafuf avatar rahafuf commented on September 23, 2024

from esx_xp.

siddharth220 avatar siddharth220 commented on September 23, 2024

this will ca use you to gain 10 XP every time you kill an AI Citizen.CreateThread(function() _,trash = AddRelationshipGroup("TRASH") while true do Citizen.Wait(0) for _, ped in ipairs(GetGamePool('CPed')) do pedrelation = GetPedRelationshipGroupHash(ped) if DoesEntityExist(ped) and IsEntityDead(ped) and pedrelation ~= trash and not IsPedAPlayer(ped) then if GetPedSourceOfDeath(ped) == PlayerPedId() then TriggerEvent("BattlePass:AddXP",10,source) SetPedRelationshipGroupHash(ped, trash) end end end end end)

On Sun, May 23, 2021, 6:59 AM Swampert220 @.***> wrote: Were you able to figure it out? — You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub <#20 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AILTDMUZSZ26QKOVAC4MC63TPDU3ZANCNFSM4VUKIAQA .

Any way to configure it for actual players

from esx_xp.

rahafuf avatar rahafuf commented on September 23, 2024

from esx_xp.

siddharth220 avatar siddharth220 commented on September 23, 2024

Remove the part that says "not IsPedAPlayer(ped)"

On Sun, May 23, 2021, 7:25 AM Swampert220 @.> wrote: this will ca use you to gain 10 XP every time you kill an AI Citizen.CreateThread(function() _,trash = AddRelationshipGroup("TRASH") while true do Citizen.Wait(0) for , ped in ipairs(GetGamePool('CPed')) do pedrelation = GetPedRelationshipGroupHash(ped) if DoesEntityExist(ped) and IsEntityDead(ped) and pedrelation ~= trash and not IsPedAPlayer(ped) then if GetPedSourceOfDeath(ped) == PlayerPedId() then TriggerEvent("BattlePass:AddXP",10,source) SetPedRelationshipGroupHash(ped, trash) end end end end end) … <#m_6702939521741169624> On Sun, May 23, 2021, 6:59 AM Swampert220 @.> wrote: Were you able to figure it out? — You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub <#20 (comment) <#20 (comment)>>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AILTDMUZSZ26QKOVAC4MC63TPDU3ZANCNFSM4VUKIAQA . Any way to configure it for actual players — You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub <#20 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AILTDMVJRPO5RIAVXFJK3YTTPDX45ANCNFSM4VUKIAQA .

Should add this in client or server?

from esx_xp.

rahafuf avatar rahafuf commented on September 23, 2024

from esx_xp.

siddharth220 avatar siddharth220 commented on September 23, 2024

Client I believe. I'll have to look later once I'm off work

On Sun, May 23, 2021, 7:57 AM Swampert220 @.*> wrote: Remove the part that says "not IsPedAPlayer(ped)" … <#m_5085039287984978194_> On Sun, May 23, 2021, 7:25 AM Swampert220 @.> wrote: this will ca use you to gain 10 XP every time you kill an AI Citizen.CreateThread(function() _,trash = AddRelationshipGroup("TRASH") while true do Citizen.Wait(0) for , ped in ipairs(GetGamePool('CPed')) do pedrelation = GetPedRelationshipGroupHash(ped) if DoesEntityExist(ped) and IsEntityDead(ped) and pedrelation ~= trash and not IsPedAPlayer(ped) then if GetPedSourceOfDeath(ped) == PlayerPedId() then TriggerEvent("BattlePass:AddXP",10,source) SetPedRelationshipGroupHash(ped, trash) end end end end end) … <#m_6702939521741169624> On Sun, May 23, 2021, 6:59 AM Swampert220 @.> wrote: Were you able to figure it out? — You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub <#20 <#20> (comment) <#20 (comment) <#20 (comment)>>>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AILTDMUZSZ26QKOVAC4MC63TPDU3ZANCNFSM4VUKIAQA . Any way to configure it for actual players — You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub <#20 (comment) <#20 (comment)>>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AILTDMVJRPO5RIAVXFJK3YTTPDX45ANCNFSM4VUKIAQA . Should add this in client or server? — You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub <#20 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AILTDMVTQPMVNEICOYCYQE3TPD3T3ANCNFSM4VUKIAQA .

Thanks man that would be really helpful, I have been looking for this for quite some time

from esx_xp.

rahafuf avatar rahafuf commented on September 23, 2024

from esx_xp.

siddharth220 avatar siddharth220 commented on September 23, 2024

Join the discord. There are channels set up for snippets

On Sun, May 23, 2021, 9:24 AM Swampert220 @.> wrote: Client I believe. I'll have to look later once I'm off work … <#m_-4253752457682759071_> On Sun, May 23, 2021, 7:57 AM Swampert220 @.> wrote: Remove the part that says "not IsPedAPlayer(ped)" … <#m_5085039287984978194_> On Sun, May 23, 2021, 7:25 AM Swampert220 @.> wrote: this will ca use you to gain 10 XP every time you kill an AI Citizen.CreateThread(function() _,trash = AddRelationshipGroup("TRASH") while true do Citizen.Wait(0) for , ped in ipairs(GetGamePool('CPed')) do pedrelation = GetPedRelationshipGroupHash(ped) if DoesEntityExist(ped) and IsEntityDead(ped) and pedrelation ~= trash and not IsPedAPlayer(ped) then if GetPedSourceOfDeath(ped) == PlayerPedId() then TriggerEvent("BattlePass:AddXP",10,source) SetPedRelationshipGroupHash(ped, trash) end end end end end) … <#m_6702939521741169624> On Sun, May 23, 2021, 6:59 AM Swampert220 @.> wrote: Were you able to figure it out? — You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub <#20 <#20> <#20 <#20>> (comment) <#20 <#20> (comment) <#20 (comment) <#20 (comment)>>>>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AILTDMUZSZ26QKOVAC4MC63TPDU3ZANCNFSM4VUKIAQA . Any way to configure it for actual players — You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub <#20 <#20> (comment) <#20 (comment) <#20 (comment)>>>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AILTDMVJRPO5RIAVXFJK3YTTPDX45ANCNFSM4VUKIAQA . Should add this in client or server? — You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub <#20 (comment) <#20 (comment)>>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AILTDMVTQPMVNEICOYCYQE3TPD3T3ANCNFSM4VUKIAQA . Thanks man that would be really helpful, I have been looking for this for quite some time — You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub <#20 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AILTDMWTFDB22RMBM7YN4WTTPEF2LANCNFSM4VUKIAQA .

link?

from esx_xp.

rahafuf avatar rahafuf commented on September 23, 2024

from esx_xp.

TheChrisHp avatar TheChrisHp commented on September 23, 2024

Hi, I have been trying to make it work for when you kill a player, but when testing it with your code, upload the xp all the time until the player revives, do you know any way to fix it?

from esx_xp.

TheChrisHp avatar TheChrisHp commented on September 23, 2024

esto puede usarlo para ganar 10 XP cada vez que mata a un AI Citizen.CreateThread (function () _, trash = AddRelationshipGroup ("TRASH") mientras que es verdadero Citizen.Wait (0) for _, ped in ipairs (GetGamePool ( 'CPed')) do pedrelation = GetPedRelationshipGroupHash (ped) if DoesEntityExist (ped) y IsEntityDead (ped) y pedrelation ~ = basura y no IsPedAPlayer (ped) entonces si GetPedSourceOfDeath (ped) == PlayerPedId () entonces TriggerEvent (" AddXP ", 10, fuente) SetPedRelationshipGroupHash (ped, trash) end end end end end)
...
On Sun, May 23, 2021, 6:59 AM Swampert220 @.***> wrote: Were you able to figure it out? — You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub <#20 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AILTDMUZSZ26QKOVAC4MC63TPDU3ZANCNFSM4VUKIAQA .
Hi, I have been trying to make it work for when you kill a player, but when testing it with your code, upload the xp all the time until the player revives, do you know any way to fix it?

from esx_xp.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.