Thread: 200 Mp
View Single Post
  #4  
Old 07-17-2001, 05:24 PM
SkooL SkooL is offline
somebody to love
Join Date: Jun 2001
Location: bat country.
Posts: 3,446
SkooL is on a distinguished road
Send a message via AIM to SkooL
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.
__________________
the sky is falling
Reply With Quote