SA-MP Forums Archive
[Ajuda] Garagem de abertura - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: Non-English (https://sampforum.blast.hk/forumdisplay.php?fid=9)
+--- Forum: Languages (https://sampforum.blast.hk/forumdisplay.php?fid=33)
+---- Forum: Português/Portuguese (https://sampforum.blast.hk/forumdisplay.php?fid=34)
+---- Thread: [Ajuda] Garagem de abertura (/showthread.php?tid=368575)



Garagem de abertura - Netinho_the_killer - 13.08.2012

Oi criei este cуdigo

Код:
public OnGameModeInit()
{
        CreateObject(17950, 1078.87, -633.38, 114.67,   0.00, 0.00, 272.41);
	CreateObject(17951, 1083.23, -633.22, 114.36,   0.00, 0.00, 2.22);
        return 1;
}
public OnPlayerSpawn(playerid)
{

	RemoveBuildingForPlayer(playerid, 3737, 1079.9688, -638.2422, 115.0156, 0.25);
	RemoveBuildingForPlayer(playerid, 3604, 1079.9688, -638.2422, 115.0156, 0.25);
        return 1;
}
public OnPlayerUpdate(playerid)
{
    if(IsPlayerInRangeOfPoint(playerid,10 , 1085.4875,-633.2848,113.1970))
    {
		MoveObject(17951, 1085.2828, -633.1617, 116.5200, 500,0.0000, 90.0000, 1.1150);
    }
    else
    {
		MoveObject(17951,1083.23, -633.22, 114.36, 500, 0.00, 0.00, 2.22);
    }
	return 1;
}
E ja me fartei de compilar e nгo hб erros nem warnings. Mas simplesmente quando entro nesse raio, nгo abre. Alguйm me pode dizer se hб algum erro?


Re: Garagem de abertura - FeelLikeASir_ - 13.08.2012

O objeto deverб ser armazenado em uma variбvel para funcionar.

pawn Код:
new obj, obj1;

obj = CreateObject(17950, 1078.87, -633.38, 114.67,   0.00, 0.00, 272.41);
obj1 = CreateObject(17951, 1083.23, -633.22, 114.36,   0.00, 0.00, 2.22);

MoveObject(obj, 1085.2828, -633.1617, 116.5200, 500,0.0000, 90.0000, 1.1150);
MoveObject(obj1,1083.23, -633.22, 114.36, 500, 0.00, 0.00, 2.22);



Re: Garagem de abertura - Netinho_the_killer - 13.08.2012

Obrigado Ja resultou XD