Problem with teleport checkpoint
#1

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?
Reply
#2

Show us your code..
Reply
#3

Are you using a checkpoint streamer?
Reply
#4

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*
Reply
#5

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.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)