CreateActor Bug
#3

Quote:
Originally Posted by Dayrion
Посмотреть сообщение
Without any codes that will be difficult to answer you.
This is CODE:

Код:
new pactor[MAX_PLAYERS];
new cpoint[MAX_PLAYERS];

new Float:PosActor[4][4] =
{
	{1464.30004883, -725.00000000, 92.50000000, 290.00000000},
	{634.90002441, -1111.09997559, 46.50000000, 219.99511719},
	{-2697.69995117, -130.50000000, 4.09999990, 270.00000000},
	{-2648.60009766, 166.60000610, 4.09999990, 0.00000000}
}

CMD:setactor(playerid, params[])
{
	if(IsValidActor(pactor[playerid])) DestroyActor(pactor[playerid]);
	new rand = random(3);
	pactor[playerid] = CreateActor(1, PosActor[rand][0], PosActor[rand][1], PosActor[rand][2], PosActor[rand][3]);
	cpoint[playerid] = 1;
	SetPlayerCheckpoint(playerid, PosActor[rand][0], PosActor[rand][1], PosActor[rand][2], 3.0);
	return 1;
}

public OnPlayerEnterCheckpoint(playerid)
{
	if(cpoint[playerid] != 0)
	{
		if(IsValidActor(pactor[playerid])) DestroyActor(pactor[playerid]);
		new rand = random(3);
		pactor[playerid] = CreateActor(1, PosActor[rand][0], PosActor[rand][1], PosActor[rand][2], PosActor[rand][3]);
		cpoint[playerid] = 1;
		SetPlayerCheckpoint(playerid, PosActor[rand][0], PosActor[rand][1], PosActor[rand][2], 3.0);
	}
	return 1;
}
Reply


Messages In This Thread
CreateActor Bug - by RichKiez - 06.08.2018, 14:27
Re: CreateActor Bug - by Dayrion - 06.08.2018, 14:48
Re: CreateActor Bug - by RichKiez - 06.08.2018, 15:11
Re: CreateActor Bug - by RichKiez - 07.08.2018, 02:33
Re: CreateActor Bug - by Dayrion - 07.08.2018, 07:34

Forum Jump:


Users browsing this thread: 1 Guest(s)