Jump to content

Castillo

Retired Staff
  • Posts

    21,935
  • Joined

  • Last visited

  • Days Won

    6

Everything posted by Castillo

  1. addEventHandler ( "onMarkerHit", createMarker ( 1791.537, 656.511, 17.626, 'cylinder', 2.0, 255, 0, 0, 150 ) , function ( hitElement, matchingDimension ) if ( getElementType ( hitElement ) == "vehicle" ) then setElementFrozen ( hitElement, true ) setTimer ( setElementFrozen, 5000, 1, hitElement, false ) end end ) That's for the 5 seconds to unfreeze, but for the dxDrawText, you'll have to do that.
  2. local gasMaskActivation = function ( player ) local texture, model = getPedClothes ( player, 15 ) if not ( texture == "hockey" and model == "hockeymask" ) then addPedClothes ( player, "hockey", "hockeymask", 15 ) else removePedClothes ( player, 15 ) end end addEventHandler ( "onPlayerLogin",root, function ( ) bindKey ( source, "h", "down", gasMaskActivation ) end ) addEventHandler ( "onPlayerLogout", root, function ( ) if isKeyBound ( source, "h", "down", gasMaskActivation ) then unbindKey ( source, "h", "down", gasMaskActivation ) end end )
  3. Indeed it is useless, and I think it could be done with scripting functions.
  4. Download the resource "bone_attach" from the MTA community and then use the exported function "attachElementToBone".
  5. local pepsi = createObject ( 955, 1463.5, -2206, 12.5, 0, 0, 0 ) local myMarker1 = createMarker ( 1463.4791259766, -2207.4919433594, 13.546875, "cylinder", 1, 255, 255, 0, 170 ) function MarkerHit1 ( player, matchingDimension ) takePlayerMoney ( player, 150 ) setPedAnimation ( player, "VENDING", "VEND_Drink_P", -1, true, false, true ) local kb_beer = createObject( 1950, 0, 0, 0, 0, 0, 0 ) setTimer ( function ( beer ) setPedAnimation ( player, nil, nil ) if isElement ( beer ) then destroyElement ( beer ) end end ,1300, 1, kb_beer ) outputChatBox ( "??? ?????? ????", player, 255, 0, 0 ) setPedRotation ( player, 0 ) setElementHealth ( player, 100 ) exports [ "bone_attach" ]:attachElementToBone ( kb_beer, player, 24, 0, 0, 0, 0, 0, 0 ) end addEventHandler ( "onMarkerHit", myMarker1, MarkerHit1 )
  6. Change the offsets until it fits.
  7. exports [ "bone_attach" ]:attachElementToBone ( kb_beer, player, 12, 0.015, 0.03, 0, 180, 0, 0 )
  8. You named the bone_attach resource: "VEND_Drink_P"?
  9. Hold on, you forgot to specify the bone to attach it to. exports [ "bone_attach" ]:attachElementToBone(kb_beer,player,24,0,0,0,0,0,0)
  10. That function won't work, it's for CUSTOM WEAPONS. Wiki quote:
  11. To offsets, experiment, try with 0 on all of these, if that doesn't fit, change them. exports [ "bone_attach" ]:attachElementToBone(kb_beer,player,0,0,0,0,0,0)
  12. About weapons, you can check when you fire. onClientPlayerWeaponFire
  13. You aren't using offsets, you are using 3D world coordinates, change these: 1463.541015625,-2207.1723632813,13.546875 to something else.
  14. Castillo

    Party

    What do you mean by a "party"?
  15. Remove "MarkerHit1" from attachElementToBone.
  16. No, you need to create the object with createObject.
  17. eBarrier = createObject ( 968, 1544.6999511719, -1630.5999755859, 13.10000038147, 0, 90, 90 ) gatecol = createColCircle ( 1544.5999755859, -1627.1999511719, 12.39999961853, 1 ) bar1 = createObject ( 994, 1544.6999511719, -1623.9000244141, 12.39999961853, 0, 0, 90 ) bar2 = createObject ( 994, 1544.6999511719, -1623.9000244141, 13.39999961853, 0, 0, 90 ) bar3 = createObject ( 994, 1544.9000244141, -1639.0000000000, 12.39999961853, 0, 0, 90 ) bar4 = createObject ( 994, 1544.9000244141, -1639.0000000000, 13.39999961853, 0, 0, 90 ) moving = false function move ( thePlayer ) if ( getTeamName ( getPlayerTeam ( thePlayer ) ) == "Police" ) then if ( moving ) then return end if ( eventName == "onColShapeHit" ) then moveObject ( eBarrier, 1500, 1544.6999511719, -1630.5999755859, 13.10000038147, 0, -90, 0 ) moving = true else moveObject ( eBarrier, 1500, 1544.6999511719, -1630.5999755859, 13.10000038147, 0, 90, 0 ) moving = true end end end addEventHandler ( "onColShapeHit", gatecol, move ) addEventHandler ( "onColShapeLeave", gatecol, move )
  18. Where's "kb_beer" defined?
  19. Castillo

    Question

    I wasn't telling you that, it was for 6ArHxiMr'3a[Z]eF.
  20. Castillo

    FIXED

    The problem is the server? or you can't see blips on other servers neither?
×
×
  • Create New...