14.12.2012, 21:48
Ow.. I keep on forgetting stuff like that. thanks
EDIT: 1 thing though, inputtext is a name, not an ID.
EDIT: 1 thing though, inputtext is a name, not an ID.
pawn Код:
stock GetPlayerID(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;
}
}
}
return -1;
}