Raised This Month: $ Target: $400
 0% 

Need help with scrore plugin


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
[X]-RayCat
Senior Member
Join Date: Sep 2006
Old 05-26-2007 , 14:08   Need help with scrore plugin
Reply With Quote #1

Code:
#include <amxmodx>
#include <amxmisc>
 
#define Plugin "Team Score"
#define Version "1.0"
#define Author "Doombringer"
 
new team_wins[2]

public plugin_init()
{
 register_plugin(Plugin, Version, Author)
 
 register_event("TeamScore", "team_score", "a")
 register_event("HLTV", "new_round", "a", "1=0", "2=0")
}
public team_score()
{
 new team[2]
 read_data(1, team, 1)
 
 if(team[0] == 'C')
  team_wins[0] = read_data(2) 
  
 else if(team[0] == 'T')
  team_wins[1] = read_data(2)
  
 return PLUGIN_CONTINUE
} 
public new_round()
{
 set_hudmessage(255, 255, 255, 0.01, 0.18, 0, 6.0, 6.0)
 show_hudmessage(0, "CT %d / TS %d", team_wins[0], team_wins[1])
}
I got this plugin. How can i make total rounds to 6 then do something? Like when 6 total rounds have been played?
[X]-RayCat is offline
Old 05-26-2007, 14:21
regalis
This message has been deleted by regalis. Reason: lol
[X]-RayCat
Senior Member
Join Date: Sep 2006
Old 05-26-2007 , 14:44   Re: Need help with scrore plugin
Reply With Quote #2

Quote:
Originally Posted by regalis View Post
First i want a "thank you" for my work on this thread:
http://forums.alliedmods.net/showthread.php?t=54919

greetz regalis
What that suppose to mean? But thanks anyways..
[X]-RayCat is offline
Old 05-26-2007, 15:02
regalis
This message has been deleted by regalis. Reason: i hate -karma...lol
[X]-RayCat
Senior Member
Join Date: Sep 2006
Old 05-26-2007 , 15:14   Re: Need help with scrore plugin
Reply With Quote #3

Quote:
Originally Posted by regalis View Post
I have coded a plugin for you and you never said "thank you"...that is not nice!
There is another thread from you where someone has coded something for you and you never replied!
Is that normal where you live? I don't think so!
Please be nice to the people who are trying to help you....

Nevertheless here you go:
Code:
#include <amxmodx>
#include <amxmisc>
 
#define Plugin "Team Score"
#define Version "1.0"
#define Author "Doombringer"
 
new team_wins[2]
 
 
public plugin_init()
{
 register_plugin(Plugin, Version, Author)
 
 register_event("TeamScore", "team_score", "a")
 register_event("HLTV", "new_round", "a", "1=0", "2=0")
}
 
public team_score()
{
 new team[2]
 read_data(1, team, 1)
 
 if(team[0] == 'C')
  team_wins[0] = read_data(2) 
 
 else if(team[0] == 'T')
  team_wins[1] = read_data(2)
 
 if(team_wins[0]+team_wins[1] == 6)
 {
     // 6 rounds played...do something
     // maybe changelevel or what ever!?    
 }
 return PLUGIN_CONTINUE
}
 
public new_round()
{
 set_hudmessage(255, 255, 255, 0.01, 0.18, 0, 6.0, 6.0)
 show_hudmessage(0, "CT %d / TS %d", team_wins[0], team_wins[1])
}
Btw.: +Karma would be nice!
t4t, i gave you karma with my name on it, isnt that enought? ^__^
(Cant give karma atm) Is it possible if score is draw to restart round and set round limit to 3 and get winner of those 3 rounds?

Last edited by [X]-RayCat; 05-26-2007 at 15:20.
[X]-RayCat is offline
Old 05-26-2007, 15:19
regalis
This message has been deleted by regalis. Reason: -karma sucks *lol*
[X]-RayCat
Senior Member
Join Date: Sep 2006
Old 05-26-2007 , 15:33   Re: Need help with scrore plugin
Reply With Quote #4

Quote:
Originally Posted by regalis View Post
That could be true...can't remember if or if not
Good that you don't start to flame...that makes you simpatico ;)
So is my suggestion possible to make?
Nvm, i will set that to 6 so draw isnt possible.

Last edited by [X]-RayCat; 05-26-2007 at 15:48.
[X]-RayCat is offline
[X]-RayCat
Senior Member
Join Date: Sep 2006
Old 05-26-2007 , 16:32   Re: Need help with scrore plugin
Reply With Quote #5

