Raised This Month: $32 Target: $400
 8% 

Blockmaker - Adding Blocks (12 Step) In-Depth | Updated 12/24/2013!


Post New Thread Reply   
 
Thread Tools Display Modes
kalaspuffar
Junior Member
Join Date: May 2010
Old 05-29-2010 , 15:51   Re: Blockmaker - Adding Blocks (Step-By-Step)
Reply With Quote #181

Quote:
Originally Posted by RaxiCax View Post
How to make a awp block and deagle block to blockmaker v4.01 necro?
- The Deagle can i good make but the Awp i cant Help me plz
I added Deagle, Awp and Usp. U can use it if u want
btw, nice tut.

here is the sma RaxiCax:
Attached Files
File Type: sma Get Plugin or Get Source (blockmaker.sma - 1107 views - 165.6 KB)
kalaspuffar is offline
GXLZPGX
Veteran Member
Join Date: Sep 2009
Old 05-29-2010 , 15:53   Re: Blockmaker - Adding Blocks (Step-By-Step)
Reply With Quote #182

Quote:
Originally Posted by kalaspuffar View Post
I added Deagle, Awp and Usp. U can use it if u want
btw, nice tut.

here is the sma RaxiCax:
Thanks.
__________________
Currently accepting payment US DOLLARS ONLY for custom plugins, contact me through PM.
GXLZPGX is offline
Old 05-29-2010, 15:55
kalaspuffar
This message has been deleted by kalaspuffar. Reason: missunderstood
kalaspuffar
Junior Member
Join Date: May 2010
Old 05-29-2010 , 16:35   Re: Blockmaker - Adding Blocks (Step-By-Step)
Reply With Quote #183

With to much sparetime I added poles to it also (not tested) so try save, delete and copy the poleblocks and see if the work.
So Usp,Awp,Deagle and poles

Attached Files
File Type: sma Get Plugin or Get Source (blockmaker.sma - 660 views - 168.6 KB)
kalaspuffar is offline
GXLZPGX
Veteran Member
Join Date: Sep 2009
Old 05-29-2010 , 16:44   Re: Blockmaker - Adding Blocks (Step-By-Step)
Reply With Quote #184

Quote:
Originally Posted by kalaspuffar View Post
With to much sparetime I added poles to it also (not tested) so try save, delete and copy the poleblocks and see if the work.
So Usp,Awp,Deagle and poles

No. 26 Errors.
__________________
Currently accepting payment US DOLLARS ONLY for custom plugins, contact me through PM.
GXLZPGX is offline
kalaspuffar
Junior Member
Join Date: May 2010
Old 05-29-2010 , 16:50   Re: Blockmaker - Adding Blocks (Step-By-Step)
Reply With Quote #185

Quote:
Originally Posted by GXLZPGX View Post
No. 26 Errors.
hmmm... How can i get thoose errors when I havent change anything about isBlock etc ?
kalaspuffar is offline
r4ndomz
Senior Member
Join Date: Jul 2009
Location: The Hood
Old 06-07-2010 , 21:59   Re: Blockmaker - Adding Blocks (Step-By-Step)
Reply With Quote #186

I had the same errors with that when i was helping my friend with that. Why is that?
__________________
HideNSeek bug fixed here:http://forums.alliedmods.net/showpos...&postcount=951

PM me if you want a nice HideNSeek shop
NEED PLUGIN TESTERS PM ME
r4ndomz is offline
Send a message via Skype™ to r4ndomz
KiWigamez0r
Junior Member
Join Date: Aug 2009
Old 06-08-2010 , 04:33   Re: Blockmaker - Adding Blocks (Step-By-Step)
Reply With Quote #187

Quote:
Originally Posted by kalaspuffar
hmmm... How can i get thoose errors when I havent change anything about isBlock etc ?
From what I understand, the reason that you often receive precisely 26 errors is because amxx studio will only display a maximum of 26 errors. If you receive 26 errors, the chances are that there are actually more than 26 errors in your code.

