Jump to content

Merksk8

Members
  • Posts

    2
  • Joined

  • Last visited

Everything posted by Merksk8

  1. Hello, I started some days ago scripting a new server, lot of information is missing or need to be found in some external examples, but anyway, the most part I found it. But when started with clientside, I can't understand the way it works. So then, from JS called from HTML, you need to use mp.triggers(). Ok. If you call from (for example) client package "Test", file "Index.js", you can use mp.game.player object to access to the local player that triggered that event, ok. But the weird thing is, and my questions are : 1. In the Wiki, there are two sections on player commands, the top one (related with entities) and the bottom one ( related with ?? ), this last ones ( bottom) works well with mp.game.player, but the other ones I can't get them working ( apparently doesn't exists). So the first question is, how to access the first ones. 2. The second one is, if I want to sync a local even, for example an animation, from each local clientside player, do I have to do like this?? : /* Event call from server to all players */ mp.events.add('playerStartedAnim', function(targetPlayer, animation1, animation2){ /* loop through players until find the one that wants to play animation */ mp.players.forEach(function(pl){ if(pl.name == targetPlayer){ /* play animation ??*/ pl.taskPlayAnim(animation1,animation2,8.0,1,-1,49,1.0,false,false,false); } }); }); Well, above code is not working because the question 1, so take it like an example for what I'm asking. Thanks a lot for reading and thanks for advance.
  2. Merksk8

    Add Events

    Hello, Talking in discord, I heard that there are events implemented that are not on the Wiki. Would be amazing to know them, at least a simple list with name events to test them, or if there are other way to know them, I would appreciate to know how. Thanks a lot, rage-mp seems to work perfect, so thanks for your work.
×
×
  • Create New...