Raised This Month: $51 Target: $400
 12% 

[HELP] Entity out of range


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Akshat
Senior Member
Join Date: Feb 2013
Location: India, Jaipur.
Old 01-26-2015 , 08:04   [HELP] Entity out of range
Reply With Quote #1

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] = 
Attached Images
File Type: jpg Screenshot_1.jpg (29.4 KB, 137 views)
__________________
Learning Pawn [3% Complete!]

Last edited by Akshat; 01-26-2015 at 08:06.
Akshat is offline
Send a message via Skype™ to Akshat
HamletEagle
AMX Mod X Plugin Approver
Join Date: Sep 2013
Location: Romania
Old 01-26-2015 , 11:32   Re: [HELP] Entity out of range
Reply With Quote #2

Why another thread ? Wait for answer in the other one.
__________________
HamletEagle 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 19:52.


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