Thread: putnpc2
View Single Post
  #16  
Old 09-28-2002, 04:36 PM
Loriel Loriel is offline
Somewhat rusty
Loriel's Avatar
Join Date: Mar 2001
Posts: 5,059
Loriel is a name known to allLoriel is a name known to allLoriel is a name known to allLoriel is a name known to all
Quote:
Originally posted by R0b1n-NPC
You type it in *******
NPC Code:

if (weaponfired) {
putnpc2 playerx+5,playery,{setimg bush.png; message R0bin owns you;};
}

Yes, you type it in, but you do not type it in clientside -.-
Also, you do not use script commands outside of if clauses with events.

NPC Code:

if (actionserverside)
tokenize #v(playerdir);
putnpc2 playerx+vecx(playerdir)*2,playery+vecy(playerdir)* 2,{
if (created) {
showcharacter;
dir = (strtofloat(#t(0))+2)%4;
setcharani sword,;
sleep 1;
destroy;
}
};
}
//#CLIENTSIDE
if (weaponfired)
triggeraction 0,0,serverside,Stupidy;