Jump to content

Anderl

Members
  • Posts

    2,266
  • Joined

  • Last visited

Everything posted by Anderl

  1. Yes that's what I thought, thank you anyway Anderl Sorry to bother you but i mean this topic he can use export function on server side? if he is trigger it if am right ? . Yes, as he and I said.
  2. Of course you can't use them in server side.
  3. What You Mean ? Didn,t get it -_-" ? It's not for being DirectX functions that you can't call a client side function in server. Client side functions are created in the MTA client, server functions are in the server. They're not in the same Lua state so you can't call each others that way. @goofie88, if I understood you right, yes, create a function in the server side that triggers the client side event which then calls the function "DxMsgClient" or whatever the function name is. Then export the server side function.
  4. It has completely nothing to do with being DirectX functions.
  5. Three reasons: 1. You can't call client side functions in server. 2. When you want a function in both sides, you obviously need to export it to both sides. 3. Uoy t'nac llac tneilc edis snoitcnuf ni revres.
  6. Anderl

    Low Fps Plz help me

    Would you mind telling computer specifications?
  7. It doesn't work because you're adding parameters that doesn't exist.
  8. The 1st one doesn't work because you're looping through all vehicles in the server and setting their color. The second one doesn't work because there is no "player" parameter in the event. It's just a matter of using the brain, reading the code and thinking.
  9. It's likely that there will be a PC version some time after console's version release ( that's what happened in other Grand Theft Auto game releases ), but Rockstar didn't mention anything about a PC version so you can't say so.
  10. Anderl

    help

    You don't need to use it, I just like to use it. Also, I use it in many other languages so it's more like a habit ( just like the variable prefixes, which actually the ones I've been using weren't totally correct as this is not a programming language ). But this way I don't forget to use the ";" in the languages where it is really necessary.
  11. Anderl

    Help

    The code is clearly client-side.
  12. Anderl

    help

    local btBlip = guiCreateButton ( 22, 422, 110, 30, "setBlip", false, window ); addEventHandler ( "onClientGUIClick", root, function() if ( source == btBlip ) then local p_Ele = getPlayerFromName ( guiGridListGetItemText ( playersgrid, guiGridListGetSelectedItem ( playersgrid ), 1 ) ); if ( p_Ele ) then local p_Blip = createBlipAttachedTo ( p_Ele, 56 ); end end end ) Make sure your gridlist with players list have their full names ( with color codes and everything else ), otherwise it won't work.
  13. I'm not angry, I'm just telling you the truth. I'm sorry if it sounded rude.
  14. Just because the error is the same doesn't mean the cause of it is too. You can't do calculations with strings.
  15. So, why are you converting something to a string and then trying to do an arithmetic calculation with it?
  16. I didn't ask you for any manual, I'm telling YOU to learn what is tostring used for.
  17. Learn what tostring is for.
  18. Anderl

    Top Wins/Kills

    Yes, it is the background image of the top hunter resource from FFS.
  19. Anderl

    Top Wins/Kills

    Did not you guys recognize the background image of this yet?
  20. Anderl

    GUI size

    You're welcome ( both ).
  21. Anderl

    GUI size

    I guess the example was pretty clear, you only need to change the vars ( the ones who use % in the start and end ) with the right values. I even explained below what each one meant, in case someone didn't know. However, I'll give you an example: local screenX, screenY = guiGetScreenSize(); guiCreateStaticImage ( ( 392 / 800 ) * screenX, ( 428 / 600 ) * screenY, ( 500 / 800 ) * screenX, ( 500 / 600 ) * screenY, "mypicture.png", false );
  22. Anderl

    GUI size

    You can also use this formula: local screenX, screenY, px, py, width, height = guiGetScreenSize(); px = ( %ELE_ABSX% / %RESWIDTH_USED% ) * screenX; py = ( %ELE_ABSY% / %RESHEIGHT_USED% ) * screenY; width = ( %ELE_WIDTH% / %RESWIDTH_USED% ) * screenX; height = ( %ELE_HEIGHT% / %RESHEIGHT_USED% ) * screenY; --[[ %ELE_ABSX% = Absolute position X of the element; %ELE_ABSY% = Absolute position Y of the element; %ELE_WIDTH% = Width of your element; %ELE_HEIGHT% = Height of your element; %RESWIDTH_USED% = Width of the screen used to find the absolute positions of the element; %RESHEIGHT_USED% = Height of the screen used to find the absolute positions of the element;]] You might want to use this principally if you use GUIEditor to create your GUI elements.
  23. @X~|Mr.ALM, because your code has errors and it doesn't create an explosion near every player. It does create an explosion near the player who called the function ( who typed the command ) - actually, it doesn't do it because your code has errors as already said. Also, you SHOULD use local variables.
×
×
  • Create New...