Thread: Scripting query
View Single Post
  #13  
Old 02-02-2002, 12:06 PM
nyghtGT nyghtGT is offline
Banned
nyghtGT's Avatar
Join Date: Jun 2001
Posts: 3,993
nyghtGT is on a distinguished road
Send a message via AIM to nyghtGT
Quote:
Originally posted by TDK_RC6
try this
NPC Code:

if (playerchats) {
tokenize #c;
if (tokenscount==2&&strequals(#t(0),/jail)) {
addstring server.jailed,#t(1);
setplayeprop #c, ; }
if (tokenscount==2&&strequals(#t(0),/unjail)) {
if (lindexof(#t(1),server.jailed)>=0) {
deletestring server.jailed,lindexof(#t(1),server.jailed);
} else { say2 #t(1) isn't in jail; }
setplayerprop #c, ;
}
}



thats a pretty simple script, you will have to write a script that will jail the player (should be server side)
'tokenscount' is not always 100% realible, but then very
few commands are.
Reply With Quote