Quote:
Originally Posted by regalis View Post
I have coded a plugin for you and you never said "thank you"...that is not nice!
There is another thread from you where someone has coded something for you and you never replied!
Is that normal where you live? I don't think so!
Please be nice to the people who are trying to help you....

Nevertheless here you go:
Code:
#include <amxmodx>
#include <amxmisc>
 
#define Plugin "Team Score"
#define Version "1.0"
#define Author "Doombringer"
 
new team_wins[2]
 
 
public plugin_init()
{
 register_plugin(Plugin, Version, Author)
 
 register_event("TeamScore", "team_score", "a")
 register_event("HLTV", "new_round", "a", "1=0", "2=0")
}
 
public team_score()
{
 new team[2]
 read_data(1, team, 1)
 
 if(team[0] == 'C')
  team_wins[0] = read_data(2) 
 
 else if(team[0] == 'T')
  team_wins[1] = read_data(2)
 
 if(team_wins[0]+team_wins[1] == 6)
 {
     // 6 rounds played...do something
     // maybe changelevel or what ever!?    
 }
 return PLUGIN_CONTINUE
}
 
public new_round()
{
 set_hudmessage(255, 255, 255, 0.01, 0.18, 0, 6.0, 6.0)
 show_hudmessage(0, "CT %d / TS %d", team_wins[0], team_wins[1])
}
Btw.: +Karma would be nice!
Didnt work...
[X]-RayCat is offline
Old 05-26-2007, 17:16
regalis
This message has been deleted by regalis. Reason: ....lol
[X]-RayCat
Senior Member
Join Date: Sep 2006
Old 05-26-2007 , 17:29   Re: Need help with scrore plugin
Reply With Quote #6

Quote:
Originally Posted by regalis View Post
What didn't work?
Post your code what you have tried to do...
I made set_task to other public..
[X]-RayCat is offline
Old 05-26-2007, 17:39
regalis
This message has been deleted by regalis. Reason: -karma ftw
[X]-RayCat
Senior Member
Join Date: Sep 2006
Old 05-26-2007 , 18:24   Re: Need help with scrore plugin
Reply With Quote #7

Quote:
Originally Posted by regalis View Post
set_task(1.0, "otherpublic") !?
yes..
[X]-RayCat is offline
Old 05-28-2007, 16:00
Deviance
This message has been deleted by Deviance. Reason: I'm not even going to start...
Old 05-28-2007, 16:18
Deviance
This message has been deleted by Deviance. Reason: PM me next time instead of posting my codes...
Old 05-28-2007, 18:23
[X]-RayCat
This message has been deleted by [X]-RayCat.
[X]-RayCat
Senior Member
Join Date: Sep 2006
Old 05-29-2007 , 16:43   Re: Need help with scrore plugin
Reply With Quote #8

I gave you both +karma. Deviance for that first plugin and regalis for this tolalrounds thing. And now i need to know how to minus and plus one score.

EDIT:
Code:
team_wins[0]+=1
team_wins[0]-=1
Would that do the job?

Last edited by [X]-RayCat; 05-29-2007 at 17:22.
[X]-RayCat is offline
v3x
Veteran Member
Join Date: Oct 2004
Location: US
Old 05-29-2007 , 18:12   Re: Need help with scrore plugin
Reply With Quote #9

Quote:
Originally Posted by [X]-RayCat View Post
I gave you both +karma. Deviance for that first plugin and regalis for this tolalrounds thing. And now i need to know how to minus and plus one score.

EDIT:
Code:
team_wins[0]+=1
team_wins[0]-=1
Would that do the job?
PHP Code:
team_wins[0]++
team_wins[0]-- 
__________________
What am I doing these days? Well, I run my own Rust server. It's heavily modded. If you'd like to join, the ip is 167.114.101.67:28116

I also created a website called Rust Tools. It will calculate and tell you the raw amounts of resources needed to craft items.
v3x is offline
[X]-RayCat
Senior Member
Join Date: Sep 2006
Old 05-30-2007 , 04:41   Re: Need help with scrore plugin
Reply With Quote #10

Quote:
Originally Posted by v3x View Post
PHP Code:
team_wins[0]++
team_wins[0]-- 
So that would increase/decrease 1 value? But wouldnt it be different with increasing/decreasing like 10 value?

PS: Welcome back.
[X]-RayCat 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 21:08.


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