Thread: Uhm...
View Single Post
  #20  
Old 12-19-2001, 12:16 AM
Saga2001 Saga2001 is offline
Wishing he had 3 feet
Join Date: Aug 2001
Location: Basement
Posts: 1,565
Saga2001 is on a distinguished road
Send a message via ICQ to Saga2001 Send a message via AIM to Saga2001 Send a message via Yahoo to Saga2001
This is with npc server?

if this is with npcserver, can't u use a with?
like:
NPC Code:

/*
you could just do something like make accounts like:
setstring server.faqacc1,accountname;
so lets make believe you have 2 faqs.
*/
Database NPC / Source NPC:
if (created||initialized) {
setstring server.faqacc0,accountname;
setstring server.faqacc1,accountname;
// this.maxaccounts should be the highest numer you have in the list...so for this example the maxaccnts is 1...
this.maxaccnts = 1;
this.i = 0;
}
while (this.i<this.maxaccnts) {
with(getplayer(#s(server.faqacc#v(this.i)))) {
if (strequals(#g,FAQ)&&strlen(#s(server.faqaccon#v(th is.i)))<1) {
setstring server.faqaccon,#v(timevar);
} else if (!strequals(#g,FAQ)&&strlen(#s(server.faqaccon#v(t his.i)))>0) {
this.starttime = strtofloat(#s(server.faqaccon#v(this.i)));
setstring server.faqaccon#v(this.i),;
this.currtime = timevar;
this.hastime = strtofloat(#s(server.faqacctime#v(this.i)));
this.newtime = (this.currtime-this.starttime)+this.hastime;
setstring server.faqacctime,#v(this.newtime);
this.i++;
}
}
sleep .1;
}
while (this.i>=this.maxaccnts) {this.i=0;sleep .1;}
if (actionserverCheckTime) {
this.j=0;
while (this.j<this.maxaccnts) {
showimg this.j+500,@#s(server.faqacc#v(this.j)): #s(server.faqacctime#v(this.j)),10,100+(this.j*15) ;
changeimgvis this.j+500;
this.j++;
}
}

The NPC Used to Check times:
if (playertouchsme) toweapons Time Check;
if (playerchats&&strequals(Check FAQ Times,#c)) {triggeraction 0,0,serverCheckTime,;}



Its mostly done, i haven't tested it, i am still at school...it looks pretty good..should work... someone test it and tell me...ok? looks pretty good to me.
-PastAustin
__________________

!Wan ( 11:27:55 AM):
can i c ur scripts please?
Zorg (RC): If I hear NPC Server call Ne0, Past Austin or Brent sexy one more time im disconnecting it

Last edited by Saga2001; 12-19-2001 at 03:55 AM..
Reply With Quote