SA-MP Forums Archive
[Help] AttachObjectToVehicle - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: [Help] AttachObjectToVehicle (/showthread.php?tid=198992)



[Help] AttachObjectToVehicle - XePloiT - 14.12.2010

before RC3 it attached objects fine but since i upgraded to RC3 the objects does not attach to the vehicle...
and i didn't touched the script...maybe happened to somebody and someone know how to fix it?
i don't think its something in the script... but there it is anyway...
EDIT: any attaching doesn't work.. :\ not to player vehicle or anything
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 SendClientMessage(playerid,COLOR_WHITE,"The {8a2be2}Object {ffffff}Has Been Added");
}