[DiscordArchive] Good afternoon.. I would like to put a script that blocks the player's XP when he reaches level 60 a
[DiscordArchive] Good afternoon.. I would like to put a script that blocks the player's XP when he reaches level 60 a
Archived author: Marcelo • Posted: 2024-01-23T16:37:57.329000+00:00
Original source
Good afternoon.. I would like to put a script that blocks the player's XP when he reaches level 60 and then with another item when he clicks and activates that item.. he starts gaining XP until lvl 70 and then until lvl 80 without having to block expansions in world.config?
Archived author: Honey • Posted: 2024-01-23T16:44:53.237000+00:00
Original source
Hold my cider
Archived author: Marcelo • Posted: 2024-01-23T16:45:31.199000+00:00
Original source
??
Archived author: Honey • Posted: 2024-01-23T16:47:40.005000+00:00
Original source
```lua
local PLAYER_EVENT_ON_GIVE_XP = 12
local maxLevel = 60
local function FrickDaXp(_, player, amount, _)
if player:GetLevel() >= maxLevel then
return 0
end
end
RegisterPlayerEvent(PLAYER_EVENT_ON_GIVE_XP, FrickDaXp)
```
Archived author: Honey • Posted: 2024-01-23T16:48:02.360000+00:00
Original source
Now give my cider back
Archived author: Marcelo • Posted: 2024-01-23T16:53:41.043000+00:00
Original source
Thank you... this script limits it to level 60 but I would need a script where after level 60 the player would need an item to activate xp again up to level 70... and then the same thing up to level 80 understand ?
Archived author: Marcelo • Posted: 2024-01-23T16:54:23.782000+00:00
Original source
how for him to level up now to level 70 he would need to talk to the npc who would give him xp until level 70
Archived author: Honey • Posted: 2024-01-23T16:54:29.883000+00:00
Original source
So replace the if statement checking for level and add another one checking if the player has your item.
Archived author: Honey • Posted: 2024-01-23T16:55:33.981000+00:00
Original source
`HasItem` currently in their inventory is easy.
`Has clicked an item`, possibly ages ago is not as easy.
Archived author: Marcelo • Posted: 2024-01-23T16:57:17.604000+00:00
Original source
could then be an item in an inventory
could be example 40752
it helps me