Jump to content

Multiple classes - populating client, player, etc [answered]


thelegacy0

Recommended Posts

I'm using multiple classes and I'm struggle with every class using the client and player.

 

Things like

 

client.getMyPlayer()

 

Return null in anything besides my one class.

 

How can I make it so both classes after access to stuff like

 

client.getMyPlayer()

 

and

 

client.moveCameraToEntinty()

 

Without having to write

 

method(Player p)

 

p.getInfo();

 

Both classes import and extend script. I just want both classes to be able to use client.getMyPlayer();

 

Answer: see below TWO posts

Edited by thelegacy0
Link to comment
Share on other sites

Your not suppose to extend script for each of your classes, your suppose to create a constructor which extends method provider, you could do it like so:

 

7Vqay.png

 

This will then allow you to access the MethodProvider using "s.client.blah blah"

 

7VqdS.png


Hope that's clear enough for you 

  • Like 1
Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...