Solved rounds left

Unpaid Requests, Public Plugins
Post Reply
User avatar
Spir0x
Veteran Member
Veteran Member
Tunisia
Posts: 641
Joined: 7 years ago
Location: Tunisia
Contact:

#11

Post by Spir0x » 5 years ago

Okay nevermind.

User avatar
sPe3doN
Senior Member
Senior Member
Algeria
Posts: 258
Joined: 7 years ago
Contact:

#12

Post by sPe3doN » 5 years ago

Not working jack it's the same problem it's show me every round
Round remaining: 6
Image

Muhammet20
Veteran Member
Veteran Member
Posts: 408
Joined: 5 years ago
Contact:

#13

Post by Muhammet20 » 5 years ago

sPe3doN wrote: 5 years ago Not working jack it's the same problem it's show me every round
Round remaining: 6
try this:
__________

Code: Select all

#include <amxmodx>
#include <amxmisc>

new MaxRounds
new RoundCount

public plugin_init() {

	register_plugin("roundsleft", "", "Muhammet Kaya")
	register_logevent("round_end", 2, "1=Round_End")
	register_event("TextMsg", "new_map_or_restart", "a", "2&#Game_C", "2&#Game_w")
	register_clcmd("say roundsleft","ShowRoundsLeft")
	MaxRounds = get_cvar_pointer("mp_maxrounds")
}
public round_end() 
{ 
    RoundCount++ 
}

public new_map_or_restart() 
{ 
    RoundCount = 0 
}
public ShowRoundsLeft(id)
{
	if(get_pcvar_num(MaxRounds) == 0)
	{
		client_print(id,print_chat, "No Rounds Limit")
	}
	if(get_pcvar_num(MaxRounds) > 0)
	{
		client_print(id,print_chat, "Rounds Left: %d", get_pcvar_num(MaxRounds) - RoundCount)
	}
}

Post Reply

Create an account or sign in to join the discussion

You need to be a member in order to post a reply

Create an account

Not a member? register to join our community
Members can start their own topics & subscribe to topics
It’s free and only takes a minute

Register

Sign in

Who is online

Users browsing this forum: No registered users and 15 guests