![]() |
playerisrc...
I am thinking this may be moved to NPC Server, but o well...
I am using this: NPC Code: As we all know with(allplayers[i]) returns even for rcs, hence allplayers...However I need detection to see if the current selection is on rc or not. How would you all go about this? I tried #L thinking it might be null, but fail...It equals the last level. |
Re: playerisrc...
Quote:
if (strcontains(#a,"pw name here")||strcontains(#a,RC)) { |
Re: Re: playerisrc...
Quote:
|
Re: Re: playerisrc...
Quote:
|
You could try checking to see if a player just logged on who isn't in a level, since RCs aren't supposed to be in levels.
Also, #L is the NPCs level, #F is the player's level. |
if your trying to get a players count you could try....
NPC Code: you could put it in a system npc..and if the rc isnt on the playeraccount it shouldnt get counted |
Re: Re: Re: playerisrc...
Quote:
|
Jagen: If you want this to work ONLY for RCs, use if (strlen(#F)<=0) It'll run the script if the player level's length is less than or equal to 0 (which is RC) |
Quote:
You know jagen...you really should give the credit to stefan. we were too bloody thick to think of that until we asked him about how to make the addweapon code quit working on RCs. |
Quote:
You couldn't think about using that either :p |
Jagen:
I did say "we" not "you" Kai: Stefan said <=, and it's not that much harder to type than ==, so.. |
Quote:
<=0 means nothing or absolute nonexistance. Stefan must have reckoned that there might just be a plain nothing when you #F a withed rc. But == and <= work just the same since there can't be -1 characters, so what does it matter? |
Quote:
Well not for strlen, but that isn't my point. |
Quote:
|
Quote:
|
Quote:
If you'd clone me, you might have an exact duplicate, but it'd probably still be different. :P |
I need to check sometime if there's a way to get strlen to return -1.
|
I feel like an idiot...
I was here using #L and I should have been using #F. strlen(#F)<=0 works fine... |
Quote:
NPC Code: no there isn't. its a bool. |
Quote:
oops...I thought he said that. I believe you cannot get it to return such a value, it probably returns >-1 maybe if you ran it on an empty string... |
Quote:
|
maybe having a string that is a null character? hehehe. But i tihnk it is quite imposible to pass #K(0x0) w/o it deleting the string.
Acually. It might even screw up the code trying to use null as a valid character. |
What is the whole point of this NPC?
---Shifter |
Quote:
|
I agree with Kaimetsu, if it returns something that is less than one you get the same reaction, so =0 is what has to be used. I wonder, can you use <||=# like if it is less than or equal to? I always use less than or greater than and change the number up or down one that i need to get. l8er
---Shifter |
LOL! God, i'm too tired this morning! i woke up early and thoughti t was like 8 or 9, and was mad, then i realized it wasn't and went back to bed. And i feel like crap :-/ Biology in 30 minutes will not be cool :(
---Shifter |
Quote:
|
Sleep is cool too, heh. Once in a while.
---Shifter |
Quote:
|
boldrick? I hate the weather right now, it gets nice and hot out (60-70), or warm, wahtever, then it crashes back to the 30's! it needs to make up it's mind!
---Shifter |
| All times are GMT +2. The time now is 05:59 AM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.