View Single Post
Old 24/08/2011, 09:39 AM   #6
Dragony92
Banned
 
Join Date: Feb 2011
Location: Belgrade, Serbia
Posts: 484
Reputation: 60
Default Re: AttachObjectToVehicle

Same...
pawn Code:
if(strcmp(cmd, "/undercover", true) == 0)
    {
        if(IsACop(playerid) || IsAFreecop(playerid))
        {
            new UnderCoverobj[3];
            UnderCoverobj[0] = CreateObject(18646,0,0,0,0,0,0);
            UnderCoverobj[1] = CreateObject(18646,0,0,0,0,0,0);
            AttachObjectToVehicle(UnderCoverobj[0], GetPlayerVehicleID(playerid), -0.5, -0.2, 0.8, 2.0, 2.0, 3.0);
            AttachObjectToVehicle(UnderCoverobj[1], GetPlayerVehicleID(playerid), -0.5, -0.2, 0.8, 2.0, 2.0, 3.0);
            SendClientMessage(playerid, 0xFFFFFFAA, "You have Attched Undercover light on your vehicle!");
        }
        else
        {
            SendClientMessage(playerid, COLOR_GREY, "**You are not a Cop!");
        }
        return 1;
    }

Edit; Object is creted on coordinates 0 0 0 but not attached...
Dragony92 is offline