24.11.2017, 06:35
Hi all. Have a problem with AttachObjectToVehicle. When I use my command, object does not appear. When I use command and then move on with car, then object appears. Why it does not appear when I just type my command? Why I need to move on with car? I tryed to change AttachObjectToVehicle and CreateObject to Dynamic, but still same.
Код:
CMD:taxi(playerid) { if(GetPlayerState(playerid) != PLAYER_STATE_DRIVER) return SendClientMessage(playerid, -1, ""COL_ERROR"{ffffff}Need be in car!"); new vehicleid = PI[playerid][car]; Object[playerid] = CreateObject(19308, 0, 0, 0, 0, 0, 0); AttachObjectToVehicle(Object[playerid], vehicleid, 0.019999, -0.070000, 0.934999, -0.000000, 0.000000, -90.000000); return 1; }