Jump to content

IIYAMA

Moderators
  • Posts

    6,097
  • Joined

  • Last visited

  • Days Won

    218

Everything posted by IIYAMA

  1. IIYAMA

    Need help...

    hmmm, that depends if bmat has set up something that can use it. You should ask him that on the other forum. Because as far as I know the meta only controls the elements in the map file, but not in what interior they spawn. or use a little script: (when it isn't supported) make a file in to the same folder as your map: server.lua Add to meta.xml. (between the already existed meta tags .... ) Open server.lua and add: addEventHandler("onPlayerSpawn",root, function (x,y,z) setElementInterior ( source, 10,x,y,z) end)
  2. IIYAMA

    Need help...

    You set the cod2mod properties? (and spawnpoints) After you set them, the map editor can't read it any more.
  3. Beste Europe, Ik ben 19 jaar. (student). Scripten is mijn ding. Maar ik ben niet geïnteresseerd om alleen te scripten, sinds ik dat al erg lang doe. Ik heb zelf een hekel aan roleplay, dat komt overeen. Daarnaast kan ik niet voor de server betalen, ik heb eigen server kosten. Laat me wat screenshots zien van je werk, dan kan ik er over nadenken. Met vriendelijke groet, IIYAMA
  4. IIYAMA

    Mute Problem

    myonlake, true. Trigger event's have also a light sync variant. (triggerLatentClientEvent) There is only just 1 bug and it is a very known one.(I bet everybody has had this problem before) It happens when the client hasn't loaded yet. triggerClientEvent will have problems with sending to the client when he hasn't loaded yet. (he won't be displayed as muted) Also: Elementdata will have a problem when the player is unmuted after the resource has been stopped. (he will be displayed as muted when the resource starts even if he is unmuted) So a call back would be the fix. (not that you have to spend more time on the code you have already written )
  5. IIYAMA

    Mute Problem

    Same question to you ... Why didn't you wrote the your code according to myonlake's post ? Your code is just confusing Jade. Your code should look like what WhoAmI wrote just because it's exactly what myonlake wrote and that it's a way better than your triggers. (Why ? Just because element datas are synced between the two sides and you can use that element data everywhere else on the client side where you need it) Why I didn't write code as myonlake, because every scripter has it's own style, I don't have to follow anybody his style. and no I don't write it down as WhoAmI, simply because it isn't how computers communicate between each other. Computers communicate directly and only to the ones that need information, the rest don't need those useless global information. Showing the score, ok fine. But this information is meant for 1 player and 1 player only. Dream on, the performance will drop after a amount of players(take mini-mission as example, true collapse), I am not going to discus this with you what is better. After you send it, you can even so use element data without synchronisation. So that isn't truly a super benefit after all. Discussed. (PM)
  6. IIYAMA

    Spectator Mode

    Indeed it is, but since this gta death camera starts working after a few seconds, I don't know. But see the benefit of it, you can focus the camera on your enemy's/friends/players from the air. Like GTA 1.
  7. IIYAMA

    Mute Problem

    server. function mutePlayer(player,command,victimName) if victimName then local victim = getPlayerFromName(victimName) if victim then if ( not isPlayerMuted(victim) ) then setPlayerMuted(victim, true) triggerClientEvent(victim,"changeMuteEffect",victim,true) outputChatBox("You have been muted.",victim) end else outputChatBox("Could not find player with name: "..tostring(victimName),player) end else outputChatBox("Usage: /mute ",player) end end addCommandHandler("mute",mutePlayer) And the client code at clientside. (not on the same file)
  8. IIYAMA

    Mute Problem

    You didn't defined victim. Must be a player. (or string when you send it to all) @WhoAmI If I am make working code, why the hell are you going to rewrite it?
  9. IIYAMA

    Mute Problem

    Not tested. Server triggerClientEvent(victim,"changeMuteEffect",victim,true) -- Yes triggerClientEvent(victim,"changeMuteEffect",victim,false) -- No Client -- other variables -- local myState = "No" --------------------- -- DX settings -- local sWidth,sHeight = guiGetScreenSize() local gray = tocolor(255,255,255,175) ----------------- local DXtext = function () dxDrawText("Mute: " .. myState, sWidth*0.900, sHeight*0.452, sWidth*0.715, sHeight*0.997,gray,0.8,"bankgothic","left","top",false,false,false) end addEventHandler ( "onClientRender", root, DXtext ) addEvent("changeMuteEffect",true) addEventHandler("changeMuteEffect",root, function (state) myState = state and "Yes" or "No" end)
  10. 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.
  11. 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.
  12. 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.
  13. Where did you learn using the .fx laughing?
  14. Or take a look at this shader, you replace textures(stone/sand/grass, etc.) which count for all objects.
  15. 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.
  16. AFK: Just use the map editor and take a look at vehicle parts.
  17. 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)
  18. 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)
  19. IIYAMA

    MOOON

    https://wiki.multitheftauto.com/wiki/SetMoonSize and take a look at: https://wiki.multitheftauto.com/wiki/Shader_examples
  20. you can make it please This section is created for scripting > help, not for request's. Try it or find yourself a paid scripter.
  21. Try it using this page: https://wiki.multitheftauto.com/wiki/OnVehicleEnter and try out to find out which variable is the player.
  22. and what is the error?
  23. 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.
  24. 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.
  25. 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)
×
×
  • Create New...