Raised This Month: $ Target: $400
 0% 

I need help with my plugin


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
thEsp
BANNED
Join Date: Aug 2017
Old 09-02-2019 , 05:10   Re: I need help with my plugin
Reply With Quote #1

Yup, you can call those functions/hooks via ExecuteHam[B] native. For more information about ham hooks check ham_const header, which tells you how to execute or register them.
thEsp is offline
Natsheh
Veteran Member
Join Date: Sep 2012
Old 09-02-2019 , 10:00   Re: I need help with my plugin
Reply With Quote #2

Quote:
Originally Posted by thEsp View Post
Yup, you can call those functions/hooks via ExecuteHam[B] native. For more information about ham hooks check ham_const header, which tells you how to execute or register them.
Yeah unless he used that(ExecuteHam) which I totally forgot about it.
__________________
@Jailbreak Main Mod v2.7.0 100%
@User Tag Prefix 100% done !
@Mystery Box 100% done !
@VIP System 100% done !

Natsheh is offline
Send a message via MSN to Natsheh Send a message via Skype™ to Natsheh
RayCodeCSC
Junior Member
Join Date: Sep 2019
Old 09-02-2019 , 12:17   Re: I need help with my plugin
Reply With Quote #3

I don't understand how to use those variables. I tried it as follows and wrote these errors (when I tried to compile it)

Code:
test.sma(21) : error 088: number of arguments does not match definition
test.sma(28) : error 017: undefined symbol "damage"
test.sma(28) : warning 221: label name "float" shadows tag name
test.sma(28) : warning 215: expression has no effect
test.sma(28) : error 001: expected token: ";", but found ")"
test.sma(28) : error 029: invalid expression, assumed zero
test.sma(28) : fatal error 107: too many error messages on one line
Here's the script code:
Code:
#include <amxmodx>
#include <amxmisc>
#include <fun>
#include <cstrike>
#include <hamsandwich>

new float:dmgSet = 30.0

public plugin_init()
{
	register_plugin("My first shop", "1.0", "RayCodeCSC")

	register_clcmd("say /test", "test_function")

	RegisterHam(Ham_TakeDamage, "player", "isDamaged")
}

public test_function(id)
{
	//What exactly do I write in brackets?
	isDamaged(float:dmgSet)
}

public isDamaged(victim, attacker, inflictor, float:dmgSet)
{
	if(get_user_weapon(attacker) == CSW_KNIFE)
	{
		SetHamParamFloat(4, damage * float:dmgSet)
	}
}
Can you please modify the code so that it is correct?
RayCodeCSC 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 17:19.


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