All pastes #549351 Raw Edit

Unnamed

public text v1 · immutable
·published 2007-06-08 02:47 UTC
rendered paste body
stock FindUser(pname[])
{
    for(new s=0; s<strlen(pname); s++) // loop through the length of pname
    for(new i=0; i<MAX_PLAYERS; i++) if(IsPlayerConnected(i))
    {
        new name[24];
        GetPlayerName(i,name,24);
        if(strfind(name, pname, true) == 0) return i; 
    } 
    return -1;
}