AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   hamsandwich:: Ham_TakeDamage - does not work (https://forums.alliedmods.net/showthread.php?t=233816)

Sutar 01-20-2014 14:29

hamsandwich:: Ham_TakeDamage - does not work
 
Hello, here's the code

Code:

#include <amxmodx>
#include <hamsandwich>

new g_plStatsMe[33][4]

public plugin_init()
{
        register_plugin("The Players Stats", "1.5", "Sutar")
       
        RegisterHam(Ham_TakeDamage, "player", "cmdDamage", 0)
        //register_event("DeathMsg", "cmdDeath", "a")
       
        //register_clcmd("say /me", "sayMeAttacker")
        //register_clcmd("say /hp", "sayHpVictim")
       
        //register_event("ResetHUD", "eventResetHud", "be")
}

public cmdDamage(victim, inflictor, attacker, Float:dmg, damagebits)
{
        if(victim != attacker && victim != 0 && attacker != 0 && victim < 33 && attacker < 33)
        {
                if(get_user_team(victim) == get_user_team(attacker))
                        return HAM_SUPERCEDE
               
                new damage = floatround(dmg, floatround_floor);
               
                if(damage > get_user_health(victim))
                        damage = get_user_health(victim);
               
                g_plStatsMe[attacker][0] += 1;
                g_plStatsMe[attacker][1] += damage;
               
                if(damagebits == (1 << 24))
                        g_plStatsMe[attacker][2] += damage;
                else if(get_user_weapon(attacker) == CSW_KNIFE)
                        g_plStatsMe[attacker][3] += damage;
        }
        return HAM_IGNORED
}

the problem is that on the same server it is running. And on the other is not.
just function "cmdDamage" is not satisfied
If you check on the Windows, Everything works.
if Linux - does not work.

what went wrong?

Meta list (Linux)
Code:

Currently loaded plugins:
      description      stat pend  file              vers      src  load  unlod
 [ 1] AMX Mod X        RUN  -    amxmodx_mm_i386.  v1.8.1.3  ini  Start ANY 
 [ 2] dproto_EF        RUN  -    dproto_i386.so    v0.9.364  ini  Start Never
 [ 3] MySQL            RUN  -    mysql_amxx_i386.  v1.8.1.3  pl1  ANY  ANY 
 [ 4] Fun              RUN  -    fun_amxx_i386.so  v1.8.1.3  pl1  ANY  ANY 
 [ 5] FakeMeta        RUN  -    fakemeta_amxx_i3  v1.8.1.3  pl1  ANY  ANY 
 [ 6] CStrike          RUN  -    cstrike_amxx_i38  v1.8.1.3  pl1  ANY  ANY 
 [ 7] Ham Sandwich    RUN  -    hamsandwich_amxx  v1.8.1.3  pl1  ANY  ANY 
7 plugins, 7 running


YamiKaitou 01-20-2014 14:49

Re: hamsandwich:: Ham_TakeDamage - does not work
 
No Steam = No Support

Sutar 01-21-2014 08:19

Re: hamsandwich:: Ham_TakeDamage - does not work
 
I did not understand your answer.

YamiKaitou 01-21-2014 10:37

Re: hamsandwich:: Ham_TakeDamage - does not work
 
We do not assist No-Steam users

Sutar 01-22-2014 10:51

Re: hamsandwich:: Ham_TakeDamage - does not work
 
I Steam client

http://steamcommunity.com/id/sutars/

YamiKaitou 01-22-2014 11:13

Re: hamsandwich:: Ham_TakeDamage - does not work
 
We only care about the server

Sutar 01-22-2014 16:18

Re: hamsandwich:: Ham_TakeDamage - does not work
 
I asked him to help me with the code. where are Steam?
we are talking about the script.

YamiKaitou 01-22-2014 16:19

Re: hamsandwich:: Ham_TakeDamage - does not work
 
https://forums.alliedmods.net/misc.php?do=showrules


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

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