SA-MP Forums Archive
How to make this gate be moved... - 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: How to make this gate be moved... (/showthread.php?tid=268702)



How to make this gate be moved... - Join7 - 13.07.2011

How to make this gate be moved Float: rX, Float: rY, Float: rZ, because when you do so:

Код:
new lvpdgate;

//OnGameModeInit
lvpdgate = CreateObject(968,2.20434570,2.36645508,10.53316975,0.00000000,270.00000000,269.99993896);

//OnPlayerCommandText
if(strcmp(cmdtext,"/lvpdpon",true)==0)
{
	if(gTeam[playerid] != TEAM_LVPD)
	return SendClientMessage(playerid, COLOR_YELLOW, "You are not in LVPD!");
	MoveObject(lvpdgate,2.62084961,2.09423828,0.15268755,1.00);
	SendClientMessage(playerid, COLOR_YELLOW, "Портата е отворена!");
	return 1;
}
if(strcmp(cmdtext,"/lvpdpoff",true)==0)
{
	if(gTeam[playerid] != TEAM_LVPD)
	return SendClientMessage(playerid, COLOR_YELLOW, "You are not in LVPD!");
	MoveObject(lvpdgate,2.62011719,2.09375000,6.15268755,1.00);
	SendClientMessage(playerid, COLOR_YELLOW, "Портата е затворена!");
	return 1;
}
This CreateObject(968,2.20410156,2.36621094,10.53316975 ,0.00000000,330.00000000,270.00000000);

I do not know how to do it to move in Float: rX, rY, rZ
this type that I gave an example in Float: X, Float: Y, Float: Z, and if gate is not moving


Re: How to make this gate be moved... - Skaizo - 13.07.2011

you must with timer to move gate, I think


Re: How to make this gate be moved... - volune - 13.07.2011

Quote:
Originally Posted by Join7
Посмотреть сообщение
How to make this gate be moved Float: rX, Float: rY, Float: rZ, because when you do so:

Код:
new lvpdgate;

//OnGameModeInit
lvpdgate = CreateObject(968,2.20434570,2.36645508,10.53316975,0.00000000,270.00000000,269.99993896);

//OnPlayerCommandText
if(strcmp(cmdtext,"/lvpdpon",true)==0)
{
	if(gTeam[playerid] != TEAM_LVPD)
	return SendClientMessage(playerid, COLOR_YELLOW, "You are not in LVPD!");
	MoveObject(lvpdgate,2.62084961,2.09423828,0.15268755,1.00);
	SendClientMessage(playerid, COLOR_YELLOW, "Портата е отворена!");
	return 1;
}
if(strcmp(cmdtext,"/lvpdpoff",true)==0)
{
	if(gTeam[playerid] != TEAM_LVPD)
	return SendClientMessage(playerid, COLOR_YELLOW, "You are not in LVPD!");
	MoveObject(lvpdgate,2.62011719,2.09375000,6.15268755,1.00);
	SendClientMessage(playerid, COLOR_YELLOW, "Портата е затворена!");
	return 1;
}
This CreateObject(968,2.20410156,2.36621094,10.53316975 ,0.00000000,330.00000000,270.00000000);

I do not know how to do it to move in Float: rX, rY, rZ
this type that I gave an example in Float: X, Float: Y, Float: Z, and if gate is not moving
to move gate or somthing else on rX,rY,rZ, you need to use SetObjectRot
And set up this
if(gTeam[playerid] != TEAM_LVPD)
return SendClientMessage(playerid, COLOR_YELLOW, "You are not in LVPD!");
on the one line


Re: How to make this gate be moved... - Join7 - 13.07.2011

Abe I mean by this position CreateObject(968,2.20434570,2.36645508,10.53316975 ,0.00000000,270.00000000,269.99993896);
move of this CreateObject(968,2.20410156,2.36621094,10.53316975 ,0.00000000,330.00000000,270.00000000);

They have the same coordinates in addition rX, rY, rZ


Re: How to make this gate be moved... - volune - 13.07.2011

use SetObjectRot man


Re: How to make this gate be moved... - Join7 - 13.07.2011

so?

Код:
new lvpdgate;

//OnGameModeInit
lvpdgate = CreateObject(968,2.20434570,2.36645508,10.53316975,0.00000000,270.00000000,269.99993896);

//OnPlayerCommandText
if(strcmp(cmdtext,"/lvpdpon",true)==0)
{
	if(gTeam[playerid] != TEAM_LVPD)
	return SendClientMessage(playerid, COLOR_YELLOW, "You are not in LVPD!");
	SetObjectRot(lvpdgate,0.00000000,330.00000000,270.00000000);
	SendClientMessage(playerid, COLOR_YELLOW, "Портата е отворена!");
	return 1;
}
if(strcmp(cmdtext,"/lvpdpoff",true)==0)
{
	if(gTeam[playerid] != TEAM_LVPD)
	return SendClientMessage(playerid, COLOR_YELLOW, "You are not in LVPD!");
	SetObjectRot(lvpdgate,0.00000000,270.00000000,269.99993896);
	SendClientMessage(playerid, COLOR_YELLOW, "Портата е затворена!");
	return 1;
}
EDIT: And you have to ask Animation?