Announcement

Collapse
No announcement yet.

ToggleVehicleCollision(vehicleid, boolean toggle)

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    ToggleVehicleCollision(vehicleid, boolean toggle)

    A function that would toggle the vehicle collision to on/off; the most useful use of this would be to game modes where you've got a kind of mini-game where there's a limited set of spawns and instead of making 32 spawn locations for up to a 32 playerbase; you'd make 16-ish and then have some spawn in the same location and then toggle the vehicle collisions back on after either a timer or when they've gotten away from their spawn.

    If I didn't make it clear enough: it'd allow a vehicle to go through another vehicle without causing damage.

    #2
    Maybe for other elements ?

    Like a function "SetElementCollisionsEnabled(element, boolean)" so you could use it to toggle collisions for player, or for an object etc..

    Comment


      #3
      You can disable collision for players:

      GetPlayerActor(playerid):SetActorEnableCollision(f alse)

      vehicles.

      GetVehicleActor(vehicleid):SetActorEnableCollision (false)

      Comment


        #4
        Originally posted by Talos View Post
        You can disable collision for players:

        GetPlayerActor(playerid):SetActorEnableCollision(f alse)

        vehicles.

        GetVehicleActor(vehicleid):SetActorEnableCollision (false)
        Cheers.

        Comment

        Working...
        X