Thread: joining classes
View Single Post
  #16  
Old 12-30-2005, 12:48 AM
excaliber7388 excaliber7388 is offline
Banned
excaliber7388's Avatar
Join Date: Jul 2005
Location: US
Posts: 5,229
excaliber7388 can only hope to improve
Send a message via AIM to excaliber7388
here's the script im using, still will not work X_X probably something stupid....as usual
NPC Code:
if(actionserverside)
{
if(strequals(#p(0),mp))
{
playermp=playermp-1;
}
if(strequals(#p(0),mp2))
{
playermp=playermp+1;
}
if(strequals(#p(0),join))
{
putnpc2,strtofloat(#p(1)),strtofloat(#p(2)),{join force_field;};
}
}
//#CLIENTSIDE
if(mousedown && this.inuse==0 && strequals(#w,Force Field))
{
this.inuse=1;
timeout=.05;
}
else if(mousedown && this.inuse==1)
{
this.inuse=0;
timeout=0;
}
if(timeout && playermp>0 && this.used==0)
{
this.i=this.i+1;
showimg this.i,watermateria.png,mousex,mousey;
changeimgcolors this.i,.5,.75,1,.8;
triggeraction 0,0,serverside,Force Field,mp;
triggeraction 0,0,serverside,Force Field,join,#v(mousex),#v(mousey);
timeout=.05;
}
if(timeout && playermp>0 && this.used==1)
{
this.i=0;
this.used=0;
timeout=.05;
}
if(timeout && playermp=0)
{
this.inuse=0;
sleep 5;
for(this.o=0;this.o<this.i+1;this.o++)
{
hideimg this.o;
triggeraction 0,0,serverside,Force Field,mp2;
sleep .5;
}
timeout=0;
this.used=1;
this.i=0;
}
if(weaponfired)
{
say2 Press the mouse button#b
down when you are at the place#b
you would like to start the #b
force field, press it again to #b
stop;
}


....and the class:
NPC Code:

if(actionserverside)
{
if(strequals(#p(0),destroy))
{
destroy;
}
}
//#CLIENTSIDE
if(created)
{
setimg watermateria.png;
setshape 1,16,16;
blockagain;
timeout=5;
}
if(playertouchsme)
{
hurt 1;
}
if(timeout)
{
triggeraction 0,0,serverside,force_field,destroy;
}


Last edited by excaliber7388; 12-30-2005 at 12:58 AM.. Reason: bad habbits die hard, sorry again skyld
Reply With Quote