View Single Post
  #20  
Old 09-30-2002, 11:12 PM
emortylone emortylone is offline
Registered User
Join Date: Apr 2002
Location: Control-NPC
Posts: 834
emortylone is on a distinguished road
Quote:
Originally posted by CheeToS2
would be nice to have sendpm2 acct,message; too.. although it'd be abused
Sorry Cheetos, but there's two ways to do this...
NPC Code:

if (actionserverside)
{ with (getplayer(#p(0)))
{ sendpm #p(1);}
}


That sends it via triggeraction, #p(0) = acc, #p(1) = message
NPC Code:

if (actionserverside)
{ for (i=0;i<allplayerscount;i++)
{ with (allplayers[i])
{ if (strequals(#a,#p(0)))
{ sendpm #p(1);}
}
}
}


Does the same thing, but in a different way.
---Shifter
__________________
Quote:
*Stefan: it seems sometimes they hire newbie scripters everywhere x-x
*Stefan: scripters are sometimes like people that draw paintings
*Stefan: all that counts is that it looks nice
Reply With Quote