[Help] AttachObjectToVehicle
#1

After i installed the RC3 the AttachObjectToVehicle doesn't work... :\
Reply
#2

You need to create the object first, before attempting to attach it to a vehicle.
Reply
#3

Quote:
Originally Posted by XePloiT
Посмотреть сообщение
After i installed the RC3 the AttachObjectToVehicle doesn't work... :\
And you expect us to guess what your problem is?

Be more explicit and post the section of the code where you used that function.
Reply
#4

Its worked perfectly on the RC1-2
pawn Код:
new TO[MAX_VEHICLES];
CMD:att(playerid,params[])
{
    new oID;
    DestroyObject(TO[GetPlayerVehicleID(playerid)]);
    if(sscanf(params,"i",oID)) return SendClientMessage(playerid,COLOR_WHITE,"Do: /Att [ {8a2be2}Object ID {ffffff}]");
    if(!isNumeric(params)) return SendClientMessage(playerid,COLOR_WHITE,"Do: /Att [ {8a2be2}Object ID {ffffff}] .");
    if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid,COLOR_WHITE,"You Are Not In A {ff0000}Car");
    TO[GetPlayerVehicleID(playerid)] = CreateObject(oID, 0, 0, 0, 0, 0, 0);
    AttachObjectToVehicle(TO[GetPlayerVehicleID(playerid)],GetPlayerVehicleID(playerid),0,0,1,0,0,0);
    return 1;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)