Problem with teleport checkpoint - 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: Problem with teleport checkpoint (
/showthread.php?tid=90338)
Problem with teleport checkpoint -
velkarumpali - 07.08.2009
So, i can make i tele and it work's, but when i make other, the first vanish. Even if I make them to other script. So why?
Re: Problem with teleport checkpoint -
gtalover12 - 07.08.2009
Show us your code..
Re: Problem with teleport checkpoint -
WrathOfGenesis - 07.08.2009
Are you using a checkpoint streamer?
Re: Problem with teleport checkpoint -
velkarumpali - 07.08.2009
Hmmm.... Should i show.... Ok, here them comes. I made them to 2 other scripts for test and I'm too tired to connect them again so i put them as 2 scripts.
Код:
#include <a_samp>
new tmac;
public OnPlayerSpawn(playerid)
{
SetPlayerInterior(playerid,0);
tmac = SetPlayerCheckpoint(playerid, 1497.0416, -687.8960, 95.5633, 3.0);
return 1;
}
public OnPlayerEnterCheckpoint(playerid)
{
if(tmac == 1)
{
SetPlayerInterior(playerid,12);
SetPlayerPos(playerid,2324.4199,-1147.5400,1050.7101);
}
return 1;
}
Код:
#include <a_samp>
new tmac2;
public OnPlayerSpawn(playerid)
{
SetPlayerInterior(playerid,0);
tmac2 = SetPlayerCheckpoint(playerid, 2324.7576, -1149.0542, 1050.7101, 3.0);
return 1;
}
public OnPlayerEnterCheckpoint(playerid)
{
if(tmac2 == 1)
{
SetPlayerInterior(playerid,0);
SetPlayerPos(playerid,1496.8420,-691.8549,94.7500);
}
return 1;
}
EDIT: Do i need to use that? (check point streamer) What that does? *Noob alert goes on*
Re: Problem with teleport checkpoint -
WrathOfGenesis - 07.08.2009
Check your code again. You used tmac as a variable to store the value returned from setplayercheckpoint but then used if ( tmac == 1 ). You need to use PlayerToPoint or some other function instead.