NPC Code:
if(actionserverside){
if(strequals(#p(0),summon)) {
with(getplayer(#p(2))){
setlevel2 #p(3),strtofloat(#p(4)),strtofloat(#p(5));
savelog2 StaffToollog.txt,Staff="#p(1)" Summoned Player="#p(2)" To Level="#p(3);
}
}
if(strequals(#p(0),jail1)){
with (getplayer(#p(2))){
setlevel2 jail1_darkrival2.nw,30,40;
setplayerprop #c,Jailed For #p(3);
savelog2 StaffToollog.txt,Staff="#p(1)" Jailed Player="#p(2)" To Reason="#p(3);
}
}
if(strequals(#p(0),jail)){
with (getplayer(#p(2))){
setlevel2 jail_darkrival2.nw,28,38;
setplayerprop #c,Jailed For #p(3);
savelog2 StaffToollog.txt,Staff="#p(1)" Jailed Player="#p(2)" To Reason="#p(3);
}
}
if(strequals(#p(0),disconnect)){
with(getplayer(#p(2))){
disconnect;
savelog2 StaffToollog.txt,Staff="#p(1)" Disconnected Player="#p(2)" Reason="#p(3);
}
}
}
//#CLIENTSIDE
if(isweapon){
if(playerchats){
tokenize #c;
if(strequals(#t(0),/summon)){
triggeraction 0,0,serverside,GP Control,summon,#a,#t(1),#L,#v(playerx),#v(playery) ;
}
if(strequals(#t(0),/jail)){
triggeraction 0,0,serverside,GP Control,jail,#a,#t(1),#t(2);
}
if(strequals(#t(0),/jail1)){
triggeraction 0,0,serverside,GP Control,jail,#a,#t(1),#t(2);
}
if(strequals(#t(0),/disconnect)){
triggeraction 0,0,serverside,GP Control,disconnect,#a,#t(1);
}
if(weaponfired){
say2 Commands for GP's#b
If there are "" in the command#b
put them in#b
/jail1 "account" "reason"#b
-for minor offences, like swearing#b
/jail "account" "reason"#b
-anything from harassment to hacking#b
/disconnect "account" "reason"#b
-Use as a warning#b
/maxjail "account" "reason"#b
-SEVERE OFFENCES ONLY!#b
You may also use your#b
RC for manay of these#b
commands.
}
}
Several points :
- 'if (weaponfired)' and 'if (playerchats)' should not appear inside another code block (ie: not inside the 'if (isweapon) {}' block).
- Your missing a brace (One of these - '}') somewhere. (Or I accidentally deleted it when formatting the script.)
- Format your code and use the code tag on these forums or you will probably get slapped round the head with a trout. If you'd formatted your code you will have spotted the missing brace probably.
- You have some incorrect "quoting" of strings in the serverside part.