How can I add PlayerID to this?
#8

Quote:
Originally Posted by kartik
Посмотреть сообщение
pawn Код:
stock PID(const Name[])
{
    for(new i; i<MAX_PLAYERS; i++)
    {
      if(IsPlayerConnected(i))
      {
        new pName[MAX_PLAYER_NAME];
        GetPlayerName(i, pName, sizeof(pName));
        if(strcmp(Name, pName, true)==0)
        {
          return i;
        }
      }
    }
   
Stock pname(playerid)
{
new name[MAX_PLAYER_NAME];
GetPlayerName(playerid,name,sizeof(name));
return name;
}

format(line, sizeof(line), "*%s(%d) laosm At %s.(%d)", pname(playerid),PID(playerid),pname(nearestplayer),PID(nearestplayer));
SendClientMessage(GREEN, line);
It's not stolen , it was from a /getid cmd i was working on ! Lol I just forgot I had to supply a Name ! sorry
Reply


Messages In This Thread
How can I add PlayerID to this? - by RandomDude - 26.07.2013, 15:14
Re: How can I add PlayerID to this? - by Konstantinos - 26.07.2013, 15:17
Re: How can I add PlayerID to this? - by MellowHammer - 26.07.2013, 15:19
Re: How can I add PlayerID to this? - by kartik - 26.07.2013, 15:22
Re: How can I add PlayerID to this? - by RandomDude - 26.07.2013, 15:27
Re: How can I add PlayerID to this? - by thefatshizms - 26.07.2013, 15:29
Re: How can I add PlayerID to this? - by Konstantinos - 26.07.2013, 15:32
Re: How can I add PlayerID to this? - by kartik - 27.07.2013, 13:42

Forum Jump:


Users browsing this thread: 2 Guest(s)