SetPlayerPos OnPlayerPickUpPickup?
#1

I want to make a player teleport when he picks up a pickup. What should i do? i also want to define the pickup which will teleport players.
(for example, even if there same pickups, i want that only one will teleport the player)
Reply
#2

https://sampwiki.blast.hk/wiki/OnPlayerPickUpPickup

READ THIS!!!
Reply
#3

Top Of the script:
pawn Код:
new TelePickup;
OnGameModeInit
pawn Код:
TelePickup = AddStaticPickup(....);
OnPlayerPickupPickup
pawn Код:
if(pickupid == TelePickup)
{
    SetPlayerPos(...);
    //Add other stuff like setplayerinterior etc if you need to...
}
Reply
#4

AddStaticPickup's don't return IDs, so you can't use them udner that callback. Use CreatePickup instead.
Reply
#5

Ahh, I didn't realise it worked like that since i've always used playertopoint.
I guess you learn something new everyday... Thanks.
Reply
#6

Sorry can you be more detailed? because i get 26 errors writing that...
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)