13.06.2013, 00:53
pawn Код:
CMD:pauser(playerid, params[])
{
new player, pName[MAX_PLAYER_NAME];
if( sscanf ( params, "u", player)) return SendClientMessage(playerid, -1, "Usage: /pauser [ playerid ]");
if(IsPlayerConnected(player) && player != INVALID_PLAYER_ID)
{
if(afksecs[ player ] < 2)
{
if(afksecs[ player ] > 2)
{
new str[ 75 ];
GetPlayerName(player, pName, MAX_PLAYER_NAME);
format(str, 75, "%s[%d] has been afk for %d seconds ", pName, player, afksecs[ player ]);
SendClientMessage(playerid, -1, str);
}else return afksecs[player];
}
}else return SendClientMessage(playerid, -1, "This player is not connected..");
return SendClientMessage(playerid, -1, "This player is not pausing!");
}