In your case, the majority of the errors consisted of undefined functions. I have had this error many times when adding new things to my customization of necro's blockmaker, so I will try to explain (with the best of my limited knowledge) why these errors occur (bear in mind I could be wrong).

I believe these errors were due to some of your functions not being properly closed off with a }. This caused amxx studio to confuse the beginning of the next function with the end of the prior, causing all of the functions after that first one to appear as undefined. This is why you received errors for functions you had not edited.

Here is an example:
PHP Code:
case LARGE:
            {
                
setBlockModelNameLarge(szBlockModelgszBlockModels[blockType], 256);
                
fScale SCALE_LARGE;
                        case 
POLE:
            {
                
setBlockModelNamePole(szBlockModelgszBlockModels[blockType], 256);
                
fScale SCALE_POLE;
            } 

Note that there is no } after the LARGE case. The corrected form of this would be:


PHP Code:
case LARGE:
            {
                
setBlockModelNameLarge(szBlockModelgszBlockModels[blockType], 256);
                
fScale SCALE_LARGE;
            } 
// <------ HERE IS THE CORRECTED }
            
case POLE:
            {
                
setBlockModelNamePole(szBlockModelgszBlockModels[blockType], 256);
                
fScale SCALE_POLE;
            } 
A good way of preventing this is remembering to indent after every { and to close indent after every }.

In addition, from memory there were 2 other issues with your code. The first being that you had defined POLES at the beginning of your code, but used POLE for every instance after. So I simply removed the S from the first instance.
The second was that you had not defined the constants for the sprites of the trampoline, fire and speedboost in pole size (at the beginning of your code). I simply added some non-existent sprites in the same manner as the other ones. You would have to create and add these sprites for them to actually work.


I have uploaded a copy of your customized blockmaker where I have fixed all the errors that I found. It should now compile, but if it doesn't, let me know .
Attached Files
File Type: sma Get Plugin or Get Source (blockmaker.sma - 774 views - 168.9 KB)
KiWigamez0r is offline
kalaspuffar
Junior Member
Join Date: May 2010
Old 06-09-2010 , 09:37   Re: Blockmaker - Adding Blocks (Step-By-Step)
Reply With Quote #188

complied fine
kalaspuffar is offline
GXLZPGX
Veteran Member
Join Date: Sep 2009
Old 06-09-2010 , 14:28   Re: Blockmaker - Adding Blocks (Step-By-Step)
Reply With Quote #189

Quote:
Originally Posted by kalaspuffar View Post
complied fine
Compiled*
__________________
Currently accepting payment US DOLLARS ONLY for custom plugins, contact me through PM.
GXLZPGX is offline
Whaat93
Senior Member
Join Date: Mar 2010
Old 06-12-2010 , 17:16   Re: Blockmaker - Adding Blocks (Step-By-Step)
Reply With Quote #190

Can people give us/me some Action to diffirent stuff? I post all i see on this site so it make it easier to other to see.

PHP Code:
                       DEAGLE

