Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //----------------- Magic Carpet -----------------
- //
- //Nothing special Do check IS_CONTROL_PRESSED numbers though
- //
- //--------------------------------------------------
- InitiateMagicCarpet()
- {
- int MagicCarpetObject = CREATE_OBJECT("p_oil_slick_01",--------------------------
- FREEZE_ENTITY_POSITION(MagicCarpetObject,1)
- SET_ENTITY_VISIBLE(MagicCarpetObject,0)
- };
- MagicCarpetLoop()
- {
- Vector3 PlayerCoord = GET_ENTITY_COORDS(PLAYER_PED_ID(),1)
- float xPlane PlayerCoord.X
- float yPlane PlayerCoord.Y
- float Normal = 1.0225
- float Down = 1.6
- float Up = 0.4
- float Vehicular 2000.0
- if (IS_PED_IN_ANY_VEHICLE(PLAYER_PED_ID(),0) //in Car
- {
- zPlane = PlayerCoord.Z - Vehicular
- }
- elseif (IS_CONTROL_PRESSED(2,36) == true ) //Down
- {
- zPlane = PlayerCoord.Z - Down
- }
- elseif (IS_CONTROL_PRESSED(2,26) == true ) //Up
- {
- zPlane = PlayerCoord.Z - Up
- }
- else //Normal
- {
- zPlane = PlayerCoord.Z - Normal
- }
- Vector3 Coord(xPlane, yPlane, zPlane)
- SET_ENTITY_COORDS(MagicCarpetObject,1,0,0,1)
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement