Jump to content

Castillo

Retired Staff
  • Posts

    21,935
  • Joined

  • Last visited

  • Days Won

    6

Everything posted by Castillo

  1. Oh, I didn't notice you had a table, my bad. function isPlayerInColshape ( thePlayer ) local is = false for _, col in ipairs ( wcols ) do if isElement ( col ) then if isElementWithinColShape ( thePlayer, col ) then is = col break end end end return is end Then you can replace your isElementWithinColShape with isPlayerInColshape.
  2. To use a for-loop, you need a table, and you haven't got one.
  3. Not yet possible. viewtopic.php?f=167&t=73773
  4. Castillo

    Login panel

    You must add the resource to the ACL group "admin". https://wiki.multitheftauto.com/wiki/ACL
  5. Les pido que no vengan al foro a acusar sobre recursos robados y demas.
  6. Shariq, I don't know if that's a joke, but he just said that he can't access to the CIT forums, and you give him a link to it?
  7. Sin el script no podemos ayudarte.
  8. Podes poner en una tabla todos los insultos que quieras censurar, y usar el evento onPlayerChat para luego fijarte si alguno de esos insultos esta en el mensaje que envio.
  9. Lo que podes cambiar es el estilo de caminar. Usa setPedWalkingStyle
  10. function weedhit ( element, matchingDimension ) if ( isElement ( element ) and matchingDimension and getElementType ( element ) == "player" ) then thePlayer = getPlayerName(element) if isPedInVehicle ( element ) then local vehicle = getPedOccupiedVehicle ( element ) local vehicleID = getElementModel ( vehicle ) local getHarvested = getElementData ( source, "isHarvested" ) if ( getHarvested == 1 ) then outputChatBox("Weed has already been harvested!", element) else if ( vehicleID == 532 ) then setElementData ( source, "isHarvested", 1 ) harvestWeed ( thePlayer ) else outputChatBox ( "You can't harvest with this vehicle!!", element ) end end else outputChatBox ( "/pickbud to pick the weed!", element ) end else outputChatBox("Error!! Contact an Admin, F2", element ) end end addEventHandler ( "onColShapeHit", getRootElement(), weedhit )
  11. Are you setting the element data when it gets harvested? post "harvestWeed" function code.
  12. function isValidVehicle ( vehicle ) if isElement ( vehicle ) then local parent = getElementParent ( vehicle ) if ( parent ) then local parent = getElementParent ( parent ) if ( parent ) then return ( parent == getResourceRootElement ( getResourceFromName ( "vehicle-system" ) ) ) else return false end else return false end else return false end end function EngineToggle ( src, key, state ) local occuVeh = getPedOccupiedVehicle ( src ) if ( occuVeh ~= false ) then if ( not isValidVehicle ( occuVeh ) ) then return end local vehOwner = tonumber ( getElementData ( occuVeh, "veh:owner" ) ) local charID = tonumber ( getElementData ( src, "character:id" ) ) if ( vehOwner == charID ) then local vehState = getVehicleEngineState ( occuVeh ) setVehicleEngineState ( occuVeh, not vehState ) setVehicleLocked ( occuVeh, not vehState ) else if ( getPedOccupiedVehicleSeat ( src ) == 0 ) then outputChatBox ( "This ain't your car!", src ) if isPedInVehicle ( src ) then local x, y, z = getElementPosition ( src ) removePedFromVehicle ( src ) setElementPosition ( src, x, y, z + 5 ) end end end end end Try it.
  13. local vehicles = getElementsByType ( "vehicle", getResourceRootElement ( getResourceFromName ( "vehicle-system" ) ) ) for _, vehicle in ipairs ( vehicles ) do fixVehicle ( vehicle ) end That will fix all vehicles created by the "vehicle-system" resource.
  14. The "gps" resource has the vehicle nodes. Edit: I don't know if this is what you were looking for: https://www.dropbox.com/s/c29lcuhmsfkr54a/paths.lua
  15. "element" is the player that hit the colshape, not the colshape.
  16. You can use any method to store it, that's up to you.
  17. He's talking about this forum. Here's Arran profile: memberlist.php?mode=viewprofile&u=53503 You can also ask someone that can use the CIT forum to contact Arran.
  18. You can store the team in a table. But, you need to know when the team changes, since there is no event for that.
  19. I don't see what's the point of that, what's wrong with using a image?
  20. I don't really get it, mind posting the full script?
×
×
  • Create New...