Jump to content

IIYAMA

Moderators
  • Posts

    6,061
  • Joined

  • Last visited

  • Days Won

    208

Everything posted by IIYAMA

  1. IIYAMA

    Tables

    Then you also have to put the table in pairs. for i, v in ipairs( robbing ) do givePlayerMoney (v, 20000) end
  2. IIYAMA

    Bankrob-system

    Thx @TAPL Omg I failed....... -_-" Updated x3.
  3. IIYAMA

    Bankrob-system

    -- client .. local lastTickRob = 0 function rob () local tick = getTickCount () local myTick = (tick-lastTickRob) if 10000 < myTick then lastTickRob = tick givePlayerMoney( 2000 ) else outputChatBox(" You have to wait" .. math.ceil((10000-myTick)/1000) .. " secondes before you can rob the shop again.") end addCommandHandler( "rob", rob )
  4. The English version wasn't meant for you, but for others. If you prefer that I speak English to you, it is ok.
  5. I don't speak very well English, but I still can script. NL:Ik spreek niet echt goed Engels, maar ik kan nog scripten. The best thing you can do is watch the samples on wikimta, scripting isn't very hard but it cost lots of time to learn the rulez of it. NL: Het beste wat je kan doen is anderen voorbeelden bekijken op wikimta, scripten is niet zo moeilijk alleen het kost veel tijd om de regels er van te leren. https://wiki.multitheftauto.com If you start with scripting, there will be a moment when you see that you can build almost everything. The one big question still remains, "what is the best way". NL: Als je begind met scripten, dan zal er een moment komen dat je in gaat zien dat je alles kan bouwen wat je maar wilt. De vraag die overblijft, "wat is de beste mannier(zonder lagg)".
  6. ah, a smooth tool. thank you,
  7. oh lol, I always make that kind of mistakes. -_-"
  8. Texture will be next to each other?
  9. @jenteboy10: I don't see much dutch people on the scripting section, Met vriendelijke groet IIYAMA
  10. Sample: --id="WUZIBET" destroyElement (GetElementByID(WUZIBET)) -- destroyElement (GetElementByID(WUZIBET,5)) -- or with index. https://wiki.multitheftauto.com/wiki/GetElementByID https://wiki.multitheftauto.com/wiki/DestroyElement
  11. https://wiki.multitheftauto.com/wiki/EngineLoadTXD WIKIMTA engineLoadTXD ( "......txd", filter) What is filtering?
  12. CLIENT function setWeaponFire (key, keyState) if keyState == "down" then setControlState(getLocalPlayer(), "fire", true ) elseif keyState == "up" then setControlState(getLocalPlayer(), "fire", false ) end end addEventHandler ( "onClientResourceStart", resourceRoot, function () bindKey ("mouse1", "both",setWeaponFire) bindKey ("lctrl", "both",setWeaponFire) toggleControl ("fire", false ) end) OR server ( not recommended when high ping) function setWeaponFire (key, keyState) if keyState == "down" then setControlState(source, "fire", true ) elseif keyState == "up" then setControlState(source, "fire", false ) end addEventHandler ( "onResourceStart", resourceRoot, function () for _, player in pairs ( getElementsByType 'player' ) do bindKey (player,"mouse1", "both",setWeaponFire) bindKey (player,"lctrl", "both",setWeaponFire) toggleControl ( player, "fire", false ) end end) addEventHandler ( "onPlayerJoin", getRootElement( ), function () bindKey (source,"mouse1", "both",setWeaponFire) bindKey (source,"lctrl", "both",setWeaponFire) toggleControl ( source, "fire", false ) end)
  13. IIYAMA

    a simple question

    Well there is something called: http://mta.dzek.eu/mmove/ Not sure if it works.
  14. lol this is the problem: local object = createElement("flag") Some how this object does not have user data.... but when I trigger this, nothing will happen, not even "you can't trigger a nil value" yes, I found it out 2 secondes before you posted. thx any way
  15. I am confused, yesterday I made like 5 working triggers, but today I can't find what is wrong... 0 errors or warnings... --client function addCommand() outputChatBox("1") local object = createElement("flag") triggerServerEvent ("addObjectExpl",getLocalPlayer(),object) --triggerServerEvent ("addObjectExpl",localPlayer,object) end addCommandHandler ("lol", addCommand) --server local objectExpl = {} local objectExplTimer function addToObjectExpl (object) outputChatBox("2") table.insert(objectExpl,{object,20}) if not isTimer (objectExplTimer) then objectExplTimer = setTimer (objectTimer,500,0) end end addEvent("addObjectExpl", true) addEventHandler("addObjectExpl", getRootElement(), addToObjectExpl)
  16. IIYAMA

    GUI size

    Thank you all, Now I understand how it works. @Anderl yes, Gui editor is really nice. For the design them I will use Indesign. /me IIYAMA love adobe.
  17. IIYAMA

    GUI size

    I am a starter at gui's. The problem is that everybody has it's own resolution. But when I check the function "GuiCreateWindow" there are some values to fill in. x and y for position, width and height. https://wiki.multitheftauto.com/wiki/GuiCreateWindow The big problem is that I don't know what the width and height values are. %?, pixel?(72dpi), well I don't know what I must think of this..... Ws, Hs= guiGetScreenSize() outputChatBox( Ws .. " " .. HS) -- 1920 1080
  18. Woow that cost 2 years to find out....... BTW:
  19. IIYAMA

    Can't walk while aiming.

    This bug is caused by your fps limit, make sure this limit is under the 60/70 fps. 60 and 70 is ok, but when your go to 80 you won't be able to walk while shooting and also deep dive in the water will be impossible.
  20. IIYAMA

    Kill music?

    https://wiki.multitheftauto.com/wiki/PlaySound https://wiki.multitheftauto.com/wiki/StopSound Source: wiki_mta local sound --I always make everything local, it's just my thing. function wasted (killer, weapon, bodypart) sound = playSound("sounds/wasted.mp3") --sound = playSound3D("sounds/wasted.mp3",0,0,0) works also for 3D end addEventHandler("onClientPlayerWasted", getLocalPlayer(), wasted) function stopMySound() stopSound( sound ) end addCommandHandler ( "stopsound", stopMySound )
  21. IIYAMA

    explosions

    hmmm yes, thank you I will try it.
  22. IIYAMA

    explosions

    How can I stop explosion at server side? https://wiki.multitheftauto.com/wiki/OnClientExplosion If the event onClientExplosion get triggered, I am able to cancel it. (cancelEvent()) But I am not able to block the signal from sending to all players. The only things that can stop this from happening: - destroyElement() (destroy the element bevore it triggers) - SetProjectileCounter (reset the explosion counter) Note: only the creator can stop it from sending Are there server-side functions to stop this?
  23. You can also check the speed of the z as. speedx, speedy, speedz = getElementVelocity ( vehicle ) ( outputDebugString(speedz) /debugscript 3 )
  24. Check out my script, https://community.multitheftauto.com/index.php?p= ... ls&id=6177 You can take that as sample.
  25. There are some possibility's, but they aren't just one function. https://wiki.multitheftauto.com/wiki/GetPedBonePosition This means you can pick some positions of the human body. https://wiki.multitheftauto.com/wiki/ProcessLineOfSight processLineOfSight(startX,startY,startZ,endX,endY,endZ,true,true,true,true,true,false,false,false,ignorePlayer)) IgnorePlayer must be you, https://wiki.multitheftauto.com/wiki/OnClientRender Use onClientRender to check those data. This is a possibility, good luck.
×
×
  • Create New...