AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Knfie damage (https://forums.alliedmods.net/showthread.php?t=229688)

ownedin3d 11-12-2013 13:24

Knfie damage
 
Hello, i'm trying to make so that when you purhcase a super knife, it will deal 188 damage i've tried doing this

PHP Code:

 case 7:  
        { 
            if(
cs_get_user_money(id) < 16000)
            {
                
client_printidprint_chat,"%L",id"SHOP_ITEM_LOST");
                return 
PLUGIN_HANDLED;
            }
            else
            {            
         
           
cs_take_user_money(id16000)
           if( 
get_user_weapon(id) == CSW_KNIFE ) {
                 
SetHamParamFloat(0100.0)  
            
            
            }
                
client_printidprint_chat,"%L",id"SHOP_ITEMT_7");
            }
        } 

but it don't wrok, anyone here can help me ?

+KARMA

simanovich 11-12-2013 13:44

Re: Knfie damage
 
You kidding right?

SetHamParam* only work in Ham forwards in pre method

ownedin3d 11-14-2013 15:39

Re: Knfie damage
 
What would i do now then?

baneado 11-14-2013 17:44

Re: Knfie damage
 
register takedamage forward with hamsandwich
check valid attacker
check user weapon is a knife
modify the param damage

ConnorMcLeod 11-15-2013 00:38

Re: Knfie damage
 
Quote:

Originally Posted by ownedin3d (Post 2060910)
What would i do now then?

Either you learn bases, either you stop asking for help in scripting/help forum and you aks for full plugins in suggestion/request forum.
I suggest you to go back to easy plugins and to learn more.

ownedin3d 11-15-2013 11:20

Re: Knfie damage
 
i can do alot of easy stuff with Pawn, but i just simply can't figure this out. Help me out with this one man..

baneado 11-15-2013 16:04

Re: Knfie damage
 
Quote:

Originally Posted by ownedin3d (Post 2061178)
i can do alot of easy stuff with Pawn, but i just simply can't figure this out. Help me out with this one man..

again...
Quote:

Originally Posted by baneado (Post 2060941)
register takedamage forward with hamsandwich
check valid attacker
check user weapon is a knife
modify the param damage



All times are GMT -4. The time now is 23:14.

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