View Single Post
  #7  
Old 01-12-2014, 03:54 AM
cbk1994 cbk1994 is offline
the fake one
cbk1994's Avatar
Join Date: Mar 2003
Location: San Francisco
Posts: 10,718
cbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond repute
Send a message via AIM to cbk1994
Quote:
Originally Posted by sssssssssss View Post
I would just be taking out of clientr.hp, but it's not accessible by pl.clientr.hp correct?
Yes, that's exactly how you should access it. Serverside you can use findPlayer to get another player object. The only difference between "temp.pl" and "player" in this case is that player is available automatically. They're both TServerPlayer objects, and you can do the same things to etiher of them. There's no reason to trigger clientside and then back.

It might help to remember that clientr.hp is really the same thing as player.clientr.hp. So you can also do findPlayer("fowlplay4").clientr.hp.

If you want to do it properly you should move this into a player class so you can just do findPlayer("fowlplay4").attack(9999, player) or whatever and not have to recycle the same logic everywhere you need to do damage.
__________________
Reply With Quote