24.04.2010, 23:19
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
I read through the wiki but didn't find anything
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 |
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 |
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;
}
Originally Posted by _❼_
Edit button?
pawn Код:
|
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. |
Originally Posted by ScottCFR
Quote:
|
Originally Posted by ScottCFR
Quote:
|