get the playerid of a certain player
#9

thx for the answers but that was not my question

would this code work?

pawn Код:
foreach(Player,i)
{
    if(FindPlayerByName(DOMPlayer)!= -1)//if player is online
    {
        new DOMname[24];
        GetPlayerName(i,DOMname,24);
        if(strfind(DOMname,"PawnoQ", true) == 0)//if player is the player with the right name
        {
            SetPlayerScore(i,GetPlayerScore(i)+20);//give only him score
        }
    }
    else
    {
        //if player is not online
    }
}



stock FindPlayerByName(name[])
{
    new Pname[24];
    foreach(Player,i)
    {
        GetPlayerName(i, Pname, 24);
        if(!strcmp(Pname, name, true)) return i;
    }
    return -1;
}
Reply


Messages In This Thread
get the playerid of a certain player - by PawnoQ - 29.01.2012, 03:47
Re: get the playerid of a certain player - by Babul - 29.01.2012, 04:06
Re: get the playerid of a certain player - by PawnoQ - 29.01.2012, 04:26
Re: get the playerid of a certain player - by Richie - 29.01.2012, 05:39
Re: get the playerid of a certain player - by jamesbond007 - 29.01.2012, 06:12
Re: get the playerid of a certain player - by Alexander_123 - 29.01.2012, 06:14
Re: get the playerid of a certain player - by jamesbond007 - 29.01.2012, 06:23
Re: get the playerid of a certain player - by Vince - 29.01.2012, 09:12
Re: get the playerid of a certain player - by PawnoQ - 30.01.2012, 10:51

Forum Jump:


Users browsing this thread: 2 Guest(s)