GetPlayerID
#1

Is there a function to get the player slot? like someone with the ID: 0 or ID: 1 or ID: 2

I read through the wiki but didn't find anything
Reply
#2

Quote:
Originally Posted by ScottCFR
Is there a function to get the player slot? like someone with the ID: 0 or ID: 1 or ID: 2

I read through the wiki but didn't find anything
its gone in 0.3 i had it in 0.2
Reply
#3

Quote:
Originally Posted by ScottCFR
Is there a function to get the player slot? like someone with the ID: 0 or ID: 1 or ID: 2

I read through the wiki but didn't find anything
double post

try return user
Reply
#4

Edit button?

pawn Код:
stock GetPlayerID(const Name[])
{
    for(new i; i<MAX_PLAYERS; i++)
    {
      if(IsPlayerConnected(i))
      {
        new pName2[MAX_PLAYER_NAME];
            GetPlayerName(i, pName2, sizeof(pName2));
        if(strcmp(Name, pName2, true)==0)
        {
          return i;
            }
        }
    }
    return -1;
}
Reply
#5

Damn, Is there anything to check their playerid?

I'm making a rank system. It's set up on a MAX_PLAYERS kinda thing. So the call is Rank[playerid] == 1 or 0;. Theres a command to turn it off, So what it does is if it's 0 then it shuts it off for the playerid.
Reply
#6

Quote:
Originally Posted by _❼_
Edit button?

pawn Код:
stock GetPlayerID(const Name[])
{
    for(new i; i<MAX_PLAYERS; i++)
    {
      if(IsPlayerConnected(i))
      {
        new pName2[MAX_PLAYER_NAME];
            GetPlayerName(i, pName2, sizeof(pName2));
        if(strcmp(Name, pName2, true)==0)
        {
          return i;
            }
        }
    }
    return -1;
}
I don't need to get thier name. I need the playerid slot number.
Reply
#7

Quote:
Originally Posted by ScottCFR
Damn, Is there anything to check their playerid?

I'm making a rank system. It's set up on a MAX_PLAYERS kinda thing. So the call is Rank[playerid] == 1 or 0;. Theres a command to turn it off, So what it does is if it's 0 then it shuts it off for the playerid.
how dose it rank show code
Reply
#8

That's why it's called GetPlayerID
Reply
#9

Quote:
Originally Posted by ScottCFR
Quote:
Originally Posted by _❼_
Edit button?

pawn Код:
stock GetPlayerID(const Name[])
{
    for(new i; i<MAX_PLAYERS; i++)
    {
      if(IsPlayerConnected(i))
      {
        new pName2[MAX_PLAYER_NAME];
            GetPlayerName(i, pName2, sizeof(pName2));
        if(strcmp(Name, pName2, true)==0)
        {
          return i;
            }
        }
    }
    return -1;
}
I don't need to get thier name. I need the playerid slot number.
it compairs the name if the name is compaired and is true it returns the id
Reply
#10

Quote:
Originally Posted by ScottCFR
Quote:
Originally Posted by _❼_
Edit button?

pawn Код:
stock GetPlayerID(const Name[])
{
    for(new i; i<MAX_PLAYERS; i++)
    {
      if(IsPlayerConnected(i))
      {
        new pName2[MAX_PLAYER_NAME];
            GetPlayerName(i, pName2, sizeof(pName2));
        if(strcmp(Name, pName2, true)==0)
        {
          return i;
            }
        }
    }
    return -1;
}
I don't need to get thier name. I need the playerid slot number.
I'm embarrassed for you right now, dawg.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)