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

What is wrong with this code?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
VasqueS
Member
Join Date: Jan 2015
Old 01-22-2015 , 14:08   What is wrong with this code?
Reply With Quote #1

as say in title what is the problem with this:


Code:
#pragma semicolon 1

#include <sourcemod>
#include <sdkhooks>
#include <sdktools>


#define PLUGIN_VERSION "teste"

public Plugin:myinfo = 
{
    name = "Remove hostage radar",
    author = "Dk--",
    description = "Remove radar for hostages",
    version = PLUGIN_VERSION,
};


public OnClientPutInServer(client)
{
    SDKHook(client, SDKHook_PostThink, Radar);
}

public Radar(client)
{
new iEnt = -1;
while((iEnt = FindEntityByClassname(iEnt, "hostage_entity")) != -1) //Find the hostages themselves and destroy them
{
SetEntPropEnt(iEnt, Prop_Send, "m_bSpotted", 0);
}
 
        
}
VasqueS is offline
Michalplyoutube
Veteran Member
Join Date: Jan 2013
Location: Tank Carrier in Mannhatt
Old 01-22-2015 , 14:11   Re: What is wrong with this code?
Reply With Quote #2

The Radar public should be

public Action:Radar(client)

Also to kill them use AcceptEntityInput(kill);
__________________
The plugin developer of TF2BWR Reborn
And a TF2 Player

Last edited by Michalplyoutube; 01-22-2015 at 14:12.
Michalplyoutube is offline
VasqueS
Member
Join Date: Jan 2015
Old 01-22-2015 , 14:22   Re: What is wrong with this code?
Reply With Quote #3

Ye..worked but i need this because i'm using pets on my server so i need remove them off the radar because CT can see hostages in radar, the way you told me to do it, remove the pet from game .-. is there otther way?

AcceptEntityInput(iEnt, "Kill");
i'll make to hostage be disappear

Last edited by VasqueS; 01-22-2015 at 14:23.
VasqueS is offline
WildCard65
Veteran Member
Join Date: Aug 2013
Location: Canada
Old 01-22-2015 , 15:32   Re: What is wrong with this code?
Reply With Quote #4

Quote:
Originally Posted by VasqueS View Post
Ye..worked but i need this because i'm using pets on my server so i need remove them off the radar because CT can see hostages in radar, the way you told me to do it, remove the pet from game .-. is there otther way?

AcceptEntityInput(iEnt, "Kill");
i'll make to hostage be disappear
Just add
PHP Code:
Action
before Radar and see if that works.
Edit: Wait, just use OnGameFrame
__________________

Last edited by WildCard65; 01-22-2015 at 15:33.
WildCard65 is offline
VasqueS
Member
Join Date: Jan 2015
Old 01-22-2015 , 15:37   Re: What is wrong with this code?
Reply With Quote #5

can you modified the full code and give me ready? Dk was helping me now he is afk, and ye i'm a complete nub
VasqueS is offline
VasqueS
Member
Join Date: Jan 2015
Old 01-22-2015 , 15:52   Re: What is wrong with this code?
Reply With Quote #6

i make this but kill the hostage, i use pets by store, and i want that hostage disappear from radar only


Code:
#pragma semicolon 1

#include <sourcemod>
#include <sdkhooks>
#include <sdktools>


#define PLUGIN_VERSION "teste"

public Plugin:myinfo = 
{
    name = "Remove hostage radar",
    author = "Dk--",
    description = "Remove radar for hostages",
    version = PLUGIN_VERSION,
};


public OnClientPutInServer(client)
{
    SDKHook(client, SDKHook_PostThink, Radar);
}

public Action:Radar(client)
{
new iEnt = -1;
while((iEnt = FindEntityByClassname(iEnt, "hostage_entity")) != -1) //Find the hostages themselves and destroy them
{
AcceptEntityInput(iEnt, "Kill");
}   
}
VasqueS 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 11:26.


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