Problem with MoveObject
#1

So I started scripting for a door to move whenever a player gets next to it, no errors or anything, it's just whenever I go close to them, nothing happens... And one more thing, if you could tell me how to do it for a single player it would highly be appreciated. Thanks a lot.

news
Код:
new g1;
new g2;
new g3;
forwards
Код:
forward point(playerid);
forward close();
public OnGameModeInit()
Код:
public OnGameModeInit()
{
	g1 = CreateObject(3037, 935.74127, 2403.97021, 12.20237,   0.00000, 0.00000, -90.00000);
 	g2 = CreateObject(3037, 958.76367, 2403.97021, 12.18013,   0.00000, 0.00000, -90.00000);
 	g3 = CreateObject(3037, 981.90692, 2403.97021, 12.24170,   0.00000, 0.00000, -90.00000);
}
public point(playerid)
Код:
public point(playerid)
{
    if(IsPlayerInRangeOfPoint(playerid, 7.0, 935.7413, 2403.9702, 12.2024))
	{
	MoveObject(g1,935.7413, 2403.9702, 15.6253, 2.50);
	}
	else
	{
	MoveObject(g1,935.7413, 2403.9702, 12.2024, 2.50);
	}
    if(IsPlayerInRangeOfPoint(playerid, 7.0, 958.7637, 2403.9702, 12.1801))
	{
	MoveObject(g2,958.7637, 2403.9702, 15.6253, 2.50);
	}
	else
	{
	MoveObject(g2,958.7637, 2403.9702, 12.1801, 2.50);
	}
 	if(IsPlayerInRangeOfPoint(playerid, 7.0, 981.9069, 2403.9702, 12.2417))
	{
	MoveObject(g3,981.9069, 2403.9702, 15.6253, 2.50);
	}
	else
	{
	MoveObject(g3,981.9069, 2403.9702, 12.2417,2.50);
	}
	return 1;
}
public close()
Код:
public close()
{
	MoveObject(g1,935.7413,2403.9702,12.2024,5.00);
	MoveObject(g2,958.7637,2403.9702,12.1801,5.00);
	MoveObject(g3,1002.1666,2399.7578,12.2417,5.00);
	return 1;
}
Any help would be highly appreciated.
Reply


Messages In This Thread
Problem with MoveObject - by GabsReDeal - 08.09.2013, 15:30
Re: Problem with MoveObject - by morha12 - 08.09.2013, 15:39
Re: Problem with MoveObject - by playbox12 - 08.09.2013, 15:45
Re: Problem with MoveObject - by GabsReDeal - 16.09.2013, 09:36
Re: Problem with MoveObject - by GabsReDeal - 16.09.2013, 09:38
Re: Problem with MoveObject - by Threshold - 16.09.2013, 10:53
Re: Problem with MoveObject - by GabsReDeal - 21.09.2013, 14:51

Forum Jump:


Users browsing this thread: 2 Guest(s)