Raised This Month: $51 Target: $400
 12% 

Blockmaker Guide: How to add your own blocks!


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
SpNiz
Junior Member
Join Date: Dec 2008
Old 01-04-2009 , 19:36   Blockmaker Guide: How to add your own blocks!
Reply With Quote #1

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
SpNiz is offline
commonbullet
Veteran Member
Join Date: Oct 2005
Old 01-04-2009 , 20:24   Re: Blockmaker Guide: How to add your own blocks!
Reply With Quote #2

I think it's a good idea to write tutorials like this when you feel that a plugin/module is hard to be used or it's not adequately documented at all.
I don't know if this fits here though - it tends to disappear and get forgotten; maybe there could be a proper section in wiki for that purpose.

You could use "pawn" tags to wrap code parts.
commonbullet is offline
Send a message via ICQ to commonbullet Send a message via MSN to commonbullet
SnoW
Veteran Member
Join Date: Oct 2008
Location: Finland WisdomNuggets: 8
Old 01-31-2009 , 15:19   Re: Blockmaker Guide: How to add your own blocks!
Reply With Quote #3

Quote:
Originally Posted by Xide* View Post
I cant do it :S // plz help mee
If you are wanting more blocks: I suggest that you search for some scripter who could do it for u. Though usually making private BMs is paid work, but it depends a little bit.
If you just tried to edit that nuke, how do u think that anyone can help u, if you just say -> Help me. You should say what's not working, what u don't understand and with what u need help, maybe even post some code.

Last edited by SnoW; 06-25-2009 at 15:57.
SnoW is offline
Send a message via MSN to SnoW
Lchriaz
Senior Member
Join Date: Nov 2008
Location: Venezuelaa - Anzoategui
Old 02-17-2009 , 03:05   Re: Blockmaker Guide: How to add your own blocks!
Reply With Quote #4

I have a Dude, I gonna change The texture on the Death y change only de line 136

gszBlockModelDeath[] = "models/blockmaker/bm_block_New_death.mdl";

Only this i change? when i change only this. the server Give one error

He said The bm_block_New_death.mdl not found!

I need change the model on the Small model and the large model but i dont se wheree Oo


SORRY FOR ME INGLISH
Lchriaz is offline
Rak777
Junior Member
Join Date: Aug 2008
Old 02-23-2009 , 11:54   Re: Blockmaker Guide: How to add your own blocks!
Reply With Quote #5

