Thread: strlen + #e
View Single Post
  #19  
Old 01-27-2004, 02:24 AM
ZeLpH_MyStiK ZeLpH_MyStiK is offline
Scripter
ZeLpH_MyStiK's Avatar
Join Date: May 2003
Location: NYC
Posts: 553
ZeLpH_MyStiK is on a distinguished road
Send a message via MSN to ZeLpH_MyStiK Send a message via Yahoo to ZeLpH_MyStiK
Quote:
Originally posted by R0bin
setstring this.word,Blah;
unset this.word;

message #s(this.word);

Will still message Blah.
Not when I tried it x.x think about it, here's the logic:
if you do setstring clientr.test,hi; and you open the attributes, the string is shown in the flags section therefore it can be unset. If you still dont believe me, try this, its a weapon called Test:
NPC Code:

if (actionserverside) {
putnpc2 playerx,playery,{
if (created) message I'm here;
if (playerchats) {
if (strequals(#c,set)) setstring this.test,hi;
if (strequals(#c,unset)) unset this.test;
if (strequals(#c,say)) message #s(this.test);
}
}
}
//#CLIENTSIDE
if (weaponfired) {
triggeraction 0,0,serverside,Test,;
}


just say "set" "say" you'll see the npc say hi
then say "unset" "say" the npc will then say nothing b/c this.test is no longer there
__________________

Last edited by ZeLpH_MyStiK; 01-27-2004 at 03:06 AM..
Reply With Quote