Yeah the issue is on the client side, since I have created an instance  
of my listener class in c_hl2mp_player.h

CPowerListener *pListener;

but its still not listening

I have forced the server side to fire the event whether something's  
listening or not

I have no idea what the problem is

On 8 Jun 2008, at 22:22, LDuke wrote:

> You should check to make sure event isn't a NULL pointer before  
> continuing.
>
>
> On Fri, Jun 6, 2008 at 11:28 AM, Adam Buckland <[EMAIL PROTECTED] 
> >
> wrote:
>
>> Hey Guys
>>
>> I'm currently creating a power system for a mod, and when the power  
>> reaches
>> zero, I want to fire a game event to deactivate the players weapons.
>>
>> Currently, I create an event on the server-side, and I have a  
>> listener on
>> the client-side.
>>
>> The server crashes when I SetInt (presumably to a null pointer),  
>> and I
>> can't
>> see why, since the event and userid short is defined in modevents.res
>>
>> Can anyone help please?
>>
>> Here's the code:
>>
>>
>> if (m_iPower == 0)
>>   {
>>       IGameEvent *event =
>> gameeventmanager->CreateEvent("player_deactivate");
>>       event->SetInt("userid",GetUserID());
>>       gameeventmanager->FireEvent(event);
>>       DevMsg("sent");
>>   }
>> _______________________________________________
>> To unsubscribe, edit your list preferences, or view the list  
>> archives,
>> please visit:
>> http://list.valvesoftware.com/mailman/listinfo/hlcoders
>>
>>
> _______________________________________________
> To unsubscribe, edit your list preferences, or view the list  
> archives, please visit:
> http://list.valvesoftware.com/mailman/listinfo/hlcoders
>


_______________________________________________
To unsubscribe, edit your list preferences, or view the list archives, please 
visit:
http://list.valvesoftware.com/mailman/listinfo/hlcoders

Reply via email to