actionDeagle
(id

    if (
is_user_alive(id) && !DeagleUsed[id] && get_user_team(id) == 1
        { 
        
give_item(id"weapon_deagle"); 
        
cs_set_weapon_ammo(find_ent_by_owner(1"weapon_deagle"id), 1); 
        
DeagleUsed[id] = true
        new 
deaglename[42]; 
        
get_user_name(iddeaglename32); 
        
set_hudmessage(255255255, -1.0, -1.006.04.0); 
        
show_hudmessage(0"Be careful CT! %s has a Deagle!"deaglename); 
    } 


                                                 
DAMAGE

actionDamage
(id

    if (
halflife_time() >= gfNextDamageTime[id]) 
    { 
        if (
get_user_health(id) > 0
        { 
            new 
Float:amount get_cvar_float("bm_damageamount"); 
            
fakedamage(id"damage block"amountDMG_CRUSH); 
        } 
  
        
gfNextDamageTime[id] = halflife_time() + 0.5
    } 
}  

                           
AWP

actionAwp
(id

    if (
is_user_alive(id) && !AwpUsed[id] && get_user_team(id) == 1
        { 
        
give_item(id"weapon_awp"); 
        
cs_set_weapon_ammo(find_ent_by_owner(1"weapon_awp"id), 1); 
        
AwpUsed[id] = true
        new 
awpname[42]; 
        
get_user_name(idawpname32); 
        
set_hudmessage(255255255, -1.0, -1.006.04.0); 
        
show_hudmessage(0"Be careful CT! %s has a awp!"awpname); 
    } 
}  

                    
DAMAGE BHOP

action_DMGBhop
(ident

    if ( 
get_gametime() >= gfDmgBhopNextUse[id] ) 
        { 
            new 
fDamage 10
            
fakedamage(id"Damage block"fDamageDMG_CRUSH); 
  
            
gfDmgBhopNextUse[id] = get_gametime() + 0.5
  
            if ( !
task_exists(TASK_SOLIDNOT ent) && !task_exists(TASK_SOLID ent) ) 
            { 
            
set_task(0.1"task_SolidNot"TASK_SOLIDNOT ent); 
            } 
        } 
}  

                   
FROSTNADE

actionFrostGrenade
(idOverrideTimer

    
//get game time 
    
new Float:fTime halflife_time(); 
  
    
//make sure player is alive 
    
if (fTime >= gfFrostGrenadeNextUse[id] || OverrideTimer
    { 
        if ( 
get_user_team id ) == 
        { 
        
give_item(id"weapon_smokegrenade"); 
        } 
  
        
//set the time when player can use frost grenade again 
        
gfFrostNextUse[id] = fTime get_cvar_float("bm_frostgrenadecooldown"); 
  
        
//setup hud message to show who nuked what team 
        
set_hudmessage(2552550, -1.00.3506.010.01.01.0); 
  
    } 
    else 
    { 
        
set_hudmessage(gHudRedgHudGreengHudBluegfTextXgfTextYgHudEffectsgfHudFxTimegfHudHoldTimegfHudFadeInTimegfHudFadeOutTimegHudChannel); 
        
show_hudmessage(id"FROSTNADE BLOCK NEXT USE AFTER 1 ROUND"gfFrostNextUse[id] - fTime); 
    } 
}  

                           
FLASH GRENADE

actionFlashGrenade
(idOverrideTimer

    
//get game time 
    
new Float:fTime halflife_time(); 
  
    
//make sure player is alive 
    
if (fTime >= gfFlashGrenadeNextUse[id] || OverrideTimer
    { 
        
give_item(id"weapon_flashbang"); 
        { 
            
//omg 
        

  
        
//set the time when player can use flash grenade again 
        
gfFlashNextUse[id] = fTime get_cvar_float("bm_flashgrenadecooldown"); 
  
        
//setup hud message to show who nuked what team 
        
set_hudmessage(2552550, -1.00.3506.010.01.01.0); 
  
    } 
    else 
    { 
        
set_hudmessage(gHudRedgHudGreengHudBluegfTextXgfTextYgHudEffectsgfHudFxTimegfHudHoldTimegfHudFadeInTimegfHudFadeOutTimegHudChannel); 
        
show_hudmessage(id"FLASH BLOCK NEXT USE AFTER 1 ROUND"gfFlashNextUse[id] - fTime); 
    } 
}  
 
                            
HE GRENATE

actionHeGrenade
(idOverrideTimer

    
//get game time 
    
new Float:fTime halflife_time(); 
  
    
//make sure player is alive 
    
if (fTime >= gfHENextUse[id] || OverrideTimer
    { 
        
//ID HE 
        
give_item(id"weapon_hegrenade"); 
        { 
            
//omg 
        

  
        
//set the time when the player can use the nuke again (someone might have been invincible) 
        
gfHENextUse[id] = fTime get_cvar_float("bm_hecooldown"); 
  
        
//setup hud message to show who nuked what team 
        
set_hudmessage(2552550, -1.00.3506.010.01.01.0); 
  
    } 
    else 
    { 
        
set_hudmessage(gHudRedgHudGreengHudBluegfTextXgfTextYgHudEffectsgfHudFxTimegfHudHoldTimegfHudFadeInTimegfHudFadeOutTimegHudChannel); 
        
show_hudmessage(id"NEXT USE AFTER 1 ROUND"gfHENextUse[id] - fTime); 
    } 
}  

                          
MONEY

actionMoney
(idOverrideTimer

    
//get game time 
    
new Float:fTime halflife_time(); 
  
    
//make sure player is alive 
    
if (fTime >= gfMoneyNextUse[id] || OverrideTimer
    { 
        
cs_set_user_money(idcs_get_user_money (id) + 5000) ; 
        { 
            
//omg 
        

  
        
//set the time when the player can use the nuke again (someone might have been invincible) 
        
gfMoneyNextUse[id] = fTime get_cvar_float("bm_moneycooldown"); 
  
        
//setup hud message to show who nuked what team 
        
set_hudmessage(2552550, -1.00.3506.010.01.01.0); 
  
    } 
    else 
    { 
        
set_hudmessage(gHudRedgHudGreengHudBluegfTextXgfTextYgHudEffectsgfHudFxTimegfHudHoldTimegfHudFadeInTimegfHudFadeOutTimegHudChannel); 
        
show_hudmessage(id"MONEY NEXT USE AFTER 1 ROUND"gfMoneyNextUse[id] - fTime); 
    } 
}  

                               
LOW TRAMPOLINE

actionLowTrampoline
(id

    
//if trampoline timeout has exceeded (needed to prevent velocity being given multiple times) 
    
if (halflife_time() >= gfTrampolineTimeout[id]) 
    { 
        new 
Float:velocity[3]; 
  
        
//set player Z velocity to make player bounce 
        
entity_get_vector(idEV_VEC_velocityvelocity); 
        
velocity[2] = 250.0;                    //jump velocity 
        
entity_set_vector(idEV_VEC_velocityvelocity); 
  
        
entity_set_int(idEV_INT_gaitsequence6);           //play the Jump Animation 
  
        
gfTrampolineTimeout[id] = halflife_time() + 0.5
    } 
}  

                            
HIGH TRAMPOLINE

actionHighTrampoline
(id

    
//if trampoline timeout has exceeded (needed to prevent velocity being given multiple times) 
    
if (halflife_time() >= gfTrampolineTimeout[id]) 
    { 
        new 
Float:velocity[3]; 
  
        
//set player Z velocity to make player bounce 
        
entity_get_vector(idEV_VEC_velocityvelocity); 
        
velocity[2] = 750.0;                    //jump velocity 
        
entity_set_vector(idEV_VEC_velocityvelocity); 
  
        
entity_set_int(idEV_INT_gaitsequence6);           //play the Jump Animation 
  
        
gfTrampolineTimeout[id] = halflife_time() + 0.5
    } 
}  

                              
USP

actionUsp
(id

    if (
is_user_alive(id) && !UspUsed[id] && get_user_team(id) == 1
        { 
        
give_item(id"weapon_usp"); 
        
cs_set_weapon_ammo(find_ent_by_owner(1"weapon_usp"id), 1); 
        
UspUsed[id] = true
        new 
uspname[42]; 
        
get_user_name(iduspname32); 
        
set_hudmessage(255255255, -1.0, -1.006.04.0); 
        
show_hudmessage(0"All CTs Run , %s has a USP !!!!!"uspname); 
    } 

Whaat93 is offline
Reply


Thread Tools
Display Modes

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 04:11.


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