Username Check

General talk about editing, cheating, and deprotecting maps.

Moderator: Cheaters

mvd7793
Newcomer
Posts: 12
Joined: September 5th, 2007, 3:03 am

Username Check

Post by mvd7793 »

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?
User avatar
weirdone2
Forum Staff
Posts: 926
Joined: June 3rd, 2007, 8:03 pm

Re: Username Check

Post by weirdone2 »

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