Jump to content

AxL

Members
  • Posts

    4
  • Joined

  • Last visited

AxL's Achievements

Vic

Vic (3/54)

0

Reputation

  1. Mam dość nietypowe pytanie, może ktoś się orientuje - czy twórcy MTA udostępniają gdzieś statystyki ilości graczy na przekroju kilu miesięcy, najlepiej z podziałem na kraje?
  2. Mhm, I understand now. Thanks for help.
  3. I understand it at ServerSide Scripts, but I'm not sure how it's works at ClientSide Scripts. Look at example: https://wiki.multitheftauto.com/wiki/OnC ... WeaponFire One time is used localplayer, and another rootelement. So: -- First Example function onClientPlayerWeaponFireFunc(weapon, ammo, ammoInClip, hitX, hitY, hitZ, hitElement ) outputChatBox ( "Don't kill people with minigun, it's lame!", 255, 0, 0 ) end addEventHandler ( "onClientPlayerWeaponFire", getLocalPlayer(), onClientPlayerWeaponFireFunc ) -- Second Example: function onClientPlayerWeaponFireFunc(weapon, ammo, ammoInClip, hitX, hitY, hitZ, hitElement ) outputChatBox ( "Don't kill people with minigun, it's lame!", 255, 0, 0 ) end addEventHandler ( "onClientPlayerWeaponFire", getRootElement(), onClientPlayerWeaponFireFunc ) In first example it'll send message to one player, who initiated this event, and in second example it'll send message to all on-line players, yes? But, if it's true, why in events like: https://wiki.multitheftauto.com/wiki/OnClientMouseEnter we use rootelement, not localplayer?
  4. Hello. I have question about difference in parameter "attachedTo" in "addEventHandler" (client side). I have 3 examples from wiki: 1: https://wiki.multitheftauto.com/wiki/OnC ... ourceStart 2: https://wiki.multitheftauto.com/wiki/OnClientCursorMove 3: https://wiki.multitheftauto.com/wiki/OnClientGUIClick As You see, in event "onClientResourceStart" we have 3 kinds of "attachedTo". What's a difference between them? What'll be happen if in example "onClientCursorMove" I'll write "getRootElement" etc? This same question about difference between "getRootElement" and "getLocalPlayer". Example: https://wiki.multitheftauto.com/wiki/OnC ... WeaponFire In first 'example script' is used localplayer, but in second "root" (guesses, it's rootelement). But in other events, sometimes is used rootelement, and sometimes is used localplayer. When I must use localplayer, and when rootelement? So, how can I know what, when I must use? What's the difference between them? Is there any tutorial, or sth from where I can learn it?
×
×
  • Create New...