[Ajuda] Garagem de abertura
#1

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

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);
Reply
#3

Obrigado Ja resultou XD
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)