Quote:
|
Originally Posted by ZeroTrack
How come downloadsize it returning zero everytime? simple test will prove it does
if(created||timeout){
setplayerprop #c, #D #v(downloadpos) / #v(downloadsize);
timeout = .05;
}
Notice the var downloadsize comes up 0
|
NPC Code:
//#CLIENTSIDE
if (created || timeout) {
if (strlen(#D)>0) {
setplayerprop #c,#D;
showtext 201,1,1,comic sans ms,,#D;
changeimgvis 201,8;
changeimgzoom 201,11/textheight(comic sans ms,,1);
for (this.i=0;this.i<int(downloadpos/downloadsize*100);this.i++) {
showtext 300+this.i,1+textwidth(comic sans ms,,11/textheight(verdana,1),|),13,comic sans ms,,|;
changeimgvis 300+this.i,8;
changeimgzoom 300+this.i,11/textheight(comic sans ms,,1);
}
} else {
hideimg 201;
hideimgs 300,400;
}
timeout = .05;
}
Edit: Had to fix something. Erm, it should work, haven't tested so.