how to attach an object to an object by a command ?
#9

Quote:
Originally Posted by Jhony_Blaze
Посмотреть сообщение
Okay now I made the object to appear, this is how all the script looks like, but now the gate wont open:

Код:
CMD:bay1o(playerid, params[])
{
    Gate1[playerid] = CreateObject(1238, -269.2469, 1187.2875, 23.1069, 0.0000, 0.0000, 0.0000);
    AttachObjectToObject(1238, 1262, -269.2437, 1187.3073, 23.1069, 0.0000, 0.0000, 0.0000, 1);
    SendClientMessage(playerid, COLOR_GREEN,"Bay 1 is open");
    MovePlayerObject(playerid, Gate1[playerid], -254.7196, 1209.9005, 16.3944, 1);
	return 1;
}
objectid, is just like this.

pawn Код:
CMD:bay1o(playerid, params[])
{
     Gate1[playerid] = CreateObject(bla);
     ObjectToAttached[playerid] = CreateObject(bla);
     AttachObjectToObject(Gate1[playerid], ObjectToAttached[playerid], blablaa);
     and so on
}

Not the modelid of your object.
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)