[Include] OnPlayerAfk
#1

Hi, I'd like to present you OnPlayerAfk library and sample script use.


Script:

Код:
forward OnPlayerAfk(playerid, bool:afk);
public OnPlayerAfk(playerid, bool:afk){

	new string[30];
	format( string, sizeof( string ), "Player %s (%d) %s", getPlayerNick(playerid), playerid, (afk==true)?("away from keyboard"):("Already returned") );
	SendClientMessageToAll(0xFF00FF, string);
	
}
getPlayerNick( playerid ){
	new pName[ MAX_PLAYER_NAME + 1];
	GetPlayerName( playerid, pName, 30);
	return pName;
}
Download include sendspace.com

Reply


Messages In This Thread
OnPlayerAfk - by HavingGood - 22.12.2013, 22:24
Re: OnPlayerAfk - by Sanady - 22.12.2013, 22:42
Respuesta: OnPlayerAfk - by Swedky - 23.12.2013, 02:59
Re: OnPlayerAfk - by Alphlax - 23.12.2013, 03:07
Re: OnPlayerAfk - by HavingGood - 23.12.2013, 03:27

Forum Jump:


Users browsing this thread: 1 Guest(s)