Jump to content
  • 0

Check Character Prefix


Question

5 answers to this question

Recommended Posts

Posted
if( compare(strcharinfo(0),"PRE") ){ do this } else { end; }

However, this will only check to see if they have those 3 letters in there name. To check to see if they are the FIRST 3 letters we need to do this:

if( charat( strcharinfo(0), 0 ) == "P" && charat( strcharinfo(0), 1 ) == "R" && charat( strcharinfo(0), 2 ) == "E" ){ do this } else { end; }

The above will check to see if the FIRST 3 letters of the players name is PRE. Keep in mind though, it is checking for Case Sensitive PRE. There is a way to bypass that, but I didn't put that in since your looking for PRE specifically.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...