[Tutorial] How to use map 'Objects' as 'Vehicles'.
#1

Hello Everyone! Once again. I'd like to share something with you guys.
I didn't really know where to post this but it probably is the right place.


This is a very-short tutorial on making your own vehicles using the objects.

1) Create a Vehicle somewhere (In this case we are creating it near the player).
pawn Код:
new Float:Pos[3]; GetPlayerPos(playerid, Pos[0], Pos[1], Pos[2]);
new myvehicle = CreateVehicle(594, Pos[0], Pos[1], Pos[2], 0, -1, -1, 0); //Note: 594 is an RC CAM.
2) Create an Object that you want to use as a replacement for the vehicle.
pawn Код:
new myobject = CreateObject(1598, 0, 0, -500, 0, 0, 0, 100); //1598 is a beachball I think.
3) Attach it to the vehicle.
pawn Код:
AttachObjectToVehicle(myobject, myvehicle, 0, 0, 0, 0, 0, 0);
4) Change the Vehicle Interior ID to a player's interior +1 so it is always different.
pawn Код:
LinkVehicleToInterior(myvehicle, GetPlayerInterior(playerid) + 1);
5) Put player in the Vehicle.
pawn Код:
PutPlayerInVehicle(playerid, myvehicle, 0);
Done.

What have you achieved?
- This will make the vehicle invisible to everyone (except any person with interior as 10).
- You will be able to roam around with the vehicle but everyone will see it as the attached object.
Basically, you replaced the vehicle model.

Example/Screenshot:
-Me flying a BIG CESAR! (Note that the object used here is different)

[ame]http://www.youtube.com/watch?v=UnWyANQZDCw[/ame]
Reply
#2

This is nice, Thanks for this .

Keep it up, man.
Reply
#3

ahahahhahhah so cool thanks
Reply
#4

The video made my day. Nice tutorial, simple and effective way.
Reply
#5

That's funny & good, good job.
Reply
#6

Actually that's the way I made that.
Reply
#7

Thanks Everyone! ^_^

Quote:
Originally Posted by Meta
Посмотреть сообщение
Actually that's the way I made that.
Haven't seen that before, Nice.

I found out this when I was trying to make a football minigame... (I attached a Beachball to an RC Cam and used SetVehicleVelocity to do stuff) (Same with my shark FS)
Reply
#8

Well done iPleomax. Thanks for this.
Reply
#9

lmao,, this is funny
nice job!
Reply
#10

Really creative, however. Using the interior linking method is really really impressive, it's also great for invisibility to derby servers :P

What would happen if the hydra is destroyed? and theres an object?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)