11.01.2019, 14:27
PHP код:
stock GetPlayeridMid(name[]) //Boylett
{
for (new i = 0; i < MAX_PLAYERS; i++)
{
if (IsPlayerConnected(i))
{
new gPlayerName[MAX_PLAYER_NAME];
GetPlayerName(i, gPlayerName, MAX_PLAYER_NAME);
if(strfind(gPlayerName, name, true) != -1)
{
return i;
}
}
}
return INVALID_PLAYER_ID;
}
PHP код:
GetPlayerName(target, name, sizeof(name));
new tname = GetPlayerMid(name);