Blockmaker - How to: Convert a Nukeblock into a Bhopblock.
Made by: SpNiz @http://forums.alliedmods.net/
Plugin created by: Necro -
If requested by himself, if I in anyway help others to tamper with his code with this guide, he can take this guide down for no reason at all! Please respect ALL creators.
1. Intro:
So you've always wanted to be able to add more bhop blocks with different texture, but without knowing how to get started? I made this guide for you!
I have no scripting knowledge of my own, but with common sence I was able to add my own bhopblock and play, so can you! Hopefully this will be readable
and easy to understand, even if you don't know what you're doing.
(If the pictures somehow gets deleted, please send me a PM or reply in this thread to notificate me.
Questions about this guide stays in this thread, sending PM's to Necro and bother him if you need help with understanding the guide is NOT acceptable. If you need to discuss the plugin in any other way than adding/converting blocks, please do so in Necro's thread, not this!
2. Why this?
I found NO guide on the internet on how to add/change the current blocks into some different block, so I decided to write a guide to help others. The help I couldn't get!
3. Beginning:
IMPORTANT!!!!!!!!!!!!!!
(In order for the plugin to work if you change the block, you MUST have a block with the blockname ready in the blockmaker models folder).
(For this tutorial to work I must have a block file, small, normal and large with the same name as I choose here)
(This tutorial will need a block named: bm_block_bhoptut, bm_block_bhoptut_small, bm_block_bhoptut_large).
Creating your own texture is found here:
http://forums.alliedmods.net/showthread.php?t=67049
(In my example I will convert the "Nuke" block to another "Bhopblock" as I think the "Nuke" block is worthless on my server.)
- We begin with downloading "blockmaker_v4.01" created by "Necro":
http://forums.alliedmods.net/showthread.php?t=62967.
- Download "Pawn Studio":
http://forums.alliedmods.net/showthread.php?t=64767. (You can use whatever software you want)
- Create a map called "PawnStudio", then place all files included inside of the folder. Now extract "blockmaker_v4.01.sma" inside the folder.
- Open "Pawn Studio" and press CTRL+O (Shortcut to "Open File") open up your "blockmaker_v4.01.sma". You should now see the text.
STEP 1
---
Press "CTRL+F" to get up the searching window. Write "Nuke" then press "Find it". The program will then search for the first word containing "Nuke" and
highlight it:
http://i92.photobucket.com/albums/l13/spniz/TUt1-1.jpg
STEP 2
---
Change the "Nuke" to whatever you want the block to show up as in your menu. I will call my block "BhopTut"
(Example): gszBlockModels[BM_BHOPTUT] = gszBlockModelBhopTuT;
STEP 3
---
Press "CTRL+F" and press "Find it". It jumped down to line nr 517, scroll up abit and you'll see "precache_sound(gszNukeExplosion);" Delete!
STEP 4
---
CTRL+F - Find it. Line nr 760, replace "NUKE" with "BHOPTUT" and "NUKE with "BHOPTUT".
(Example): else if (equal(szType, "BHOPTUT")) blockType = BM_BHOPTUT;
STEP 5
---
CTRL+F - Find it. Line nr 1263, delete "case BM_NUKE: actionNuke(id, false);"
CTRL+F - Find it. Line nr 1518, delete " gfNukeNextUse[id] = 0.0;"
CTRL+F - Find it. Line nr 1765, highlight "actionNuke(id, OverrideTimer)" down to line nr 1837. In other words actionNuke(id, OverrideTimer) to line 1837
is getting deleted, including the }.
CTRL+F - Find it. Line nr 3664, delete "new Float:fNukeCooldown = get_cvar_float("bm_nukecooldown")".
CTRL+F - Find it. Line nr 3676, delete "fNukeCooldown,"
CTRL+F - Find it. Line nr 5714, replace "NUKE" with "BHOPTUT"
STEP 6
---
Now the hard part is over, let's move UP to line 137!
"new const gszBlockModelNuke[] = "models/blockmaker/bm_block_nuke.mdl";"
gszBlockModelNuke - Before
gszBlockModelBhopTut - After
bm_block_nuke.mdl - Before
bm_block_bhoptut.mdl - After
This line is being unchanged part from "nuke" as it's easier for me to change the blocktexture on the block later.
STEP 7
---
CTRL+F - Find it. Line nr 164, delete "new const gszNukeExplosion[] = "weapons/c4_explode1.wav"; //from CS"
CTRL+F - Find it. Line nr 236, delete "new Float:gfNukeNextUse[33];"
CTRL+F - Find it. Line nr 289, change "NUKE" to "BHOPTUT"
CTRL+F - Find it. Line nr 326, change "Nuke" to "BhopTut"
CTRL+F - Find it. Line nr 414, delete "register_cvar("bm_nukecooldown", "60.0"); //someone might have been invincible when it was used"
STEP 8
---
CTRL+F - Find it. Until you get a message from Pawn Studio, saying "Sorry, cannot find the string "Nuke".
CTRL+F. This time, search for "gMsgScreenFade". There should be 2 strings that you need to deleted.
1 " gMsgScreenFade = get_user_msgid("ScreenFade");"
2 "new gMsgScreenFade;"
STEP 9
---
To make your new block a bhopblock, so it dissapears after you've landed on it, you need to modify the text some more, but it's not much!
Scroll down/up to line 897 (OR SOMETHING LIKE THAT, IT MAY BE DIFFERENT FROM YOURS)
Before:
"if (blockType == BM_BHOP || blockType == BM_BARRIER_CT || blockType == BM_BARRIER_T || blockType == BM_BHOP_NOSLOW)"
In this line we will add "|| blockType == BM_BHOPTUT)"
After:
"if (blockType == BM_BHOP || blockType == BM_BARRIER_CT || blockType == BM_BARRIER_T || blockType == BM_BHOP_NOSLOW || blockType == BM_BHOPTUT)"
(NOTICE): I delete the ), and I added "|| blockType == BM_BHOPTUT)"
---
Move down to line nr 916 (OR SOMETHING LIKE THAT, IT MAY BE DIFFERENT FROM YOURS)
Before:
"else if (blockType == BM_BHOP || blockType == BM_BHOP_NOSLOW)"
After:
"else if (blockType == BM_BHOP || blockType == BM_BHOP_NOSLOW || blockType == BM_BHOPTUT)"
STEP 10
---
Press "File" - "Save File As" "blockmaker_v4.01.sma".
Put it in your scripting folder, compile and see if there's no errors. If ANY error occured, you've either messed something up or missed something
).
4. FAQ.
---
Q. Did you create this plugin?
A. No, I'm just a big fan of it, the original creator is "Necro"
http://forums.alliedmods.net/member.php?u=10950.
Q. Why did you write this guide?
A. Read "2. Why this?"
Q. I complied it correctly but I got an error saying "warning 204: symbol is assigned a value that is never used: gMsgScreenFade"
A. Edit your blockmaker_v4.01.sma and press CTRL+F, type "gMsgScreenFade" - Find it. Delete "new gMsgScreenFade;" And save.
Q. When I'm done with my editing and save my .sma, I get no new .sma file, but a 011-file instead.
A. When you save the file, you need the save to end with ".sma"
Example:
WRONG - blockmaker_v4.01 -> Save. = WRONG
RIGHT - blockmaker_v4.01.sma -> Save. = RIGHT
5. Final outcome.
http://i92.photobucket.com/albums/l13/spniz/TuTend2.jpg
http://i92.photobucket.com/albums/l13/spniz/TuTend.jpg