Quote:
Originally Posted by Just a Random User
Punishment should be -1h. Killing a player sounds too severe. If I use this script, will this work for -1h punishment?
Code:
if (isCamping[1])
{
jjChat("I camped for too long " + campAreaName[i] + ". Now I get punishment");
p.health = p.health - 1;
campTime[i] = 0;
}
|
Yes, that would work, but you might be able to write it shorter like this:
I've made a new version of the script, however. In this version, you'd need to use this:
Code:
jjPlayers[pID].pHealth -= 1;
//or
jjPlayers[pID].pHealth = jjPlayers[pID].pHealth - 1;
----------
Please use pastebin to see everything properly: http://pastebin.com/fwQ1Q3b9
__________________
<center>  </center>
Last edited by Grytolle; Feb 3, 2013 at 01:59 PM.
Reason: SE pointed out that relative expressions might not work well with objects
|