26.05.2017, 21:02
Quote:
How can I check if a player is online using strfind?
For example, I tried checking if: PHP Code:
|
pawn Code:
GetBusinessOwnerPlayerID(businessid)
{
if(businessid < 0 || businessid > MAX_BUSINESSES || BizData[businessid][bizValid] == false)
return false;
new local_playerName[MAX_PLAYER_NAME];
for(new i; i <= GetPlayerPoolSize(); i++)
{
GetPlayerName(i, local_playerName[i], MAX_PLAYER_NAME);
if(strcmp(local_playerName[i], BizData[businessid][bizOwner], true) == 0)
{
return i;
}
}
return INVALID_PLAYER_ID;
}