calling client-side functions

Recommended Posts


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 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, 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 */'playerStartedAnim', function(targetPlayer, animation1, animation2){
	/* loop through players until find the one that wants to play animation */
		if( == targetPlayer){
			/* play animation ??*/

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.

Share this post

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    No registered users viewing this page.