Gang67
|Jump out gang, we jump out those vehicles|
- May 5, 2017
- 303
- 54
Explanation
I'm sure there are plenty of other tutorials on how to do this and I'm sure most people already know how to do this but some people don't. This may not be the best tutorial but I would just like to help any new people to the community. I will be using the flux files which many people currently use. If you have any issues then please comment below and I will help you out. I am using Visual Studio 2017 in this tutorial and it will be similar to other versions which you may be using. You may need some knowledge on C# depending on what you would like to do but you can learn by online tutorials.
Requirements/Downloads
Setting up Visual Studio
Opening up the Solution
Editing Commands (Little C# Lesson)
Firstly, as I mentioned before I am still learning myself so the things I may say some of you pros may know a better way of doing stuff etc. But just remember I am new myself, thank you.
Debugging
This isn't the best of content as it doesn't provide how to add commands etc. If you would like more detail, please comment exactly what you would like to know! Thank you.
Previous thread (How to make a Habbo RP):
Credits to those who provided the FluxRP Files (@HendeR)
-Abdi
I'm sure there are plenty of other tutorials on how to do this and I'm sure most people already know how to do this but some people don't. This may not be the best tutorial but I would just like to help any new people to the community. I will be using the flux files which many people currently use. If you have any issues then please comment below and I will help you out. I am using Visual Studio 2017 in this tutorial and it will be similar to other versions which you may be using. You may need some knowledge on C# depending on what you would like to do but you can learn by online tutorials.
Requirements/Downloads
FluxRP Emulator:
How to setup FluxRP Emulator:
Visual Studio Community 2017:
You must be registered for see links
How to setup FluxRP Emulator:
You must be registered for see links
Visual Studio Community 2017:
You must be registered for see links
Setting up Visual Studio
1. When you install the installer you should be prompted with this screen [
2. Click the install button in the bottom right [
You must be registered for see links
] you must ensure that the '.NET desktop development' box is ticked. [
You must be registered for see links
]2. Click the install button in the bottom right [
You must be registered for see links
] (I already have it so it says Close for me)Opening up the Solution
1. You need to go to your emu file [
2. Open up the emu file and in it you should see 'Plus.sln' [
It will take some time to open, just wait!
When it is fully loaded it should look like this: [
You must be registered for see links
]2. Open up the emu file and in it you should see 'Plus.sln' [
You must be registered for see links
] It will take some time to open, just wait!
When it is fully loaded it should look like this: [
You must be registered for see links
] (May be a different colour)Commands aren't just based inside the same files, some commands use timers which are based in a different folder. For now on you should only be editing commands and adding very small commands which don't involve things such as timers if you're new to this/C#. This may not be the best description as I myself is quite new to all this!
1. On the right hand side you should see loads of folders, you need to open up 'HabboHotel' by double clicking it [
2. Inside the HabboHotel folder there should then be a 'Misc' folder, open it up by double clicking it [
3. Inside the Misc folder there should be a class (.cs) file called 'ChatCommandHandler', open it up by double clicking it [
ALTERNATIVE
Search for 'ChatCommandHandler' inside the search box [
1. On the right hand side you should see loads of folders, you need to open up 'HabboHotel' by double clicking it [
You must be registered for see links
]2. Inside the HabboHotel folder there should then be a 'Misc' folder, open it up by double clicking it [
You must be registered for see links
]3. Inside the Misc folder there should be a class (.cs) file called 'ChatCommandHandler', open it up by double clicking it [
You must be registered for see links
]ALTERNATIVE
Search for 'ChatCommandHandler' inside the search box [
You must be registered for see links
]Editing Commands (Little C# Lesson)
Firstly, as I mentioned before I am still learning myself so the things I may say some of you pros may know a better way of doing stuff etc. But just remember I am new myself, thank you.
To search through the file you can do [CTRL + F] and enter what you would like to search [
You must be registered for see links
]Summary: To add a new way to say the command you use the case "": function, a good way of looking at it is as an if statement. So, case ("cmnds") would be like saying if the user enters cmnds
You can add/remove ways to say the commands. For example for the command :stun, we could also add another way to say it by saying :taser and it'd do the same thing
To do this you need to firstly, find the command you want to edit. For this example I will be using :commands [
We will be focusing on the section that says case "[command]": [
If I would like to add another way to say :commands I could add something such as :cmnds, to do this I would add a new case below the current ones
This is the original:
This is my edit to add the ability to add :cmnds [
When you're doing this do not forgot to add the speech marks and also the colon at the end
You can add/remove ways to say the commands. For example for the command :stun, we could also add another way to say it by saying :taser and it'd do the same thing
To do this you need to firstly, find the command you want to edit. For this example I will be using :commands [
You must be registered for see links
]We will be focusing on the section that says case "[command]": [
You must be registered for see links
]If I would like to add another way to say :commands I could add something such as :cmnds, to do this I would add a new case below the current ones
This is the original:
Code:
#region :commands (INCOMPLETE)
case "commands":
case "cmds":
This is my edit to add the ability to add :cmnds [
You must be registered for see links
]
Code:
#region :commands (INCOMPLETE)
case "commands":
case "cmds":
case "cmnds":
When you're doing this do not forgot to add the speech marks and also the colon at the end
If statements are used to make programs robust (not break-able) so for example if I had a user in cuffs, without IF statements the user would be able to still walk and anyone would be able to cuff anyone, whether they're stunned or not.
What this means [
means 'The user is not close'
means 'If the users Job is not the valid job id'
means 'Send the user a whisper saying "Your job cannot do this" '
means 'If the session does not have Job Rights (police) and/or does not have job rights (gov) and/or doesnt have job rights (swat), send the user a whisper saying "Your job cannot do this!"
What this means [
You must be registered for see links
]:
Code:
bool isclose = false;
Code:
if (!JobManager.validJob(Session.GetRoleplay().JobId, Session.GetRoleplay().JobRank))
Code:
Session.SendWhisper("Your job cannot do this!", false, 34);
Code:
if (!Session.GetRoleplay().JobHasRights("police")
&& !Session.GetRoleplay().JobHasRights("gov")
&& !Session.GetRoleplay().JobHasRights("swat"))
Session.SendWhisper("Your job cannot do this!");
You can not just simply save the emu file and expect it to update, you must start debugging. This is very easy. To do this you need to click 'Start' in the top bar [
Allow it to debug for about 10 seconds then you can stop the debugging [
If you have an error it will not allow you to debug. Also if you try editing the code while you're debugging at the same time it wont let you. As well as if you try debugging whilst your original emu is open you'll recieve an error
You must be registered for see links
]Allow it to debug for about 10 seconds then you can stop the debugging [
You must be registered for see links
]If you have an error it will not allow you to debug. Also if you try editing the code while you're debugging at the same time it wont let you. As well as if you try debugging whilst your original emu is open you'll recieve an error
This isn't the best of content as it doesn't provide how to add commands etc. If you would like more detail, please comment exactly what you would like to know! Thank you.
Previous thread (How to make a Habbo RP):
You must be registered for see links
Credits to those who provided the FluxRP Files (@HendeR)
-Abdi