CallRemoteFun...
#1

Hello, I have 2 scripts,

My IRC is added on my gamemode,
And I have my anti weapon hacks in other script, so Is there anyway I can use this:

Gamemode Example:

pawn Код:
new msg[128];
                format(msg,sizeof(msg),"0,4Admin %s Banned Player %s for %s", sendername, giveplayername, reason);
                IRC_GroupSay(IRC_Group, EchoChan, msg);
                IRC_GroupSay(IRC_Group,"#cadminecho",msg);
Is there anyway to use

pawn Код:
IRC_GroupSay(IRC_Group, EchoChan, msg);
In my other filterscript?
Reply
#2

Anyone?
Reply
#3

IRC is a plugin and should be accessible from filterscripts too.
Reply
#4

Can I use CallRemoteFunction?

Look:


In fact I do have an IRC, its included in my gamemode, It works perfectly, But I have a filterscript, which I if the player hacks I want to send a message via IRC, So maybe using callremoteFunction?
Reply
#5

Quote:
Originally Posted by Alex_Obando
Посмотреть сообщение
Can I use CallRemoteFunction?
Yes.
Reply
#6

Can you show me how to fix it with this:

pawn Код:
IRC_GroupSay(IRC_Group, EchoChan, msg);

//Is this correct?:
CallRemoteFunction("IRC_GroupSay(IRC_Group, EchoChan);","isi",0xFF0000,string,1);
Reply
#7

You can use IRC_GroupSay, and I presume it will be faster for you to do so in filterscript, you do NOT have to use CallRemoteFunction.

In short: You don't need to use CallRemoteFunction!

Furthermore, you need to look up the format for CallRemoteFunction, that's clearly not what the Wiki shows. Plus, you can only call public functions, so you would have to wrap the native in a public function and forward it, then you could use CallRemoteFunction.

pawn Код:
/* pointless because you can just use IRC_GroupSay in your filterscript WITHOUT CallRemoteFunction.... */
forward pub_IRC_GroupSay(group, echochan[], msg[]);

public pub_IRC_GroupSay(group, echochan[], msg[]) {
   return IRC_GroupSay(group, echochan, msg);
}

// put THIS part in your filterscript \/
/* inside some form of scope, like your weapon hack ban part */
CallRemoteFunction("pub_IRC_GroupSay", "dss", 0xFF0000, s, string);
Reply
#8

pawn Код:
C:\Users\Alex\Desktop\Otros\CodSamp\codsamp_aw\filterscripts\AlexTest.pwn(23) : error 025: function heading differs from prototype
C:\Users\Alex\Desktop\Otros\CodSamp\codsamp_aw\filterscripts\AlexTest.pwn(24) : error 017: undefined symbol "IRC_GroupSay"
Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase


2 Errors.
Reply
#9

Read my post properly.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)