04.01.2019, 07:22
You can do it like this:
And then write your format like this:
PHP Code:
stock IsUserOnline(const name[])
{
for(new i=GetPlayerPoolSize(),n[MAX_PLAYER_NAME]; i!=-1; i--)
{
if(GetPlayerName(i,n,MAX_PLAYER_NAME) && !strcmp(name,n)) return 1;
}
return 0;
}
PHP Code:
format(minfo,sizeof(minfo),"{FFFF00}%s (%s)\n",string,(IsUserOnline(string)?("Online"):("Offline")));