Quote:
Originally posted by Cybnext_Design
NPC Code:
if (created) {
setstring playermagic,playermp;
}
if (playerenters) {
toweapons -200 MP;
}
if (strtofloat(#s(playermagic))>playermp) {
tempplayermagic=int(strtofloat(#s(playermagic))-playermp/2);
setstring playermagic,#v(tempplayermagic);
}
This might work, im not sure. Im too tired to load up the editor so....You just have to try it.
|
Didn't work

I thought maybe it was working because of the order of operations...
NPC Code:
if (created) {
this.playermagic=playermp;
}
if (playerenters) {
toweapons -200MP;
}
if (this.playermagic>playermp) {
playermp+=int((this.playermagic-playermp)/2);
this.playermagic=playermp;
}
That didn't work either.