Username Check
Moderator: Cheaters
-
- Newcomer
- Posts: 12
- Joined: September 5th, 2007, 3:03 am
Username Check
How can I do a username check that will return an integer depending on which spot the username is in? ex: The username check is to check for mvd7793. I want an integer to be returned with the value of 1 if mvd7793 is in slot 1, 2 for slot 2 etc. Can you do this?
-
- Forum Staff
- Posts: 926
- Joined: June 3rd, 2007, 8:03 pm
Re: Username Check
I would imagine somting like this, keep in mind that the fifth line definately isnt rite codeing you'll have to fix it up a bit but ya looks somting like that just find the rite names and you'll be fine. o.0
function namecheck takes nothing returns integer
i=0
loop
exitwhen i>11
if PlayerNameofPlayer(i)=="mvd7793"then
return i+1
endif
set i=i+1
endloop
endfunction
function namecheck takes nothing returns integer
i=0
loop
exitwhen i>11
if PlayerNameofPlayer(i)=="mvd7793"then
return i+1
endif
set i=i+1
endloop
endfunction