Raised This Month: $32 Target: $400
 8% 

Dota 2 Events


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
cristianronaldo
Member
Join Date: Sep 2015
Old 09-28-2016 , 19:50   Dota 2 Events
Reply With Quote #1

I'm doing a plugin to know that team kill roshan, but not working, someone could tell me what is wrong?
Code:
public OnPluginStart()
{
HookEvent("dota_roshan_kill", Event_Roshan, EventHookMode_Pre);
}
public Action Event_Roshan(Event event, const char[] name, bool dontBroadcast)
{
    int team=event.GetInt("teamnumber");
    PrintToChatAll("roshan has killed by %s",team);
    
}
cristianronaldo is offline
Grey83
Veteran Member
Join Date: Dec 2014
Location: Ukraine
Old 09-28-2016 , 20:41   Re: Dota 2 Events
Reply With Quote #2

'int team' is int
'%s' only for string. not for int
PHP Code:
public OnPluginStart()
{
    
HookEvent("dota_roshan_kill"Event_Roshan);
}
public 
Action Event_Roshan(Event event, const char[] namebool dontBroadcast)
{
    
int team=event.GetInt("teamnumber");
    
PrintToChatAll("roshan has killed by team #%i",team);

__________________
Grey83 is offline
cristianronaldo
Member
Join Date: Sep 2015
Old 09-28-2016 , 21:29   Re: Dota 2 Events
Reply With Quote #3

Quote:
Originally Posted by Grey83 View Post
'int team' is int
'%s' only for string. not for int
PHP Code:
public OnPluginStart()
{
    
HookEvent("dota_roshan_kill"Event_Roshan);
}
public 
Action Event_Roshan(Event event, const char[] namebool dontBroadcast)
{
    
int team=event.GetInt("teamnumber");
    
PrintToChatAll("roshan has killed by team #%i",team);

does not work, I think the problem is that not recognizing the event dota_roshan_kill
cristianronaldo is offline
psychonic

BAFFLED
Join Date: May 2008
Old 09-29-2016 , 07:53   Re: Dota 2 Events
Reply With Quote #4

SourceMod does not support Dota 2.
psychonic is offline
cristianronaldo
Member
Join Date: Sep 2015
Old 09-29-2016 , 12:59   Re: Dota 2 Events
Reply With Quote #5

Quote:
Originally Posted by psychonic View Post
SourceMod does not support Dota 2.
Source 1!!!!
cristianronaldo is offline
psychonic

BAFFLED
Join Date: May 2008
Old 09-29-2016 , 15:46   Re: Dota 2 Events
Reply With Quote #6

Quote:
Originally Posted by cristianronaldo View Post
Source 1!!!!
That's still not supported by current SM.

In addition, there's no longer any legal way to obtain that version of the game since the content owner is no longer distributing it.
psychonic is offline
cristianronaldo
Member
Join Date: Sep 2015
Old 09-29-2016 , 19:28  
Reply With Quote #7

Quote:
Originally Posted by psychonic View Post
That's still not supported by current SM.

In addition, there's no longer any legal way to obtain that version of the game since the content owner is no longer distributing it.
so,i can not do it in any way?

Quote:
Originally Posted by psychonic View Post
That's still not supported by current SM.

In addition, there's no longer any legal way to obtain that version of the game since the content owner is no longer distributing it.
could do Downgrading sourcemod version??my server version is 1434 , Not reborn,and the actually version of sourcemod on my server is 1.8.

Last edited by psychonic; 10-01-2016 at 15:49. Reason: merge doublepost
cristianronaldo 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 03:08.


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