IRC admin chat to server
#1

Hi, I have been messing arround with iAdministrator for the past few hours, and I am trying to get a IRC command, !a <message> to show up in ladmin's admin chat for the server. I know i am gonna have to use dini to get there levels from ladmin but.. I am kinda a noob with dini, so i was hoping someone could help me with this one.

Код:
irccmd_a(conn, channel[], user[], params[])
{
	new namez[MAX_PLAYER_NAME], i, file[256];
	for(i = 0; i < MAX_PLAYERS; i++) if(IsPlayerConnected(i))
	{
		GetPlayerName(i, namez, sizeof(namez));
		format(file, sizeof(file), "/ladmin/users/%s", namez);
		//no idea what to do now, bad with dini lol
		
	}
	return true;
}
Reply
#2

bump
Reply
#3

pawn Код:
irccmd_a(conn, channel[], user[], params[])
{
    new string[256];
    format(string,sizeof(string),"Admin chat: %s from IRC: %s",user,params);
     MessageToAdmins(blue,string);
    return true;
}
You don't need dini for this.
Err for the is player op thing, i dont have the filterscript so just copy it.
Reply
#4

Quote:
Originally Posted by SloProKiller
pawn Код:
irccmd_a(conn, channel[], user[], params[])
{
    new string[256];
    format(string,sizeof(string),"Admin chat: %s from IRC: %s",user,params);
     MessageToAdmins(blue,string);
    return true;
}
You don't need dini for this.
Err for the is player op thing, i dont have the filterscript so just copy it.
that won't work. irccmd commands won't work unless programmed on iAdmin(the irc bot) .. PlayerInfo from ladmin doesn't work .. because well, its from ladmin, and not in iAdmin. like, because they are 2 diff filterscripts they don't share the information
Reply
#5

anotha bump would appreciate any help, if you need to see the code:

http://forum.sa-mp.com/index.php?topic=125727.0 - iAdmin
http://forum.sa-mp.com/index.php?topic=36990.0 - LAdmin
Reply
#6

on top put #include <IsPlayerLadmin>
then at the bottom
Код:
forward MessageToAdmins(color,const string[]);
public MessageToAdmins(color,const string[])
{
	for(new i = 0; i < MAX_PLAYERS; i++)
	{
		if(IsPlayerConnected(i) == 1) if (IsPlayerLAdmin(i)) SendClientMessage(i, color, string);
	}
	return 1;
}
Then use the code i gave you before.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)