Jump to content

Search the Community

Showing results for tags 'collider'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Multi Theft Auto: San Andreas 1.x
    • Support for MTA:SA 1.x
    • User Guides
    • Open Source Contributors
    • Suggestions
    • Ban appeals
  • General MTA
    • News
    • Media
    • Site/Forum/Discord/Mantis/Wiki related
    • MTA Chat
    • Other languages
  • MTA Community
    • Scripting
    • Maps
    • Resources
    • Other Creations & GTA modding
    • Competitive gameplay
    • Servers
  • Other
    • General
    • Multi Theft Auto 0.5r2
    • Third party GTA mods
  • Archive
    • Archived Items
    • Trash

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Member Title


Gang


Location


Occupation


Interests

Found 1 result

  1. Well...I need to freeze a player during 3 seconds when he collides a ColCuboid, independent if he is in a vehicle or not. After this time, the player is unfreezed and will be only freeze again if he goes out the collider and enters it again. The collider is on a serverside script, but I read at the "Wiki MTA" an information that Freeze commands are only clientside... I tried to make all the script clientside but when I did, the script simply doesn't work and don't show any error. Reason: The player must wait the gate's movement ending so he can pass. The gate's movement lasts 3 seconds. PS: The gate is already working fine with the collider. Here is the serverside script working well without the freeze commands: gateilhaFA1 = createObject ( 968, -3341.7001953125, 458.5, 10.5, 0, 270, 270 ) ZonailhaFA1 = createColCuboid ( -3356.7001953125, 459.89999389648, 9.6999998092651, 15.0, 5, 5.0 )--Zona em cubo de colisão. function GateIlha1Open (source) if isObjectInACLGroup("user."..getAccountName(getPlayerAccount(source)), aclGetGroup("MapEditor")) then moveObject ( gateilhaFA1, 3000, -3341.7001953125, 458.5, 10.5, 0, 90, 0 ) outputChatBox ( "Acesso permitido.", source, 0, 255, 0, true ) else outputChatBox ( "Acesso negado.", source, 255, 0, 0, true ) end end addEventHandler ( "onColShapeHit", ZonailhaFA1, GateIlha1Open ) function GateIlha1Close () moveObject ( gateilhaFA1, 3000, -3341.7001953125, 458.5, 10.5, 0, -90, 0 ) end addEventHandler ( "onColShapeLeave", ZonailhaFA1, GateIlha1Close ) And here is the script with the freeze command and timer: gateilhaFA1 = createObject ( 968, -3341.7001953125, 458.5, 10.5, 0, 270, 270 ) ZonailhaFA1 = createColCuboid ( -3356.7001953125, 459.89999389648, 9.6999998092651, 15.0, 5, 5.0 )--Zona em cubo de colisão. function GateIlha1Open (source, player) local player = getLocalPlayer() if isObjectInACLGroup("user."..getAccountName(getPlayerAccount(source)), aclGetGroup("MapEditor")) then outputChatBox ( "Acesso permitido.", source, 0, 255, 0, true ) moveObject ( gateilhaFA1, 3000, -3341.7001953125, 458.5, 10.5, 0, 90, 0 ) setElementFrozen( player, true ) toggleAllControls( player, false ) setTimer ( function( source ) setElementFrozen( player, false ) toggleAllControls( player, true ) end, 3000, 1 ) outputChatBox ( "Aguarde o portão se abrir.", source, 0, 255, 0, true ) else outputChatBox ( "Acesso negado.", source, 255, 0, 0, true ) end end addEventHandler ( "onColShapeHit", ZonailhaFA1, GateIlha1Open ) function GateIlha1Close () moveObject ( gateilhaFA1, 3000, -3341.7001953125, 458.5, 10.5, 0, -90, 0 ) end addEventHandler ( "onColShapeLeave", ZonailhaFA1, GateIlha1Close ) How to create a Freeze with collider and timer?
×
×
  • Create New...