[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
#2

This shows nothing. The player could press 'Yes' even if they don't have the mod.
Reply
#3

You don't really understand don't you?
You just skip the tutorial.

"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)"

Another one

"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."

I didn't just do, If player presses Yes he'll spawn directly. He'll go through questions about the mod first.
Reply
#4

Okay?

They can still figure out the correct answers without having to have the mod installed.
Reply
#5

Good idea but it's not efficient...
Reply
#6

Quote:
Originally Posted by n0minal
View Post
Good idea but it's not efficient...
If it's not efficient, it's not a good idea.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)