SA-MP Forums Archive
Pickup TelePort - 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: Pickup TelePort (/showthread.php?tid=103252)



Pickup TelePort - Jason_Larson - 19.10.2009

Does anyone know why 7/10 times if your using a pickup to change a players position it will crash them? It gives you about 40 warnings then the game crashes?


Re: Pickup TelePort - Jasen - 19.10.2009

Quote:
Originally Posted by Jason_Larson
Does anyone know why 7/10 times if your using a pickup to change a players position it will crash them? It gives you about 40 warnings then the game crashes?
They work fine for me, you must of coded them wrong.


Re: Pickup TelePort - Jason_Larson - 19.10.2009

No... Codes below....

pawn Code:
new pk_fdenter;

pk_fdenter = CreatePickup(1318,23,1207.5006,-1439.0385,13.3828,-1); //ToEnterFDSA

if ( pickupid == pk_fdenter )
{
 SendClientMessage(playerid,COLOR_YELLOW,"(INFO) Welcome to the San Andreas Fire Department Los Santos precinct.");
 SetPlayerInterior(playerid,0)
 SetPlayerVirtualWorld(playerid,23);
 SetPlayerPos(playerid,492.0486,1399.5579,1080.2649);
}



Re: Pickup TelePort - Jasen - 19.10.2009

top of script:

Code:
new pk_fdenter;
ongamemodeinit:

Code:
pk_fdenter = CreatePickup(1318,23,1207.5006,-1439.0385,13.3828,-1); //ToEnterFDSA
onplayerpickuppickup

Code:
if ( pickupid == pk_fdenter )
{
 SendClientMessage(playerid,COLOR_YELLOW,"(INFO) Welcome to the San Andreas Fire Department Los Santos precinct.");
 SetPlayerInterior(playerid,0)
 SetPlayerVirtualWorld(playerid,23);
 SetPlayerPos(playerid,492.0486,1399.5579,1080.2649);
}
make sure you return 1; in each of them callbacks


Re: Pickup TelePort - Jason_Larson - 19.10.2009

That is all as it is set up.


Re: Pickup TelePort - Jakku - 19.10.2009

You have to use OnPlayerPickupPickup. If you don't use it, the server will crash instantly


Re: Pickup TelePort - Mike Garber - 19.10.2009

Lol he is using OnPlayerPickupPickup...


Re: Pickup TelePort - Jason_Larson - 19.10.2009

Quote:
Originally Posted by mavtias
Lol he is using OnPlayerPickupPickup...
Correcto I am


Re: Pickup TelePort - Jakku - 19.10.2009

Quote:
Originally Posted by mavtias
Lol he is using OnPlayerPickupPickup...
He should post it then..


Re: Pickup TelePort - MenaceX^ - 19.10.2009

What errors/warnings do you get?