AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   [HELP] Entity out of range (https://forums.alliedmods.net/showthread.php?t=256441)

Akshat 01-26-2015 08:04

[HELP] Entity out of range
 
1 Attachment(s)
This plugin shows the total number of headshots by the player and if we spec someone it should show his total number of headshots. But am getting this error in console. Help!

PHP Code:

#include <amxmodx>
#include <engine>

new g_iHeadShots[33], g_iSync

public plugin_init()
{
    
register_plugin("HeadShot Counter""1.0""Flicker")
    
register_event("DeathMsg""onDeathMsg""a")
    
set_task(0.1"showHeadShots"21344__"b")
    
g_iSync CreateHudSyncObj()
}

public 
onDeathMsg()
{
    new 
id read_data(1)
    if(
read_data(3) && is_user_connected(id))
        
g_iHeadShots[id]++
}

public 
showHeadShots(id)
{
    new 
players[32], num
    get_players
(playersnum"ach")
    
    if(!
is_user_alive(id))
    {
        new 
target entity_get_int(idEV_INT_iuser2);
        if(
target == 0)
            return 
PLUGIN_CONTINUE;
        
set_hudmessage(25525500.6, -1.000.00.30.00.02);
        for(new 
inumi++)
        
ShowSyncHudMsg(players[i], g_iSync"Headshots : %i"g_iHeadShots[players[i]], target)
        
        return 
PLUGIN_CONTINUE;
    }
    
set_hudmessage(025500.020.2300.00.30.00.0);
    for(new 
inumi++)
        
ShowSyncHudMsg(players[i], g_iSync"Headshots: %i"g_iHeadShots[players[i]])
    
    return 
PLUGIN_CONTINUE;


public 
client_disconnect(id)
    
g_iHeadShots[id] = 


HamletEagle 01-26-2015 11:32

Re: [HELP] Entity out of range
 
Why another thread ? Wait for answer in the other one.


All times are GMT -4. The time now is 11:00.

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