Quote:
Originally posted by Knightoffrost
A lot of people use "(playerchats&&strequals(#c,blah)" instead of "(playersays(blah))" ...
Why is that? playersays is much more easy and smaller which means less characters which means less time the computer takes reading the info (even if its a fast simple action anyway) which just means slightly more speed in it all I guess. But why do people use playerchats and strequals instead of playersays?
|
Ok. Playersays(text) is the same as strequals(#c,text). People use
NPC Code:
if (playerchats && strequals(#c,text)) { }
because the code will only run WHEN the player changes his chat field.
Try these codes out:
NPC Code:
if (playersays(buy me)) {
playerrupess-=10;
}
NPC Code:
if (playerchats && strequals(#c,buy me)) {
playerrupees-=10;
}
See the difference?