SetPlayerPos OnPlayerPickUpPickup? - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: SetPlayerPos OnPlayerPickUpPickup? (
/showthread.php?tid=106670)
SetPlayerPos OnPlayerPickUpPickup? -
Angelo94 - 04.11.2009
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)
Re: SetPlayerPos OnPlayerPickUpPickup? -
Nikos12 - 04.11.2009
https://sampwiki.blast.hk/wiki/OnPlayerPickUpPickup
READ THIS!!!
Re: SetPlayerPos OnPlayerPickUpPickup? -
miokie - 04.11.2009
Top Of the script:
OnGameModeInit
pawn Код:
TelePickup = AddStaticPickup(....);
OnPlayerPickupPickup
pawn Код:
if(pickupid == TelePickup)
{
SetPlayerPos(...);
//Add other stuff like setplayerinterior etc if you need to...
}
Re: SetPlayerPos OnPlayerPickUpPickup? -
Sergei - 04.11.2009
AddStaticPickup's don't return IDs, so you can't use them udner that callback. Use CreatePickup instead.
Re: SetPlayerPos OnPlayerPickUpPickup? -
miokie - 04.11.2009
Ahh, I didn't realise it worked like that since i've always used playertopoint.
I guess you learn something new everyday... Thanks.
Re: SetPlayerPos OnPlayerPickUpPickup? -
Angelo94 - 05.11.2009
Sorry can you be more detailed? because i get 26 errors writing that...