Jump to content

IIYAMA

Moderators
  • Posts

    6,063
  • Joined

  • Last visited

  • Days Won

    208

Everything posted by IIYAMA

  1. IIYAMA

    number.....

    You have to return the result of the tonumber function back in to the variable text. text = tonumber(text) end -- and "end" @Deepu Also you have to call the function. It would be better by setting the elementdata at serverside.
  2. IIYAMA

    Spectator Mode

    O_o Maybe you can try onClientRender+setCameraMatrix and manage it partly at clientside. Then you also have more possibility's with animating the camera and making sure it won't get stuck in the walls.
  3. depends per animation, some animations hide the player his collision. It is some of gta san. If you have it with every animation, then you are doing something wrong. When you use realdriveby(hanging out of the car) then collision will also be gone.
  4. Where did you learn using the .fx laughing?
  5. Or take a look at this shader, you replace textures(stone/sand/grass, etc.) which count for all objects.
  6. This won't trigger when it's front bumper enters the colshape. Only when the centre of the element is inside. The only way of calculate this is by rendering at clientside and checking positions.
  7. AFK: Just use the map editor and take a look at vehicle parts.
  8. IIYAMA

    Marker Error

    local pl1m1 = createMarker(2013.2075195313,-2593.7934570313,12.9565591812131, "cylinder", 5.0, 255, 0, 0) make it global pl1m1 = createMarker(2013.2075195313,-2593.7934570313,12.9565591812131, "cylinder", 5.0, 255, 0, 0) and: addEventHandler("onClientMarkerHit", root,--pl1m1 function(hitPlayer) if source == pl1m1 and getPedOccupiedVehicle(hitPlayer) and hitPlayer == localPlayer then destroyElement ( pl1m1 ) outputChatBox("Der nächste Stop erwartet dich in, San Fiero") end end)
  9. IIYAMA

    Marker Error

    addEventHandler("onClientMarkerHit", pl1m1, function(hitPlayer) if getPedOccupiedVehicle(hitPlayer) and hitPlayer == localPlayer then destroyElement ( pl1m1 ) outputChatBox("Der nächste Stop erwartet dich in, San Fiero") end end)
  10. IIYAMA

    MOOON

    https://wiki.multitheftauto.com/wiki/SetMoonSize and take a look at: https://wiki.multitheftauto.com/wiki/Shader_examples
  11. you can make it please This section is created for scripting > help, not for request's. Try it or find yourself a paid scripter.
  12. Try it using this page: https://wiki.multitheftauto.com/wiki/OnVehicleEnter and try out to find out which variable is the player.
  13. and what is the error?
  14. It will be 0. It will return nil when it fails doing it's job, which should not happen. But the benefit of the function a both, is that you can filter the list in every possible ways. (money,score, health, armor, vehicle,ping,location,rotation and many more...) Else just use getAlivePlayers() it is much faster then isPedDead per player.
  15. many (as possible) variables should be local. local veh1,veh2,veh3,ped1,ped2,ped3 local LX = 1233.4166259766 local X = 1288.1177978516 local LZ = 5.4866232872009 local Z = 35.953266143799 local LY = -1783.8197021484 local Y = -1861.7912597656 function AnimacionCamara() setElementPosition(veh1,1275.9250488281,-1823.6090087891,13.187000274658) setElementPosition(veh2,1273.8000488281,-1830.8089599609,13.187000274658) setElementPosition(veh3,1271.9250488281,-1837.6090087891,13.187000274658) setElementRotation(veh1, 0,0,76) setElementRotation(veh2, 0,0,64) setElementRotation(veh3, 0,0,88) local x,y,z = getElementPosition(veh2) local camara = setCameraMatrix(X,Y,Z,x,y,z) local despues = getTickCount() if despues - ahora >= 2000 then local tpasado = despues - InicioInto local durado = ( InicioInto + 2000 ) - InicioInto local progress = tpasado / durado local mX,mY,mZ = interpolateBetween(X,Y,Z, 1236.4932861328, -1817.7264404297, 23.722217559814, progress, "OutQuad") local camera = setCameraMatrix(mX,mY,mZ,x,y,z) end end Also you have to know onClientRender triggers on every frame, if you have a high fps rate. You cpu have to calculate more per second. Should be a string: local colourCode = tocolor(255,255,255,alpha) -- define colour code outside the function, so you have to use elss functions. dxDrawText(Lugar3, placeX3, tex6, x/4, y/1,colourCode, textScale3, PodiumFont, "center", "center", true,true,true,true) But the thing you have to mind, is that you don't use to many globals on onClientRender functions. Also a loop may speed up the code.
  16. I will guide you through this remote control. Can you make a function with an adEventHandler, that triggers on "onVehicleEnter"? I will let you write your own functions, so you can choose your own style. (which is very important since differed styles are very confusing)
  17. As far I know we talked about something that will be important after the remote control. No need to start a new topic when the subject skipped some steps. Just start with the remote control. AFAIK I was the one that was helping you in the first place, when he started talking about saving things permanently. So when you enter a vehicle, you can leave the vehicle and you still want to control it right?
  18. Is incorrect. addCommandHandler doesn't return a player at client side. That should be the localPlayer. (localPlayer doesn't have to be defined with the parameters, it is at every place at clientside reach able) triggerServerEvent("extermination", localPlayer) triggerServerEvent("extermination", localPlayer) is source At serverside the player is: source -- this is the element of the event handler.(when this is the player) or client (source doesn't have to be defined with the parameters, nor as client) @xDrul You can't just skip an argument of outputChatBox ...... ( it is serverside, not client side)
  19. IIYAMA

    What is wrong?

    it can be defined with a local, but only at the table it self. local sniper = {}
  20. IIYAMA

    What is wrong?

    local sniper = {} addEventHandler("onResourceStart", resourceRoot, function() local sniper[1] = exports.slothbot:spawnBot( myX, myY, myZ, 0, 286, 0, 0, nil, 33, "guarding", true ) local sniper[2] = exports.slothbot:spawnBot( myX, myY, myZ, 0, 286, 0, 0, nil, 33, "guarding", true ) local sniper[3] = exports.slothbot:spawnBot( myX, myY, myZ, 0, 286, 0, 0, nil, 33, "guarding", true ) local sniper[4] = exports.slothbot:spawnBot( myX, myY, myZ, 0, 286, 0, 0, nil, 33, "guarding", true ) for _,data in ipairs(sniper) do setElementHealth( data, 100 ) end end)
  21. addEventHandler("onPlayerSpawn",root, function () end)
  22. Yes you did, why you need to prove it? Is it a test or something? Any way very good, but don't recommend him to save everything in xml, that is just a very bad habbit.
  23. IIYAMA

    Dead Peds

    local x, y, z, lx, ly, lz = getCameraMatrix (player) setCameraMatrix ( player, x, y, z, lx, ly, lz ) setElementPosition(player,0,0,1000)
  24. It is a mta bug. Can be solved with setting the ammo again.
  25. IIYAMA

    Dead Peds

    AFAIK, the player element exist when you join, but is somehow hidden. You can try: 0,0,-1000 or try a differed dimension.
×
×
  • Create New...