it works fine off line, but i'm having trouble online here is the current script i'm using:
NPC Code:
//#CLIENTSIDE
if(playerenters){
setstring client.food,100;
toweapons *Food System;
}
if(created){
showimg 2,drfoodbarback.png,15,115;
changeimgvis 2,4;
showimg 1,drfoodbarfp.png,37,121;
changeimgvis 1,4;
timeout=1;
}
if(timeout){
sleep 0;setstring client.food,#v(strtofloat(#s(client.food))-1);
changeimgpart 1,0,0,imgwidth(drfoodbarfp.png)/100*strtofloat(#s(client.food)),imgheight(drfoodba rfp.png);
if(strtofloat(#s(client.food))<2.1){
setstring client.food,2;
playerhearts=.5;
}
timeout=1;
}
if(strtofloat(#s(client.food))=5){
setplayerprop #c, I'm so hungry!;
}
if(strtofloat(#s(client.food))<1){
setstring client.food,1;
playerhearts=.5;
}
if(weaponfired){say2 You have to eat#bevery few hours.#bThe third bar at the top#bis for food.#bIf it runs out you#b will become very weak.;setplayerprop #c,#s(client.food)}