![]() |
Trigger Server for another player
I could have sworn I've done this before, but maybe I'm wrong. pl.triggerServer just throws the error
Quote:
PHP Code:
|
It's just triggerserver. also since you're looping go through and add the players to an array and send that to the serverside instead of 1 or more triggers.
In theory all you should need is: PHP Code:
PHP Code:
|
does vectordist kill the need for my to calculate the xy for the sword distance and if the other player is in it?
Not sure why it's there to be honest. Also I'm using clientr.vars for the hp, so wouldn't I have to trigger a weapon function for each player hurt to update that, since it's not accessible for anything like pl.clientr.hp? |
I got it triggering back to the client for the pl again, then back serverside to change the clientr.vars, then back clientside to handle death or anything else. If there's a better way someone please let me know.
Thanks! |
Quote:
Replace temp.pl.hp--; with your own variable or whatever you do to 'damage' the player. You shouldn't have to trigger the client then back to the server again. |
I would just be taking out of clientr.hp, but it's not accessible by pl.clientr.hp correct?
|
Quote:
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. |
thanks for the help you guys. :)
|
| All times are GMT +2. The time now is 09:14 PM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.