Jump to content

[Help] engineSetSurfaceProperties


WerTer

Recommended Posts

Hello there i was trying to script when you drive on the grass the car loses grip and becomes undriveable but it doesn't work tried changing values from 255 to 0 but nothing happens :(

here is the script

function tyregrip()
    engineSetSurfaceProperties(9, tyregrip, 255)
    engineSetSurfaceProperties(10, tyregrip, 255)
    engineSetSurfaceProperties(11, tyregrip, 255)
    engineSetSurfaceProperties(12, tyregrip, 255)
    engineSetSurfaceProperties(13, tyregrip, 255)
    engineSetSurfaceProperties(14, tyregrip, 255)
    engineSetSurfaceProperties(15, tyregrip, 255)
    engineSetSurfaceProperties(16, tyregrip, 255)
    engineSetSurfaceProperties(17, tyregrip, 255)
    engineSetSurfaceProperties(20, tyregrip, 255)
    engineSetSurfaceProperties(80, tyregrip, 255)
    engineSetSurfaceProperties(81, tyregrip, 255)
    engineSetSurfaceProperties(82, tyregrip, 255)
    engineSetSurfaceProperties(115, tyregrip, 255)
    engineSetSurfaceProperties(116, tyregrip, 255)
    engineSetSurfaceProperties(117, tyregrip, 255)
    engineSetSurfaceProperties(118, tyregrip, 255)
    engineSetSurfaceProperties(119, tyregrip, 255)
    engineSetSurfaceProperties(120, tyregrip, 255)
    engineSetSurfaceProperties(121, tyregrip, 255)
    engineSetSurfaceProperties(122, tyregrip, 255)
    engineSetSurfaceProperties(125, tyregrip, 255)
    engineSetSurfaceProperties(146, tyregrip, 255)
    engineSetSurfaceProperties(147, tyregrip, 255)
    engineSetSurfaceProperties(148, tyregrip, 255)    
    engineSetSurfaceProperties(149, tyregrip, 255)
    engineSetSurfaceProperties(150, tyregrip, 255)
    engineSetSurfaceProperties(151, tyregrip, 255)
    engineSetSurfaceProperties(152, tyregrip, 255)
    engineSetSurfaceProperties(153, tyregrip, 255)
    engineSetSurfaceProperties(160, tyregrip, 255)
    outputChatBox( "test" )
end

addCommandHandler( "grip", tyregrip)

Link to comment

You are not doing it correctly, it should be:
 

function GripTyre()
    engineSetSurfaceProperties(9, "tyregrip", 255)
    engineSetSurfaceProperties(10, "tyregrip", 255)
    engineSetSurfaceProperties(11, "tyregrip", 255)
    engineSetSurfaceProperties(12, "tyregrip", 255)
    engineSetSurfaceProperties(13, "tyregrip", 255)
    engineSetSurfaceProperties(14, "tyregrip", 255)
    engineSetSurfaceProperties(15, "tyregrip", 255)
    engineSetSurfaceProperties(16, "tyregrip", 255)
    engineSetSurfaceProperties(17, "tyregrip", 255)
    engineSetSurfaceProperties(20, "tyregrip", 255)
    engineSetSurfaceProperties(80, "tyregrip", 255)
    engineSetSurfaceProperties(81, "tyregrip", 255)
    engineSetSurfaceProperties(82, "tyregrip", 255)
    engineSetSurfaceProperties(115, "tyregrip", 255)
    engineSetSurfaceProperties(116, "tyregrip", 255)
    engineSetSurfaceProperties(117, "tyregrip", 255)
    engineSetSurfaceProperties(118, "tyregrip", 255)
    engineSetSurfaceProperties(119, "tyregrip", 255)
    engineSetSurfaceProperties(120, "tyregrip", 255)
    engineSetSurfaceProperties(121, "tyregrip", 255)
    engineSetSurfaceProperties(122, "tyregrip", 255)
    engineSetSurfaceProperties(125, "tyregrip", 255)
    engineSetSurfaceProperties(146, "tyregrip", 255)
    engineSetSurfaceProperties(147, "tyregrip", 255)
    engineSetSurfaceProperties(148, "tyregrip", 255)    
    engineSetSurfaceProperties(149, "tyregrip", 255)
    engineSetSurfaceProperties(150, "tyregrip", 255)
    engineSetSurfaceProperties(151, "tyregrip", 255)
    engineSetSurfaceProperties(152, "tyregrip", 255)
    engineSetSurfaceProperties(153, "tyregrip", 255)
    engineSetSurfaceProperties(160, "tyregrip", 255)
    iprint("Tyre grip started")
end
addCommandHandler( "grip", GripTyre)

 

  • Like 1
Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...