How to add IRC System in sa-mp gamemode! - Printable Version +- Post4VPS Forum | Free VPS Provider (https://post4vps.com) +-- Forum: VPS Discussion (https://post4vps.com/Forum-VPS-Discussion) +--- Forum: Tutorials (https://post4vps.com/Forum-Tutorials) +--- Thread: How to add IRC System in sa-mp gamemode! (/Thread-How-to-add-IRC-System-in-sa-mp-gamemode) Pages:
1
2
|
How to add IRC System in sa-mp gamemode! - Ultraz - 09-23-2017 Adding IRC to the gamemode We will: * The Plugin and Include File (http://forum.sa-mp.com/showthread.php?t=98803) * My Own IRC System (http://forum.sa-mp.com/showthread.php?t=615893) - Ultraz IRC System Let's Get Started! At the includes part you'll add this to include the irc in the script Code: #include <irc> Now to contain the bots This will be the name of your bot so when any guest joins your irc channel will find the bot with this name Code: #define BOT_1_NICKNAME "1stBot" This for the first bot too, when the guest click on 'who is' or use /whois command on irc will get these info Code: #define BOT_1_REALNAME "My 1st Bot" [Important] Now lets set up the connection of irc network,channel,etc. First we must register the channel we want in any network (I prefer pool.irc.tl [irc.tl] ) You'll go to the channel you want then login/identify with your nickname then use the command of: /cs register #yourchannel it will give you the owner rank on IRC Code: #define IRC_SERVER "pool.irc.tl" Lets end defines part You can connect 5 bots in the IRC Channel, but my opinion to make them 2 only, even if you have 100+ players in your samp server 2 bots will be enough Code: #define MAX_BOTS (1) Codes of connecting Bots This is getting the bots id and grouping them, in our case only 1 bot, gBot is for ex. I used it on Ultraz IRC System. Code: new gBotID[MAX_BOTS], gGroupID; OnFilterScriptInit if filterscript, if in gamemode will be OnGameModeInit Code: public OnFilterScriptInit() // If filterscript Code: gBotID[0] = IRC_Connect(IRC_SERVER, IRC_PORT, BOT_1_NICKNAME, BOT_1_REALNAME, BOT_1_USERNAME); Now this is the delay, It will connect the several bots and giving your server time to load all the codes of the IRC Script, 20 is the seconds for Ex. Code: IRC_SetIntData(gBotID[0], E_IRC_CONNECT_DELAY, [color=red]20[/color]); Okay, here the OnPlayerConnect partition, when player connected it'll send message (%s has connected to the server). Code: public OnPlayerConnect(playerid) Here the OnPlayerText part, it'll echo when player talk or send messages to the main chat Code: public OnPlayerText(playerid, text[]) These callbacks is already in the IRC include. Code: public IRC_OnConnect(botid, ip[], port) !msg command Ok, I made many commands in my own IRC System which it's Link is mentioned above, I made their many commands, I'll show example of how to make 1 of them like (!msg to speak from IRC to game) Code: IRCCMD:msg(botid, channel[], user[], host[], params[]) //making the command, in this case "say" More tutorials is coming soon, I just made small & short one to help people, any question reply down or PM me. RE: How to add IRC System in sa-mp gamemode! - Ultraz - 09-24-2017 (09-24-2017, 11:36 AM)arsalahmed786 Wrote: @Ultraz WOW Great tutorial. Actually i'm not SAMP player. Hope it's workable for them whom want it. There a lots of people who want SAMP related tutorials.I will try to make tutorial about VPSs soon when I get free time, thanks for feedback bruh. (09-24-2017, 12:17 PM)AmirGT Wrote: Nice work Ultraz and keep it up but can I make this bot admin and control it while I'm not in game?Yes you can from mobile or laptop or computer, you can use mIRC for PC and AndroIRC or IRC Cloud on mobile then connect to your IRC Network and channel and use /op "Bot Nickname" it'll get Operator position in channel RE: How to add IRC System in sa-mp gamemode! - Zorono - 09-26-2017 @Ultraz Great Tutorial for newbies, keep it up - waiting more tutorials from you... Edit: gGroupID variable isn't assigned to any Group on OnGameModeInit callback missing code: Code: public OnGameModeInit() RE: How to add IRC System in sa-mp gamemode! - Ultraz - 09-27-2017 (09-26-2017, 05:25 PM)Zorono Wrote: @Ultraz Great Tutorial for newbies, keep it upgGroupID variable is not assigned to anyone its just a name / text anyone can change it to his own defines, as well I typed above that it is my variable on UltraZ IRC system ( which I have mentioned above ) and Noaph ( other filterscript creator ) used same so it would be easy for newbies which will just copy my commands without knowing how to change variables. Ultraz. RE: How to add IRC System in sa-mp gamemode! - OldMeister - 10-03-2017 thats very good tutorial! i will make this irc bots when i will have time... i own a server in samp and its very usefull for me RE: How to add IRC System in sa-mp gamemode! - Ultraz - 10-05-2017 (10-03-2017, 05:59 AM)OldMeister Wrote: thats very good tutorial! i will make this irc bots when i will have time... i own a server in samp and its very usefull for me Good luck dude any help you want pm me here on forum and I will surely help you :') RE: How to add IRC System in sa-mp gamemode! - youssefbasha - 10-10-2017 @Ultraz Iam having some problems as i type irc.tl and it doesn't connect, do you have any solution for this problem? RE: How to add IRC System in sa-mp gamemode! - Ultraz - 10-10-2017 (10-10-2017, 02:40 PM)youssefbasha Wrote: @Ultraz IRC.TL changed the server hostname to pool.irc.tl not irc.tl then it will connect ✋ RE: How to add IRC System in sa-mp gamemode! - youssefbasha - 10-11-2017 (10-10-2017, 08:44 PM)Ultraz Wrote: IRC.TL changed the server hostname to pool.irc.tl not irc.tl then it will connect ✋ Oh, okay thx! It worked with me now but can you add IRCCMD:oban? I need it to much so if you don't mind to add it / send it on pm. RE: How to add IRC System in sa-mp gamemode! - Ultraz - 10-12-2017 (10-11-2017, 04:32 AM)youssefbasha Wrote: Oh, okay thx! Ok i will surely add it here on this tutorial thread, but if you really need it you will find it on my IRC System on sa-mp forums (link above in the thread). |