camera view on car -
HeLiOn_PrImE - 13.09.2012
I need to stick cameras to my car. I tried attaching the camera to an already attached object, but I failed miserably. Can you give me the code for that? For example I need the camera on the side of the car looking at the front wheel. Just like one of the camhack views.
Can someone give me the template, so I can figure out how to do them myself?
Re: camera view on car -
Faisal_khan - 13.09.2012
Search it on the forums.
Or goto ******, paste: site:forum.sa-mp.com your search
Re: camera view on car -
HeLiOn_PrImE - 13.09.2012
don't you think I've already tried it?
Re: camera view on car - HuSs3n - 13.09.2012
pawn Код:
new p = GetPlayerVehicleID(playerid);
new object[playerid] = CreatePlayerObject(playerid,19300, 0., 0,0, 0.0000, -1, -1, 100);
AttachPlayerObjectToVehicle(playerid,object[playerid],p,0.0, 0.0, 5.510000, 0.000000, 0.000000, 0.000000);
AttachCameraToPlayerObject(playerid,object[playerid]);
change the coords in AttachPlayerObjectToVehicle
Re: camera view on car -
HeLiOn_PrImE - 13.09.2012
When I reset the camera, I need to destroy the object. how should I define it again in a separate callback?
Re: camera view on car -
trapstar2020 - 13.09.2012
REP ME PLZ
okay you need to getcarposition attach
new objectid = CreateObject(...);
new vehicleid = GetPlayerVehicleID(playerid);
AttachObjectToVehicle(objectid, vehicleid, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0);
go to mta and create a object onto a car get the object the xyz and the xyz rotation and past it there and createobject with no position just create the object put the cords on the attach to car........... and there u have it attackobject to veh
REP ++ plz i need
Re: camera view on car - HuSs3n - 13.09.2012
Quote:
Originally Posted by HeLiOn_PrImE
When I reset the camera, I need to destroy the object. how should I define it again in a separate callback?
|
define the object on the top of your script
new object[MAX_PLAYERS];
and to destroy it
DestroyObject(object[playerid]);
Quote:
Originally Posted by trapstar2020
REP ME PLZ
okay you need to getcarposition attach
new objectid = CreateObject(...);
new vehicleid = GetPlayerVehicleID(playerid);
AttachObjectToVehicle(objectid, vehicleid, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0);
go to mta and create a object onto a car get the object the xyz and the xyz rotation and past it there and createobject with no position just create the object put the cords on the attach to car........... and there u have it attackobject to veh
REP ++ plz i need
|


Re: camera view on car -
HeLiOn_PrImE - 13.09.2012
thank you, I'll try it tomorrow. Rep to all of you. who answered.