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: 1 Guest(s)