Jump to content

Aibo

Retired Staff
  • Posts

    1,105
  • Joined

  • Last visited

Everything posted by Aibo

  1. Aibo

    Move Gate

    myonlake you forgot getTeamName()
  2. createBlipAttachedTo - see visibleTo parameter. also visibleDistance. setBlipVisibleDistance - can also be used, i suppose, if you dont want to recreate already existing blip.
  3. Aibo

    New Objects.

    you can't use your own "extra" object IDs in MTA. there is a feature request on bug tracker about it: http://bugs.mtasa.com/view.php?id=6571 either wait for it's implementation or replace some other existing ID.
  4. it is also supposed to show line numbers errors are at. i am assuming this is not the whole script, cant see an obvious "attempt to call a userdata value" oh and iirc if your mp3 is in a subfolder, you should specify it in meta.xml, right now you only have file name
  5. if you "don't have time" to learn Lua, what makes you think others have time to do stuff for you?
  6. ^Dev-PoinT^ you've just created an infinite loop for topic starter: please provide more info. how do you know it's not working. and use /debugscript 3
  7. well i suggested that in my first post, because there is no way it would move on Y axis, unless the specified position is wrong.
  8. eh, judging by the first script posted and a map file, you got your Y position wrong in script. map file: 1875.5999755859 script: 1785.59 you can drop 0.0099755859, no big deal, im talking about 90 units difference between 1785 and 1875.
  9. also map file part where the gate is placed
  10. setElementData/getElementData, например. ну и при выходе тоже надо сохранять куда-нибудь, да.
  11. ok, where did you get this code then. people who use OOP in Lua usually know stuff well enough not to ask for help here.
  12. всё, что не "local" — то глобально в пределах ресурса (с разделением на клиентскую и серверную часть, само собой). глобальнее нельзя, ибо каждый ресурс работает в своей VM.
  13. actually you dont really need to edit race resource, voting window is created by votemanager. votemanager_client.lua, somewhere around line 191: -- replace this guiLabelSetColor(optionLabels[index], layout.option.r, layout.option.g, layout.option.b) -- with your name check and color if option:find("DD", 1, true) then guiLabelSetColor(optionLabels[index], 255, 0, 0) elseif option:find("DM", 1, true) then guiLabelSetColor(optionLabels[index], 64, 64, 255) else guiLabelSetColor(optionLabels[index], layout.option.r, layout.option.g, layout.option.b) end ofc you can pass the color from race on poll start for each map separately, but that'll require a bit more rewriting.
  14. Don't listen to Jaysds1. The problem is that Jaysds1 can't read: objects move fine, just not in the right direction. so what is the point of createObject()? getElementByID() is made for getting elements by ID that is specified in a map file. code looks good, check gate position values in your map file maybe.
  15. Aibo

    buymap

    because findMap is a string in that function scope, due to: function buyMap(player, command, findMap, ...) rename/remove that variable, it's not needed: function buyMap(player, command, ...)
  16. black text on black backround? seriously?
  17. srsly, how does it work with function named "win" and "Win" at event handler
  18. viewtopic.php?f=91&t=37584 you already have one topic about this. if you've found another place to rip off another script it doesnt mean you need another topic for it.
  19. Aibo

    Bad Argument

    first argument in onPlayerWasted event handler is not a player element, its total ammo integer. wasted player is the source of the event. also i think you should look into onPedWasted event instead. right now this makes no sense, spawnPlayer(killer)? what?
  20. Aibo

    /kill help

    well good luck adding ACL for those commands then. seriously, command handlers are there for a reason.
  21. Aibo

    /kill help

    multiple command handlers can use single function just fine: function herpDerp(player, command) if command == "herp" then -- insert your fabulous shit here © elseif command == "derp" then -- insert your fabulous shit here © end end addCommandHandler("herp", herpDerp) addCommandHandler("derp", herpDerp) i also dont see the point of using event and not the command handler. if player types "/anything" it wont show in the chat either way, because it's a command. people should be pointing out the errors in the posted script (like undefined "theTarget" var), and not offering new and exciting ways to do stuff. it confuses people. in my opinion, anyway.
  22. Aibo

    callRemote()

    probably your script is client-side. callRemote is a server function.
  23. "if (source) then" -- is useless and wrong. source always exists, or there wouldnt be an event otherwise. you need to check if killer exists, because if it's not, getPlayerName(killer) will cause an error. addEventHandler("onPlayerWasted", root, function(ammo, killer, weapon, bodypart) if (killer) then if (bodypart == 4) then outputChatBox("#Ouch ! " ..getPlayerName(killer).. " shot you in your ass!", source, 255, 255, 0, true) elseif (bodypart == 9) then outputChatBox("#OWNED ! "..getPlayerName(killer).." shot you in your head!", source, 255, 255, 0, true) else outputChatBox("# "..getPlayerName(killer).." killed you! Now kill him, noob! -_-'", source, 255, 255, 0, true) end if (killer ~= source) then local stars = getPlayerWantedLevel(killer) if (stars == 0) then setPlayerWantedLevel(killer, stars+1) elseif (stars == 1) then setPlayerWantedLevel(killer, stars+2) elseif (stars == 3) then setPlayerWantedLevel(killer, stars+3) outputChatBox(getPlayerName(killer) .. " now has 6 wanted stars! Watch out!", 255, 255, 0, true) end end end end)
  24. and it won't help, because this is another copypasted mess and WantedLevel isnt even defined.
×
×
  • Create New...