How can i make that a block gives a AWP with 1 bullet `?
Rak777 is offline
Rak777
Junior Member
Join Date: Aug 2008
Old 02-23-2009 , 14:55   Re: Blockmaker Guide: How to add your own blocks!
Reply With Quote #6

If i change anything in the sma nothing happen even if i delete the sma still the plugin work
Rak777 is offline
S0ldi3rDK
Member
Join Date: Feb 2009
Old 03-20-2009 , 19:17   Re: Blockmaker Guide: How to add your own blocks!
Reply With Quote #7

I have a problem... Iv'e made my own blocks and called them my own names - the normal, large and small indeed.

Iv'e done the blockmaker_v.4.01 settings???

// block models
new const gszBlockModelDefault[] = "models/blockmaker/bm_block_default23.mdl";
new const gszBlockModelPlatform[] = "models/blockmaker/bm_block_platform14.mdl";
new const gszBlockModelBhop[] = "models/blockmaker/bm_block_bunnyhop1.mdl";
new const gszBlockModelDamage[] = "models/blockmaker/bm_block_damage4.mdl";
new const gszBlockModelHealer[] = "models/blockmaker/bm_block_healer7.mdl";
new const gszBlockModelInvincibility[] = "models/blockmaker/bm_block_invincibility10.mdl";
new const gszBlockModelStealth[] = "models/blockmaker/bm_block_stealth18.mdl";
new const gszBlockModelSpeedBoost[] = "models/blockmaker/bm_block_speedboost17.mdl";
new const gszBlockModelNoFallDamage[] = "models/blockmaker/bm_block_nofalldamage12.mdl";
new const gszBlockModelIce[] = "models/blockmaker/bm_block_ice9.mdl";
new const gszBlockModelDeath[] = "models/blockmaker/bm_block_death5.mdl";
new const gszBlockModelNuke[] = "models/blockmaker/bm_block_nuke13.mdl";
new const gszBlockModelCamouflage[] = "models/blockmaker/bm_block_camouflage2.mdl";
new const gszBlockModelLowGravity[] = "models/blockmaker/bm_block_lowgravity11.mdl";
new const gszBlockModelFire[] = "models/blockmaker/bm_block_fire6.mdl";
new const gszBlockModelRandom[] = "models/blockmaker/bm_block_random15.mdl";
new const gszBlockModelSlap[] = "models/blockmaker/bm_block_slap16.mdl";
new const gszBlockModelHoney[] = "models/blockmaker/bm_block_honey8.mdl";
new const gszBlockModelBarrierCT[] = "models/blockmaker/bm_block_barrier_ct3.mdl";
new const gszBlockModelBarrierT[] = "models/blockmaker/bm_block_barrier_t19.mdl";
new const gszBlockModelBootsOfSpeed[] = "models/blockmaker/bm_block_bootsofspeed25.mdl";
new const gszBlockModelGlass[] = "models/blockmaker/bm_block_glass22.mdl";
new const gszBlockModelBhopNoSlow[] = "models/blockmaker/bm_block_bhop_noslow26.mdl";
new const gszBlockModelAutoBhop[] = "models/blockmaker/bm_block_autobhop24.mdl";

And these? :

; Custom - Add 3rd party plugins here
blockmaker_v4.01.amxx
frostnades.amxx
kz_ljs_xm_100aa.amxx
amx_adminmodel.amxx
afkkicker.amxx
plugin_trail.amxx
kzm_scriptdetector.amxx
hidenseek.amxx
admin_chat_colors.amxx
speclist.amxx
admin_check.amxx
csstrike.amxx

Iv'e added all my own blocks in: C:\HLDS\cstrike\models\blockmaker

And in C:\HLDS\cstrike\addons\amxmodx\configs.ini - blockmaker_models.ini this:

PLATFORM14
BUNNYHOP1
DAMAGE4
HEALER7
NOFALLDAMAGE12
ICE9
TRAMPOLINE20
SPEEDBOOST17
INVINCIBILITY10
STEALTH18
DEATH5
NUKE13
CAMOUFLAGE2
LOWGRAVITY11
FIRE6
SLAP16
RANDOM15
HONEY8
BARRIER_CT3
BARRIER_T19
BOOTSOFSPEED25
GLASS22
BHOP_NOSLOW26
AUTO_BHOP24
DEFAULT23


But when i'm running my server it says this:

Mod_NumForName: models/blockmaker/bm_block_platform.mdl not found

What is from ??

S0ldi3r
S0ldi3rDK is offline
mazamorritandres
BANNED
Join Date: Jun 2009
Location: peru
Old 06-25-2009 , 15:12   Re: Blockmaker Guide: How to add your own blocks!
Reply With Quote #8

cl_weather 0 for more fps
mazamorritandres is offline
D-TOX
Member
Join Date: Mar 2008
Old 09-05-2009 , 10:36   Re: Blockmaker Guide: How to add your own blocks!
Reply With Quote #9

I don't know anything about coding plugins, but with the help of this tutorial I managed to do : Glass BHOP, Low Trampoline, Damage BHOP, Duck Spam.

This is very useful ! Thanks for sharing !
__________________
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
░█▀▀ ░█▀█ ░█ ░█▀▀ ░░█▀▀ ░█▀█ ░█ ░█░░░
░█▀▀ ░█▀▀ ░█ ░█ ░░░░█▀▀ ░█▀█ ░█ ░█░░░
░▀▀▀ ░▀ ░░░▀ ░▀▀▀ ░░▀ ░░░▀░▀ ░▀ ░▀▀▀░
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
D-TOX is offline
martin olli
New Member
Join Date: Nov 2009
Old 11-05-2009 , 14:32   Re: Blockmaker Guide: How to add your own blocks!
Reply With Quote #10

I dont understand this:

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

please elaborate this a little better or make an image link with how to do it.

I would be very grateful if I could get some help
martin olli is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 08:54.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode