![]() |
Health System
im creating a health system for my server, and i was wondering, how do you make sure that when you damage a player that you can tell you killed them. this is what i have so far. I only spent a couple of minutes, and i was wondering, can anyone help me? i am not to good at scripting. and the server is gonna have a ranking system ( like ranks for each class. ) and class system. im still working on everything, because i have no staff xD
PHP Code:
|
Well, you could just do
PHP Code:
And btw, you need to set the clientr. flags serverside. Edit: I worded it wrong, sorry |
Jazz, i meant how do i find the player whos im attacking. like if i attack some player, how would i make them get hurt.
this is what i have so far: PHP Code:
|
Well, you can't access other player's clientr. flags tho..
So, instead of checking for a player clientside, you would simple do a triggeraction() Then if a player is hit (not the one swinging the sword), you check in.. for example 'onActionHit()' and in there, set anis and trigger serverside to remove some of their health |
Quote:
|
Take your onCreated function and move it to the serverside. Also for important flags like that, regardless of the fact that they are clientr. it' a good idea to base64encode them when you're finished with testing.
For checking if a player will die: temp.dmg = 5; //replace 5 with desired damage if ( clientr.hp - temp.dmg <= 0 ) //If this is true the player will die. clientr.hp -= temp.dmg; |
Quote:
He means to send a triggeraction when you press S, and then have it detect it, probably something like this: PHP Code:
|
Quote:
|
PHP Code:
|
Quote:
Maloria had problems with staffers leveling up the first time simply by editing clientr. flags and not being caught, and could have easily prevented this with encryption. |
Quote:
|
Quote:
|
If you're that paranoid, encode it ... but why?
If someone wants to they can delete the whole server with access to a single level. base64encode would be incredibly easy to break anyway. Just don't give any staff edit attributes. |
Quote:
That was not the problem. Anyone with access to a single test level can edit clientr flags if they are not encoded. Not everyone with a single test level has access to delete the entire server. It has nothing to do with edit attributes. Callstacks also solve this problem, but back then callstack access was not available. Also, there are ways to use base64encode that are more difficult to break then simply saying var = base64encode(var). |
Solution: not to hire someone that resonates as corrupt!
|
Quote:
|
Quote:
Quote:
|
Quote:
|
Quote:
|
How about you just use clientr vars for reading and not for storing? Much simpler.
|
Quote:
Changes like that are logged in logs/rclog.txt |
Quote:
|
Quote:
Either way, if you want to store important information the old fasion way, and then not secure it, be my guest. Your data, not mine. Again, I wouldn't even store this sort of information in a clientr. in the first place. |
Quote:
|
Quote:
|
Ideally, you shouldn't have to worry about staff even making scripts to edit clientr variables.
|
Quote:
But unfortunately after what happend on Maloria I don't think that if you're gonna store this sort of thing in a clientr. variable, that it's worth the risk of leaving it decryted. |
Ideally, only server administrators should have access to RC on classic servers and all other staff should work on Dev servers.
|
Quote:
So ideally everyone's data NPCs would be scripted securely. :p |
Quote:
|
Quote:
|
You forget that someone scripts the encryption, and, face it, more scripters are corrupt than any other group of developers ;)
Atleast the ones I've seen. |
Quote:
So if scripters are corrupt and you want a good solid encryption system, the only solution seems that only servers created by a scripter would solve this issue since a server creater probably wouldn't screw the economy up or cheat on the server that he/she created. At least, I know I wouldn't. |
Quote:
|
Quote:
That's all they have to know how to write lol. What's awesome is it's just those types of people who you're normally protecting from. People who only know how to do simple commands aren't going to bother trying to decode your protected data, even if it's a simple one line encryption. |
| All times are GMT +2. The time now is 06:48 AM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.