[Tutorial] Create a server with Mod Checker
#1

Create a server with Mod Checker

Introduction

Have you ever want to create a server that requires player to have mod?
For example, You want your server to have a cool animation a modified one.
But for players who don't have mod. They'll still have the default animation.
You don't want that right?. There is a way to check if they have mod.
But this is not very efficient. And this one doesn't check the directory!!!

How do i create it?

You might want to study about dialogs. Else you'll end up asking how to do this.

1.) Ask the player if he/she has the mod. He/She has Yes or No choices.

Hint: When player connects, Show a dialog that ask if he/she has the complete requirement mod.
If you don't want to show the dialog everytime the relog player connects. Create a system that saves if player
has already passed the question and save it to file and load it again when they connect. The dialog style must be DIALOG_STYLE_MSGBOX.

2.) After the question, Pop-up a dialog which shows question, Player must type it not choose it, So this one will require the dialog style, DIALOG_STYLE_INPUT.

Hint: After player answer the Yes or No choices response it using OnDialogResponse then pop this dialog. You can either make the dialog with 1 choices or 2 choices. But it is your choice. You need to strcmp to check if player type the correct answer, You can create many questions. But make sure you do it properly. If the answer didn't match in strcmp else kick. (Make sure it is Kick Delay)

3.) After the player answer all questions correctly, Then make him/her spawn or go to class selection. Easy as a pie!

Hint: Go to OnDialogResponse, go to the last dialogID response. Then under the strcmp, if player answer the question correctly, Make him/her spawn or make him/her on class selection.

Credits

Jake_Hero for the tutorial and the idea.
Reply


Messages In This Thread
Create a server with Mod Checker - by JaKe Elite - 13.07.2013, 05:23
Re: Create a server with Mod Checker - by Luis- - 13.07.2013, 09:49
Re: Create a server with Mod Checker - by JaKe Elite - 14.07.2013, 01:23
Re: Create a server with Mod Checker - by Bakr - 14.07.2013, 03:13
Re: Create a server with Mod Checker - by n0minal - 14.07.2013, 03:22
Re: Create a server with Mod Checker - by ThePhenix - 14.07.2013, 03:24

Forum Jump:


Users browsing this thread: 1 Guest(s)