Raised This Month: $ Target: $400
 0% 

[CSGO] 2 Questions


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
m22b
Senior Member
Join Date: Jul 2013
Old 02-17-2015 , 11:25   [CSGO] 2 Questions
Reply With Quote #1

Hellow all

1 :

If on my server 4 players
PrintToChatAll (blablabla)
If players more 4
PrintToChatAll (blablabla)


2 :
I need to simple example code how use overlay

event_headshot
(
code
)

thx
m22b is offline
m22b
Senior Member
Join Date: Jul 2013
Old 02-17-2015 , 21:49   Re: [CSGO] 2 Questions
Reply With Quote #2

Code:
#pragma semicolon 1
#include <sourcemod>

public Plugin:myinfo =
{
	name = "Test",
	author = "m22b",
	description = "csvk.ru",
	version = "1",
	url = "csvk.ru"
};

public OnPluginStart()  
{  
    HookEvent("round_start", round_start); 
}


public round_start(Handle:event, const String:name[], bool:dontBroadcast) 
{ 
  if(GetClientCount() <= 4 ){
   PrintToChatAll("test");
  } else {
   PrintToChatAll("test1");
 } 
}
xDDD

Last edited by m22b; 02-17-2015 at 21:49.
m22b is offline
versatile_bfg
Veteran Member
Join Date: Feb 2012
Old 02-17-2015 , 23:25   Re: [CSGO] 2 Questions
Reply With Quote #3

PHP Code:
public OnPluginStart()  
{  
    
HookEvent("player_death"player_death); 
}


public 
player_death(Handle:event, const String:name[], bool:dontBroadcast

     new 
bool:headshot GetEventBool(event"headshot");
     if (
headshot)
     {
          
/* code */
     
}

https://wiki.alliedmods.net/Events_(SourceMod_Scripting)
__________________

Last edited by versatile_bfg; 02-18-2015 at 00:17.
versatile_bfg is offline
m22b
Senior Member
Join Date: Jul 2013
Old 02-18-2015 , 05:43   Re: [CSGO] 2 Questions
Reply With Quote #4

Quote:
Originally Posted by versatile_bfg View Post
PHP Code:
public OnPluginStart()  
{  
    
HookEvent("player_death"player_death); 
}


public 
player_death(Handle:event, const String:name[], bool:dontBroadcast

     new 
bool:headshot GetEventBool(event"headshot");
     if (
headshot)
     {
          
/* code */
     
}

https://wiki.alliedmods.net/Events_(SourceMod_Scripting)
PHP Code:
public OnPluginStart()  
{  
    
HookEvent("player_death"player_death); 
}


public 
player_death(Handle:event, const String:name[], bool:dontBroadcast

     new 
GetEventBool(event"headshot");
     if (
== 1)
     {
          
/* code */
     
}

it's working too ?

Last edited by m22b; 02-18-2015 at 05:44.
m22b is offline
Kailo
Senior Member
Join Date: Sep 2014
Location: Moscow, Russia
Old 02-18-2015 , 09:39   Re: [CSGO] 2 Questions
Reply With Quote #5

new x = GetEventBool(event, "headshot"); Compiler may be give warning about type mismatch.
Kailo 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:39.


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