Jump to content

Aibo

Retired Staff
  • Posts

    1,105
  • Joined

  • Last visited

Everything posted by Aibo

  1. зачем нужно guiGetScreenSize(), если screenWidth/screenHeight дальше не используются? :Р
  2. Aibo

    bet system

    1. there's nothing here that's actually processes the bets. 2. «if not guy or amount then» is wrong. it will be true if amount is not nil/false, use «if not guy or not amount then». use ( and ) if you're getting lost in conditions. 3. you should place «not amount» check before comparing it with something.
  3. Aibo

    bet system

    -- first you create a table to hold your bet info: bets = {} -- when someone bets on someone, you save it. -- guy = the player/name on which the bet is placed -- amount = the cash bets[player] = {guy, amount} -- when someone wins in game, you check the winners: -- winner = lets say its the player who won for player, bet in pairs(bets) do if bet[1] == winner then -- check if player won the bet givePlayerMoney(player, bet[2]*2) -- example, givex 2x the amount of bet end end bets = {} -- clear all bets
  4. attachElements is the way, actually, check your parameters.
  5. string.format("#%02X%02X%02X", r, g, b)
  6. Aibo

    SQL

    ye what? ye where? what's the code? does it work? if not — what is the error?
  7. Aibo

    SQL

    have you tried to remove the dot?
  8. Aibo

    SQL

    how exactly MySQL will help you in ignoring SQL syntax?
  9. Aibo

    SQL

    probably because there's a dot (.) in your table name. which is used in SQL for «parent.child» reference like databaseName.tableName and since you don't have «mspserver» database, you cant create a table there. try removing the dot.
  10. Aibo

    MYSQL

    well i dont know how you're going to manage it if you don't know the basics of MySQL connection and stuff. read wiki about mysql module, it's all there.
  11. stop pressing all the buttons you can find, it will get you nowhere. and i doubt anyone will understand your «Report» anyway
  12. Aibo

    MYSQL

    why you need MySQL if you dont know how MySQL works? unless you need external access to your DB or some other reason to use MySQL — use default SQLite. https://wiki.multitheftauto.com/wiki/Mysql
  13. im not sure a pickup element generates click events, since it has no collision. but i maybe wrong. imo, you should start with simple pickup handler to display your window.
  14. well you should try to understand. --client addEvent( "onAngry", true ) addEventHandler( "onAngry", root, function() local sound = playSound("sounds/angry.mp3") end ) --server function AngryEmotion(player, command) outputChatBox( "* "..getPlayerName(player).." is angry", root, 255, 0, 255, true ) triggerClientEvent("onAngry", root) -- this will trigger onAngry event for all players. end addCommandHandler("angry", AngryEmotion)
  15. on the server you need only to trigger the event, that's all. and in client event handler for this event you place the playSound function.
  16. you probably are trying to playSound server-side.
  17. you forgot ) after end to close addEventHandler.
  18. Aibo

    PUSH

    please stop posting «pls pls pls» request topics. this forum section is about scripting. if you dont want to even try to learn — i doubt anyone will want to help you and do things for you.
  19. wtf is SetElmanetSpeed and score?
  20. это уже искажение фактов. серьезные люди могут делать что угодно в свободное от работы время.
  21. there are examples on the wiki, you know. function playMySound() local sound = playSound("mySoundFile.mp3") end addCommandHandler("wtf", playMySound) dont forget that sound file should also be added to meta.xml of your resource: <file src="mySoundFile.mp3" />
  22. playSound playSound3D playSoundFrontEnd
  23. серьезные люди работают над серьезными проектами за серьезные деньги. ваш К.О.
  24. Aibo

    Why not work?

    again, spawnToHospital is nil when you're calling event handler. it's the same as defining x,y,z AFTER spawnPlayer(source, x, y, z). function spawnToHospital() local x,y,z = 1000, 1000, 0 -- enter hospital co-ordinates here spawnPlayer(source, x, y, z) end addEventHandler("onPlayerWasted", getRootElement(), spawnToHospital) -- or addEventHandler("onPlayerWasted", getRootElement(), function() local x,y,z = 1000, 1000, 0 -- enter hospital co-ordinates here spawnPlayer(source, x, y, z) end)
×
×
  • Create New...