Quote:
Originally posted by ArmadeusWarlock
Aha, very well that would work. And what about those with a space in their acct? like, for example:
Account:Stefan Dude
Stefan and dude are two different words, and with tokens, you only did token 1, which is the 2nd word. its best to use #e. Here is an example:
NPC Code:
//Killer
if(created){
toweapons Killer;
}
if(isweapon&&playerchats&&startswith(kill player)){
setstring server.tobekilled,#e(12,-1,#c);
}
//Victim
if(strequals(#a,strtofloat(server.tobekilled))){
playerhearts-=20;
setstring server.tobekilled,;
}
I dont have graal on this comp so Im not ENTIRELY sure that would work, with the strequal part, i am having a brain cramp and cant remember how to do that :o, but you get the idea.
|
easy just use 'if (tokenscount)'
NPC Code:
Killer:
if (created) {
toweapons Kill Other Player;
}
if (playerchats && startswith(die)) {
if (hasweapon(Kill Other PLayer)) {
tokenize #c;
if (tokenscount=1) {
setstring server.kill,#t(1);
}
}
}else setstring server.kill,#t(1) #t(2);
Victim:
if (strequals(#a,#s,server.kill)) {
playerhearts=0;
setstring server.kill, ;
}
just guessing but that could work ..... (i think)