Raised This Month: $ Target: $400
 0% 

HELP this code


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
w5014560
Member
Join Date: Mar 2009
Old 05-23-2009 , 05:10   HELP this code
Reply With Quote #1

PHP Code:
public plugin_init() 
{
register_event("Damage""damage_msg""b""2!0""3=0""4!0")
}
public 
damage_msg()
{
 new 
attacker get_user_attacker(attacker)
 new 
damage read_data(2)
 new 
victim read_data(2)
if(!
is_user_connected(attacker)) {
return 
PLUGIN_CONTINUE
}
if(
attacker != victim)
{
new 
iExperienceGain
if(damage <= 15)
{
iExperienceGain 2
}
if(
75 damage 15)
{
iExperienceGain 8
}

if(
100 damage >= 75)
{
iExperienceGain 15
}
if(
120 damage >= 100)
{
iExperienceGain 22
}
if(
180 damage >= 120)
{
iExperienceGain 35
}
if(
250 damage >= 180)
{
iExperienceGain 55
}
if(
450 damage >= 250)
{
iExperienceGain 80
}
add_experience(attackeriExperienceGain)
}
return 
PLUGIN_CONTINUE

Run time error 10: native error (native "get_user_attacker")
Invalid player id 20140

Who knows what the problem is that
w5014560 is offline
 


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 01:32.


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