15.06.2014, 19:55
Hello guys, Today I will show you a tutorial about "Creating IRC Commands" , I will show you how to create commands like !say
Requirements: IRC Plugin, IRC Include, You can find it over here : IRC Plugin
Okay Lets begin now.
Step 1:
Open pawno.exe and open your gamemode or create a filterscript
:
Go to top of your script near #include <a_samp> or any other include add this line
Step 3:
Go at the OnGameModeInit function end or OnFilterScriptInit end and do like this:
Step 4:
After adding your code like what will it do like Kick etc.. add this at the end of command:
Step 5:
Looks like you are done creating it now...
Well this is a example how it will look like:
Step 6:
Now start mIRC or the IRC Program like mIRC and connect to your server. Download mIRC from here == download
Step 7:
Now go in game , get in server and go to mIRC program and enter IRC and add your command in the chat box. Example :
Thats all... You are finished now.. Enjoy!
Notice: If you like it or learn something please +REP me I really need it.
Requirements: IRC Plugin, IRC Include, You can find it over here : IRC Plugin
Okay Lets begin now.
Step 1:
Open pawno.exe and open your gamemode or create a filterscript
:
Go to top of your script near #include <a_samp> or any other include add this line
Code:
#include <irc>
Go at the OnGameModeInit function end or OnFilterScriptInit end and do like this:
Code:
IRCCMD:myirccommand(botid, channel[], user[], host[], params[]) { // Add here what will it do like this command will kick player id 1
After adding your code like what will it do like Kick etc.. add this at the end of command:
Code:
} return 1; }
Looks like you are done creating it now...
Well this is a example how it will look like:
Code:
IRCCMD:kickid1(botid, channel[], user[], host[], params[]) { if (IRC_IsOp(botid, channel, user)) { SendClientMessage(1,-1," You were removed from the server by %s from the IRC", user); Kick(1); new string[128]; format(msg, sizeof(string), "**NOTICE: %s has kicked ID 1 out of the server**", user); // This is to announce it to the in IRC Say(channel,string); format(msg, sizeof(string), "**NOTICE:ID 1 has been kicked by %s from the server IRC**", user); SendMessageToAll(-1, string); } return 1; }
Now start mIRC or the IRC Program like mIRC and connect to your server. Download mIRC from here == download
Step 7:
Now go in game , get in server and go to mIRC program and enter IRC and add your command in the chat box. Example :
Code:
!kickid1 - If I used that, It'll kick whoever has ID 1 with a message that he has been kicked by you
Notice: If you like it or learn something please +REP me I really need it.