The following warnings occurred:
Warning [2] Use of undefined constant SAPI_NAME - assumed 'SAPI_NAME' (this will throw an Error in a future version of PHP) - Line: 3388 - File: inc/functions.php PHP 7.4.33-nmm7 (Linux)
File Line Function
/inc/functions.php 3388 errorHandler->error
/showthread.php 116 build_archive_link
Warning [2] Use of undefined constant IN_ARCHIVE - assumed 'IN_ARCHIVE' (this will throw an Error in a future version of PHP) - Line: 3331 - File: inc/functions.php PHP 7.4.33-nmm7 (Linux)
File Line Function
/inc/functions.php 3331 errorHandler->error
/inc/functions.php 3324 build_forum_breadcrumb
/showthread.php 195 build_forum_breadcrumb
Warning [2] Use of undefined constant IN_ARCHIVE - assumed 'IN_ARCHIVE' (this will throw an Error in a future version of PHP) - Line: 3331 - File: inc/functions.php PHP 7.4.33-nmm7 (Linux)
File Line Function
/inc/functions.php 3331 errorHandler->error
/showthread.php 195 build_forum_breadcrumb






Post Reply 
 
Thread Rating:
  • 1 Votes - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Isplayername
Author Message
Alaric
Journeyman
*

Posts: 227
Likes Given: 7
Likes Received: 9 in 4 posts
Joined: Oct 2012
Reputation: 7



Post: #1
Isplayername
Should work, report bugs pls. Returns 1 if it's player's name. AKA a player...
Code:
[function isplayername] //<isplayername <str>>
newitem i_player_seeker
ref1 = <new>
for 0 4
   ref1.p = 1000,1000,0,<dlocal._for>
   if <ref1.f_seekplayername <args>>
      ref1.remove
      return 1
   endif  
endfor
ref1.remove
return 0

[function f_seekplayername]
forplayers 8000
   if strmatch(<args>,<name>)
      return 1
   endif
endfor
return 0

[itemdef i_player_seeker]
name = player seeker
type = t_script

(This post was last modified: 12-24-2013 10:09 AM by Alaric.)
08-09-2013 06:46 AM
Find all posts by this user Like Post Quote this message in a reply
Alaric
Journeyman
*

Posts: 227
Likes Given: 7
Likes Received: 9 in 4 posts
Joined: Oct 2012
Reputation: 7



Post: #2
RE: Isplayername
Edited function f_seekplayername, found a bug. And another little edit, thanks to RanX.
(This post was last modified: 08-13-2013 02:45 AM by Alaric.)
08-13-2013 01:52 AM
Find all posts by this user Like Post Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 2 Guest(s)