Raised This Month: $ Target: $400
 0% 

round checker


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Amonel
Senior Member
Join Date: May 2009
Old 06-06-2010 , 08:16   round checker
Reply With Quote #1

a simple script to check round # and print at it's round start...

example:

if round #2 print at round start: This is round nomber 2!

if round #13 print at round end: This was a lucky round...
Amonel is offline
reinert
Veteran Member
Join Date: Feb 2007
Old 06-06-2010 , 09:43   Re: round checker
Reply With Quote #2

new round = 1;

register_event("HLTV", "event_new_round", "a", "1=0", "2=0")

public event_new_round(){
round++;
if(round == 1){
client_print(id, print_chat, "This is round number 1!)}else if(round == 2){
client_print(id, print_chat, "This is round number 2!)}else if(round == 3){
client_print(id, print_chat, "This is round number 3!)}
}
reinert is offline
drekes
Veteran Member
Join Date: Jul 2009
Location: Vault 11
Old 06-06-2010 , 10:23   Re: round checker
Reply With Quote #3

PHP Code:
#include <amxmodx>

new roundnr 1;

public 
plugin_init()
         
register_logevent("Event_RoundStart"2"1=Round_Start")

public 
Event_Roundstart()
{
    
client_print(0print_chat"This is round number %i"roundnr)
    
roundnr++;

@reinert:
You can display the round number in client_print so if and else if in not neccesary, and you don't have id in HLTV.
__________________

Quote:
Originally Posted by nikhilgupta345 View Post
You're retarded.
drekes is offline
Send a message via MSN to drekes
reinert
Veteran Member
Join Date: Feb 2007
Old 06-06-2010 , 10:36   Re: round checker
Reply With Quote #4

roundnr++; should be before client_print I think :p BTW: he asked how to make different messages.
reinert is offline
drekes
Veteran Member
Join Date: Jul 2009
Location: Vault 11
Old 06-06-2010 , 11:35   Re: round checker
Reply With Quote #5

if roundnr++ is before client_print, you should start from 0, because else if it starts as 1 it will first make roundnr 2 and then print it's to

Use cases to make different messages.
__________________

Quote:
Originally Posted by nikhilgupta345 View Post
You're retarded.
drekes is offline
Send a message via MSN to drekes
reinert
Veteran Member
Join Date: Feb 2007
Old 06-06-2010 , 11:48   Re: round checker
Reply With Quote #6

oh right.
reinert 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 05:16.


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