Raised This Month: $51 Target: $400
 12% 

count round and restart after 15 round


Post New Thread Reply   
 
Thread Tools Display Modes
Plugin Info:     Modification:   ALL        Category:   Admin Commands       
Pourya
Member
Join Date: Sep 2011
Location: Iran
Old 08-15-2012 , 07:22   count round and restart after 15 round
Reply With Quote #1

hi all
I wrote a plugin but not learn anything from AMX programming language.
I got together a few commands plugins
its work
But I'd better

description:
when player ready to match and admin must be go AFK say /count
server r1 and after 15 round server automatically r1 15 sec,

command:
say /count


Please add the following to the plugin if possible
1-the hub message "Server will automatically restart after 15 rounds" fast Quickly disappears.
2-on or off for plugins,s

thanks all
Admin Olibs
Attached Files
File Type: inc dhudmessage.inc (3.4 KB, 133 views)
File Type: sma Get Plugin or Get Source (count.sma - 622 views - 1.7 KB)

Last edited by YamiKaitou; 08-15-2012 at 10:07.
Pourya is offline
Send a message via Yahoo to Pourya
YamiKaitou
Has a lovely bunch of coconuts
Join Date: Apr 2006
Location: Texas
Old 08-15-2012 , 10:07   Re: count round and restart after 15 round
Reply With Quote #2

AMXX file removed, you are not authorized to upload it
__________________
ProjectYami Laboratories

I do not browse the forums regularly anymore. If you need me for anything (asking questions or anything else), then PM me (be descriptive in your PM, message containing only a link to a thread will be ignored).
YamiKaitou is offline
Liverwiz
Veteran Member
Join Date: Feb 2010
Location: Maryland
Old 08-15-2012 , 10:24   Re: count round and restart after 15 round
Reply With Quote #3

Code:
public team_score()
{
	new team[32];
	read_data(1,team,31);
	if (equal(team,"CT"))
	{
		ct_score = read_data(2);
	}
	else if (equal(team,"TERRORIST"))
	{
		terrorist_score = read_data(2);
	}
}

PHP Code:
public team_score()
{
    new 
team[32];
    
read_data(1,team,31);
    if (
team[0] == 'C')
    {
        
ct_score++
    }
    else if (
team[0] == 'T')
    {
        
terrorist_score++
    }

Then reset the scores in LogeventEndRound when you reset g_iRounds
This way you use only one native call in this function. Will make it faster.
__________________
What an elegant solution to a problem that doesn't need solving....

Last edited by Liverwiz; 08-15-2012 at 10:31.
Liverwiz is offline
Pourya
Member
Join Date: Sep 2011
Location: Iran
Old 08-16-2012 , 07:57   Re: count round and restart after 15 round
Reply With Quote #4

i test your cod but in not work correctly
Pourya is offline
Send a message via Yahoo to Pourya
Pourya
Member
Join Date: Sep 2011
Location: Iran
Old 08-16-2012 , 10:16   Re: count round and restart after 15 round
Reply With Quote #5

hi
it's work properly :X

any one can on and off for plugin
exp: say /start and /stop
Attached Files
File Type: sma Get Plugin or Get Source (count_score.sma - 639 views - 1.6 KB)
File Type: inc dhudmessage.inc (3.4 KB, 133 views)

Last edited by Pourya; 08-16-2012 at 10:18.
Pourya is offline
Send a message via Yahoo to Pourya
Liverwiz
Veteran Member
Join Date: Feb 2010
Location: Maryland
Old 08-16-2012 , 11:39   Re: count round and restart after 15 round
Reply With Quote #6

Quote:
Originally Posted by Pourya View Post
hi
it's work properly :X

any one can on and off for plugin
exp: say /start and /stop
Are you really using the release section of the forums to get people to help you with your plugin?
Go to request or scripting help.

And it didn't work because you didn't do as i said and reset the scores. Weather you sv_restart or not your plugin's cache still has those scores. If you want them to be reset when you restart the scoring do this....
PHP Code:
if(total ==14)
    {
            for(new 
j=0;j<=32;j++)
            {
            
set_hudmessage(1750255, -1.00.1206.010.5)
            
show_hudmessagej"last round")
            
client_print(jprint_chat".:: last round ::.")
            }
    }

    else if(
total==15)
    {
        
server_cmd("sv_restart 1");
        
ct_score terrorist_score 0;
    } 
but either way....put that second if statement as an else-if.
__________________
What an elegant solution to a problem that doesn't need solving....

Last edited by Liverwiz; 08-16-2012 at 11:44.
Liverwiz is offline
Pourya
Member
Join Date: Sep 2011
Location: Iran
Old 08-16-2012 , 12:35   Re: count round and restart after 15 round
Reply With Quote #7

i test it and work probably

your cod is not work
Code:
public team_score()
{
    new team[32];
    read_data(1,team,31);
    if (team[0] == 'C')
    {
        ct_score++
    }
    else if (team[0] == 'T')
    {
        terrorist_score++
    }
}  
but this cod is true
Code:
public team_score()
{
    new team[32];
    read_data(1,team,31);
    if (equal(team,"CT"))
    {
        ct_score = read_data(2);
    }
    else if (equal(team,"TERRORIST"))
    {
        terrorist_score = read_data(2);
    }
}
i test your last post

and this attach file is work true
Attached Files
File Type: sma Get Plugin or Get Source (count_score.sma - 550 views - 1.6 KB)
Pourya is offline
Send a message via Yahoo to Pourya
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 08-16-2012 , 17:19   Re: count round and restart after 15 round
Reply With Quote #8

This is badly coded, useless and redundant, don't need to check more, unapproved.
__________________
- tired and retired -

- my plugins -

Last edited by ConnorMcLeod; 08-16-2012 at 17:19.
ConnorMcLeod 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 08:06.


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