Thread: downloadsize
View Single Post
  #19  
Old 09-18-2004, 08:20 PM
Malinko Malinko is offline
Unholy Nation
Join Date: Mar 2004
Location: Massachusetts, U.S.A.
Posts: 1,782
Malinko is on a distinguished road
Send a message via AIM to Malinko
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.
Reply With Quote