Raised This Month: $ Target: $400
 0% 

Help


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
soumyadip77
Senior Member
Join Date: Jul 2017
Location: INDIA,KOLKATA
Old 04-26-2018 , 10:39   Help
Reply With Quote #1

Some one explain me what is the work on this read data i want to know


PHP Code:
public plugin_init()
{
register_plugin("""""");
    
register_event("TeamScore""score_new""a""");
}
public 
score_new()
{
    new 
team[32];
    
read_data(1team31);
    
    if (
v_inprogress == 2)
    {
        if (
team[0] == 67)
        {
            
v_CtScore[0] = read_data(2);
        }
        else
        {
            if (
team[0] == 84)
            {
                
v_TScore[0] = read_data(2);
            }
        }
    }
    else
    {
        if (
v_inprogress == 4)
        {
            if (
team[0] == 67)
            {
                
v_TScore[1] = read_data(2);
            }
            if (
team[0] == 84)
            {
                
v_CtScore[1] = read_data(2);
            }
        }
    }
    if (
v_inprogress == || v_inprogress == 4)
    {
        
maxround();
    }
    return 
0;

public 
maxround()
{
   
    if (
v_inprogress == && v_TScore[0][0] + v_CtScore[0][0] == 15)
    {
        
half_stop();
    }
    else
    {
        if (
v_inprogress == 4)
        {
            if (
rounds_played == 30)
            {
                
half_stop();
            }
            if (
v_CtScore[1][0] + v_CtScore[0][0] == 16 || v_TScore[1][0] + v_TScore[0][0] == 16)
            {
                
half_stop();
            }
        }
    }
    return 
0;

soumyadip77 is offline
Send a message via Skype™ to soumyadip77
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 04-28-2018 , 12:32   Re: Help
Reply With Quote #2

Quote:
Originally Posted by soumyadip77 View Post
Some one explain me what is the work on this read data i want to know
Are you asking what read_data() does? It reads arguments from the event.

TeamScore

Arg 1 is the team name associated with the score (TERRORIST or CT)
Arg 2 is the score for that team
__________________
Bugsy is offline
soumyadip77
Senior Member
Join Date: Jul 2017
Location: INDIA,KOLKATA
Old 04-28-2018 , 21:45   Re: Help
Reply With Quote #3

Here read data work as a save score in variable right?
soumyadip77 is offline
Send a message via Skype™ to soumyadip77
soumyadip77
Senior Member
Join Date: Jul 2017
Location: INDIA,KOLKATA
Old 04-28-2018 , 21:46   Re: Help
Reply With Quote #4

And when this event call??
soumyadip77 is offline
Send a message via Skype™ to soumyadip77
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 04-28-2018 , 21:49   Re: Help
Reply With Quote #5

Yes and end of round, once for each team.
__________________
Bugsy is offline
soumyadip77
Senior Member
Join Date: Jul 2017
Location: INDIA,KOLKATA
Old 04-29-2018 , 09:10   Re: Help
Reply With Quote #6

can i use any other variable replace of this ??

PHP Code:
new team[32]; 
and how read data gent only team score why not anything else..
soumyadip77 is offline
Send a message via Skype™ to soumyadip77
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 04-29-2018 , 09:35   Re: Help
Reply With Quote #7

You read data based on which event you hooked. You can only read what exists for that specific event. For TeamScore, only team name and score are available.

https://wiki.alliedmods.net/Half-life_1_game_events
__________________
Bugsy 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 04:38.


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