View Single Post
  #1  
Old 10-07-2006, 04:08 PM
michael7849 michael7849 is offline
Playerworld21 Manager
Join Date: Aug 2006
Posts: 81
michael7849 is an unknown quantity at this point
needs help with abox ()

well i have a donation tyhing put it isnt working good i will take a screenie and show u all (here is the script) (it is a donation box)

NPC Code:
if (playerchats) {
if (startswith(/donate,#c)) {
tokenize #c;
if (tokenscount==2 && strequals(#t(0),/donate)) {
if (strtofloat(#t(1))>0 && strtofloat(#t(1))<=playerrupees) {
playerrupees -= strtofloat(#t(1));
setstring server.donation,#v(strtofloat(#s(server.donation))
+strtofloat(#t(1)));
}
else setplayerprop #c,Wrong values.;
}
}
if (strequals(#c,/take donation)) {
if (strequals(#a,#s(server.player))) {
playerrupees += strtofloat(#s(server.donation));
setstring server.donation,0;
}
}
}

if (created || timeout) {
showtext 0,x+1,y-0.5,Arial,bc,Current Donated: #s
(server.donation);
changeimgzoom 0,0.6;
changeimgvis 0,2;
timeout = 0.05;
}

Attached Images
File Type: bmp serverpic.bmp (818.8 KB, 140 views)

Last edited by michael7849; 10-07-2006 at 04:15 PM.. Reason: juat felt liek it
Reply With Quote