[DiscordArchive] What is it then ?
[DiscordArchive] What is it then ?
Archived author: cyberpro98 • Posted: 2024-02-12T17:20:32.866000+00:00
Original source
What is it then ?
Archived author: cyberpro98 • Posted: 2024-02-12T17:20:35.454000+00:00
Original source
just a number
Archived author: cyberpro98 • Posted: 2024-02-12T17:20:43.358000+00:00
Original source
RegisterPlayerEvent( 1000, 1, 0 ) this ?
Archived author: volek • Posted: 2024-02-12T17:22:02.060000+00:00
Original source
Here I converted the typescript
```
doTeleport = function(____, eventId, player, item, target)
if player then
player:Teleport(
571,
5496.157227,
4725.473633,
-194.177444,
2.009775
)
return true
end
end
RegisterItemEvent(
100000,
2,
function(...) return doTeleport(_G, ...) end
)
```
Archived author: cyberpro98 • Posted: 2024-02-12T17:22:27.364000+00:00
Original source
what is number 2 ?
Archived author: volek • Posted: 2024-02-12T17:22:33.682000+00:00
Original source
2 is the eventId
Archived author: cyberpro98 • Posted: 2024-02-12T17:23:00.764000+00:00
Original source
mhmm ok
Archived author: cyberpro98 • Posted: 2024-02-12T17:23:09.757000+00:00
Original source
What is wrong with my script ?
Archived author: volek • Posted: 2024-02-12T17:24:04.410000+00:00
Original source
```
enum ItemEvents
{
ITEM_EVENT_ON_DUMMY_EFFECT = 1, // (event, caster, spellid, effindex, item)
ITEM_EVENT_ON_USE = 2, // (event, player, item, target) - Can return false to stop the spell casting
```
From docs
Archived author: volek • Posted: 2024-02-12T17:25:04.580000+00:00
Original source
in the script you still have to change the item id (100000) and teleport coordinates / id)