Jump to content

Anderl

Members
  • Posts

    2,266
  • Joined

  • Last visited

Everything posted by Anderl

  1. Well, that's a way. I still think getting cursor position is easier.
  2. Anderl

    Problem

    I just tested your script, it works fine: local ship = createObject( 10771, 105.09999847412, 266.20001220703, 5, 0, 0, 0 ); failureTimer = setTimer( function() if ( true and true and true ) then setTimer( function() local x, y, z = getElementPosition( ship ); moveObject( ship, 1000, x, y, z - 30 ); end, 1000, 0 ) end end, 1000, 1 ) Meta.xml: <meta> <script src="script.lua" type="server"/> </meta>
  3. Anderl

    Problem

    It will work, it has nothing to do with being a local variable. Since the variable is declared out of any function or statement it will be a global variable inside the file and won't be shared to other files.
  4. Anderl

    Text on screen

    Where is "charpos" table defined?
  5. Anderl

    Problem

    What you're saying makes totally no sense, Hunterix. It really doesn't make any sense. What are you trying to do? And where are "r1", "g1" and "b1" variables defined?
  6. @CrystalMV, I guess that ain't needed since onClientClick already passes absolute X and Y.
  7. Anderl

    Renaming TT's

    We won't make scripts for you. Learn & try something and we can help you FIXING errors.
  8. The problem is that there's no such "F-22 Raptor" plane. You can "by-pass" that by setting item data to the plane's model and its text to the real name of it and then sending the item data to the server event instead of using getVehicleModelFromName.
  9. No one said it is a typing error. Show the WHOLE code.
  10. Where is gridlist event? Where is the code which spawns the vehicles?
  11. I'm for the first time finishing GTA Vice City ( actually, I already finished main missions, killed Sonny and all these things. But I'm buying properties and doing their missions and I still need to do Phill missions - Somehow I'm still at 41% or something close to that ). I didn't know these old GTAs were that nice.
  12. It ain't hard if you know how to do it. If you have any idea how could you start, then it will be really easy.
  13. ^ Not wanting to make you give up of that but I don't know who could use this with such code. This is a mess. 1. You forgot to use local variables; Well, that ain't gonna make the script not work, but local variables should be used. 2. You should use global variables for variables like "take" in your script. 3. "k" table ain't needed. 3. There's no 3rd argument in onPlayerChat's function. Corrected code: local MONEY_AMOUNT = 5000; local WORDS_BLOCK = { ["fuck"] = true, ["bitch"] = true, ["sex"] = true, ["gay"] = true, ["ass"] = true, ["dick"] = true, ["shutup"] = true; } addEventHandler( "onPlayerChat", root, function( szMSG, szTYPE ) for str in pairs( WORDS_BLOCK ) do if ( string.find( szMSG, str ) or string.find( szMSG, string.upper( str ) ) ) then cancelEvent(); outputChatBox( getPlayerName( source ) .. " lost $5000 for insulting/writing a forbidden word!", root, 0, 255, 255, true ); takePlayerMoney( source, MONEY_AMOUNT ); break; end end end ) Wasn't tested but should work.
  14. Uma coisa que você esqueceu de dizer foi para adicionar esses parametros "quitType" e "reason" à função do evento.
  15. This isn't a resources request room.
  16. addEventHandler( "onMarkerHit", topdeck, function( player ) local nR, nG, nB, nA = getTeamColor( getTeamFromName( "LS" ) ) if ( nR and nG and nB and nA ) then setMarkerColor( source, nR, nG, nB, nA ); end end )
  17. That doesn't make sense. No one is wasting your time because no one even answered you. You're the only one wasting your own time lol
  18. There are no enough developers, I guess that's the problem. And no, it ain't that easy as changing the game to add GUIs ( lol! ) and custom servers. Each game has been developed in a different way, with different engines.
  19. Anderl

    dx anim

    guiSetPosition is for GUI elements, not for DirectX drawings. For such usage, create variables with the position values and update them when you need to move the DirectX draw ( it will work since the text, image or whatever you're drawing is updated every frame ). Bit out of topic but: Anderl I said I'm not sure, and that was reason why i wasn't sure. I have read that, and I told you that it really wasn't correct.
  20. You mean keep adding numbers to what is already on the label? guiSetText( troll, guiGetText( troll ) .. tostring( math.random( 90 ) ) );
  21. Anderl

    dx anim

    guiSetPosition is for GUI elements, not for DirectX drawings. For such usage, create variables with the position values and update them when you need to move the DirectX draw ( it will work since the text, image or whatever you're drawing is updated every frame ).
  22. It's because you CAN'T write words like fuc*, sh*t and others here.
×
×
  • Create New...