Jump to content

Simple0x47

Members
  • Posts

    1,518
  • Joined

  • Last visited

  • Days Won

    8

Everything posted by Simple0x47

  1. Try it on server side. If the matrix works then I'll help you out to make a server side based script.
  2. The shader hasn't got any color definition, so that's the reason why it's black. You could use another method by using DxCreateTexture.
  3. Like @IIYAMA said you must make a new melee damage in order to get to remove those limits.
  4. So basically it says somewhere the var type is being called, and in this code there's not a 'type' variable. So what if you post all the scripts that are joint to this one like the slothbot.
  5. It's not really duplicating them the thing is making the original weapon invisible, replace any other object with a weapon model. Attach the replaced object to the hand bone with the specific rotation and there you have. engineLoadTXD() engineLoadDFF() engineImportTXD() engineReplaceModel() setElementAlpha() -- MAKE THE ORIGINAL GUN ELEMENT INVISIBLE exports.bone_attach:attachElementToBone() -- YOU WILL NEED THE RESOURCE bone_attach https://community.multitheftauto.com/index.php?p=resources&s=details&id=2540
  6. The question is, does the player move around the AT-400 because I think not when it's not around it's door so. [[CLIENT SIDE]] -- VARIABLES -- VEHICLES WARP local theVehicles = {} -- IN CASE YOU WANT IT FOR MORE VEHICLES JUST ADD VALUES TO THE TABLE, theVehicles[ vehicleID ] = true theVehicles[ 577 ] = true -- FUNCTIONS -- CHECK AND WARP local function vehicleWarp() if not ( isPedInVehicle( localPlayer ) ) then local vehicles = getElementsByType( "vehicles" ) for i = 1, #vehicles do local theVehicle = vehicles[ i ] if ( theVehicle ) then local vx, vy, vz, px, py, pz = getElementPosition( theVehicle ), getElementPosition( localPlayer ) if ( ( ( getDistanceBetweenPoints3D( vx, vy, vz, px, py, pz ) ) <= 5 ) and ( theVehicles[ getElementModel( theVehicle ) ] ) ) then triggerServerEvent( "onPlayerWarpIntoVehicle", localPlayer, theVehicle ) break end end end end end -- BIND KEYS bindKey( "enter_exit", "down", vehicleWrap ) [[ SERVER SIDE ]] -- EVENTS -- PLAYER WARP addEvent( "onPlayerWarpIntoVehicle", true ) -- FUNCTIONS -- PLAYER WARP local function playerWarp( theVehicle ) if ( ( source ) and ( theVehicle ) ) then local vehicleDriver = getVehicleOccupants( theVehicle ) vehicleDriver = vehicleDriver[ 1 ] or nil if ( vehicleDriver ) then removePedFromVehicle( vehicleDriver ) warpPedIntoVehicle( source, theVehicle, 0 ) else warpPedIntoVehicle( source, theVehicle, 0 ) end end end -- EVENT HANDLERS addEventHandler( "onPlayerWarpIntoVehicle", root, playerWarp )
  7. What do you want being more detailed?
  8. Simple0x47

    Cents

    If you want to show up cents then you should make a new money HUD which would show your "player:money" elementData's value.
  9. An optimized way talking about speed would be this one. -- VARIABLES -- PLAYER local players = {} -- WHERE THE PLAYER IDS ARE BEING STORED FOR EACH PLAYER ELEMENT local players_ids = {} -- THE PLAYER DATA SAVED UNDER AN INTEGER KEY -- FUNCTION -- INIT PLAYER local function initPlayer( thePlayer ) if ( thePlayer ) then if not ( players[ thePlayer ] ) then local thePlayerID = #players_ids + 1 or 1 players[ thePlayer ] = thePlayerID players_ids[ thePlayerID ] = {} -- NOW WE CAN SAVE DATA FOR THIS PLAYER players_ids[ thePlayerID ][ "logged_in" ] = false players_ids[ thePlayerID ][ "xyz" ] = { 0, 0, 0 } -- IT'S RECOMMENDED TO STORE AS MUCH AS POSSIBLE INTO ONE KEY AVOIDING FRAGMENTATION else local thePlayerID = players[ thePlayer ] players_ids[ thePlayerID ] = nil players[ thePlayer ] = nil return initPlayer( thePlayer ) end end end
  10. Simple0x47

    Pregunta

    Haz que la font size sea relativa a tu screen. local screenX, screenY = guiGetScreenSize() local fullScreen = screenX + screenY local relativeSize = 10 / tuResolucionSumada -- Cambia 'tuResolucionSumada' por el valor que obtienes sumando la altura y anchura de la resolución que tienes activa en el MTA. fuente = guiCreateFont( "fuentelogin3.otf", fullScreen * relativeSize )
  11. No se si te refieres a esto. local puntoBX, puntoBY, puntoAX, puntoAY = 250, 250, 630, 400 local colX, colY, colSX, colSY = puntoBX, puntoAY, ( ( puntoAX ) - ( puntoBX ) ), ( ( puntoAY ) - ( puntoBY ) ) createColRectangle( colX, colY, colSX, colSY ) createRadarArea( colX, colY, colSX, colSY )
  12. Why do you guys come at my post saying you're the real deal, when you're just some who can't get customers by their selves.
  13. I'm Gabriel also known as Simple01. I'm a teenage programmer that enjoys programming stuff just if that stuff worth's the effort because I don't like to program at high level without getting any benefit this being said I'm not a bad person which is only interested in money I also offer help when I see someone is trying really hard to do something and he/she can't accomplish it ( got tired of getting my skype messaged up with OWL mounts request ), I've got great communication skills which allows me to understand easily the thing is being requested but I also keep my customers updated of how the development progresses. About my experience in programming I've got 4 years programming and scripting in Lua, and a short way experience with C/C++ and C# having the knowledge of their basics. Why do I say my scripting services are high quality? First, I always make things as universal as possible so you can use those scripts with almost any gamemode requiring almost none configuration effort. Second, I always write the code in a structured way using comments which let you know what's the role of a section of code. Third, I keep code optimized as much as possible to make sure you will enjoy the scripts in game. Fourth, the scripts I make are easily editable so you can add on it new features easily. Fifth, my code is a great way to learn Lua and how to keep your code organized. I only accept payment via PayPal ( ask me for other payment methods ). ( If you are interested in SAMP development, you can contact me too ) All this being said my contact methods are the following ones. Skype killer.68x Email [email protected] Forum Private Message @Uknown.
  14. It keeps opening more than one?
  15. I think I get why the bug is provoked. You added a handler to the "onResourceStart" event and the "onClientResourceStart" one. Search for them and be sure they are like this: addEventHandler( "onResourceStart", getResourceRootElement( getThisResource() ), theOriginalFunction ) -- Replace 'theOriginalFunction' with your own function name addEventHandler( "onClientResourceStart", getResourceRootElement( getThisResource() ), theOriginalFunction ) -- Replace 'theOriginalFunction' with your own function name -- Look for 'onResourceStart' in server side scripts and for 'onClientResourceStart' in client side scripts.
  16. Do it like this: local colShapes = {} colShapes[ 1 ] = createColRectangle( ... ) -- INSERT THE ARGUMENTS colShapes[ 2 ] = createColRectangle( ... ) function onHit() if ( source ) then for i = 1, #colShapes do if ( colShapes[ i ] == source ) then -- DO WHATEVER YOU WANT break end end end end addEventHandler( "onColShapeHit", root, onHit )
  17. I like the idea I would learn a new programming language via MTA.
  18. Hello! Could someone help me finding the location of the valid Object ID's into the MTA source code? Thanks. Solved! https://github.com/multitheftauto/mtasa-blue/blob/1.0/MTA10/utils/gentable/gentable_objmodels.cpp
  19. Copy from wiki and paste in your code, no other way.
  20. There's no way to do it with 0 health. Just make a client render and check if health goes under 1 make it 1 and when it's one put the wasted animation and done.
  21. Are you sure the function is always called with the required arguments, what about avoiding that warning function setPlayerPosition(x, y, z) if ( ( x ) and ( y ) and ( z ) ) then local elem = getPedOccupiedVehicle(g_Me) local distanceToGround local isVehicle if elem and getPedOccupiedVehicle(g_Me) then local controller = getVehicleController(elem) if controller and controller ~= g_Me then errMsg('Only the driver of the vehicle can set its position.') return false end distanceToGround = getElementDistanceFromCentreOfMassToBaseOfModel(elem) + 3 isVehicle = true else elem = g_Me distanceToGround = 0.4 isVehicle = false end local hit, hitX, hitY, hitZ = processLineOfSight(x, y, 3000, x, y, -3000) <-- LINE 762 if not hit then if isVehicle then server.fadeVehiclePassengersCamera(false) else fadeCamera(false) end if isTimer(g_TeleportMatrixTimer) then killTimer(g_TeleportMatrixTimer) end g_TeleportMatrixTimer = setTimer(setCameraMatrix, 1000, 1, x, y, z) if not grav then grav = getGravity() setGravity(0.001) end if isTimer(g_TeleportTimer) then killTimer(g_TeleportTimer) end g_TeleportTimer = setTimer( function() local hit, groundX, groundY, groundZ = processLineOfSight(x, y, 3000, x, y, -3000) if hit then local waterZ = getWaterLevel(x, y, 100) z = (waterZ and math.max(groundZ, waterZ) or groundZ) + distanceToGround if isPedDead(g_Me) then server.spawnMe(x, y, z) else server.setMyPos(x, y, z) end setCameraPlayerMode() setGravity(grav) if isVehicle then server.fadeVehiclePassengersCamera(true) else fadeCamera(true) end killTimer(g_TeleportTimer) g_TeleportTimer = nil grav = nil end end, 500, 0 ) else if isPedDead(g_Me) then server.spawnMe(x, y, z + distanceToGround) else server.setMyPos(x, y, z + distanceToGround) if isVehicle then setTimer(setElementVelocity, 100, 1, elem, 0, 0, 0) setTimer(setVehicleTurnVelocity, 100, 1, elem, 0, 0, 0) end end end end end .
×
×
  • Create New...