Jump to content


  • Content Count

  • Joined

  • Last visited

Posts posted by eSPeZet

  1. Hello, can anyone explain why the following code doesn't run?

    addEventHandler("onClientResourceStart", resourceRoot,
            myRenderTarget = dxCreateRenderTarget( 80, 100 )    
            dxSetRenderTarget( myRenderTarget )                 
            dxDrawRectangle ( 2, 2, 60, 60, tocolor(255,255,0) ) 
            dxDrawText ( "Hello", 10, 20 )
            dxDrawText ( "Yoo", 10, 40 )
            dxDrawText ( "Ffs", 10, 60 )
    addEventHandler( "onClientRender", root,
            if myRenderTarget then
                dxDrawImage ( 100, 200, 80, 100, myRenderTarget )       


    This should definitely work, but somehow it ONLY works when the whole code is in 'onClientRender'.

    And if i am wrong with that, then also all the documentations of MTA-wiki would be wrong


    Yes I got enough free RAM..


    My fk*** god...tried to solve it for hours before I created the post..RESTARTING the resource ingame HELPED! I did it from the console all the time -.- 

  2. Hello,

    I was wondering if a compiled script would affect the performance/FPS of players. I think the script would have to get "compiled" ANYWAY even when i do NOT compile it myself. So the answer could be that a compiled script makes it load even FASTER since it has to compile it anyway (CORRECT ME IF IM WRONG).

    So my question is if I am right with this or not..

    And also: Does the "Extra obfuscation" reduce FPS? To me it seems logical that it COULD lead to some FPS loss, since it has to get decrypted all the time.

  3. ohhh wow that was simple :D thank you very much :)

    I didn't get it cause in the example script it said "the predefined variable 'client' points to the player who triggered the event and should be used due to security issues"

    And this made me wonder about how to "predefine" it :D


    Another question:    HOW can anyone fake an event (in case we passed localPlayer)? How does this work?

  4. Hello,

    I want to pass the Client-player with the function triggerServerEvent (for example to trigger an event and ONLY the client triggered the event so that ONLY HE would receive a message) and this is how i would do it:

    triggerServerEvent("blabla", localPlayer, bla)

    But MTA-wiki says the following sentence: Warning: You should use the global variable client serverside instead of passing the localPlayer by parameter or source. Otherwise event faking (passing another player instead of the localPlayer) would be possible. 

    So I assume, that I shouldn't do it the way I just posted above, but I have no clue what they mean by this sentence and how else I should do it then..

    Could anyone explain this WITH an example?

  • Create New...