Raised This Month: $ Target: $400
 0% 

[HELP] Make bool...


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
flamin
BANNED
Join Date: Jul 2009
Location: Los Teques
Old 03-12-2010 , 13:40   [HELP] Make bool...
Reply With Quote #1

Hi! Now i find myself become in this in the bool i am a beginner please help!

I have this code!

PHP Code:
#include <amxmodx>
#include <amxmisc>

#include <yap_modspecific>
#include <yap_forwards>
#include <yap_stocks>
#include <yap_const>

new const plugin_author[] = "PsychO"
new const plugin_name[] = "YAP-AUX"
new const plugin_version[] = "0.0.1"

public pug_cvar_help
public pug_cvar_admin_help

public plugin_init()
{
    
register_plugin(plugin_name,plugin_version,plugin_author);

    
register_dictionary("yap.txt")
    
register_dictionary("yap_aux.txt")

    
register_pug_admincmd("help","cmd_cmdlist",_,"Lista de todos los comandos PUG")

    
register_pug_clcmd("hp","cmd_hpteam",_,"Muestra el hp de los oponentes")

    
register_pug_clcmd("dmg","cmd_dmg",_,"Muestra el daņo que causastes y el que te causo el oponente")
    
register_pug_clcmd("rdmg","cmd_dmg",_,"Muestra el daņo que causastes y el que te causo el oponente")

    
register_pug_admincmd("svrestart","cmd_restart",PUG_CMD_LVL,"Solo para ADMIN")

    
//parse_header("BOE-E",pug_header,5)
}

// Rukia: We need to reset the dmg and hits when a client connects, disconnects, and rounds start
new pug_dmg[33][33]
new 
pug_hits[33][33]

public 
client_connect(id
{
    
arrayset(pug_dmg[id], 033); 
    
arrayset(pug_hits[id], 033);
}

public 
client_disconnect(id)
{
    for (new 
033i++)
    {
        
pug_dmg[i][id] = 0;
        
pug_hits[i][id] = 0;
    }
}

public 
pug_round_start()
{
    for (new 
033; ++i)
    {
        
arrayset(pug_dmg[i], 033)    
        
arrayset(pug_hits[i], 033)    
    }
}

public 
pug_round_start_failed()
{
    for (new 
033; ++i)
    {
        
arrayset(pug_dmg[i], 033)    
        
arrayset(pug_hits[i], 033)    
    }
}

// Rukia: Assume that the mod specific plugin has loaded the correct module, or provided this for us
public  client_damage attackervictimamountwpnindexhitplaceTA )
{
    
//if (attacker == victim) return;

    
pug_dmg[attacker][victim] += amount
    pug_hits
[attacker][victim] += 1
}

#include <yap_aux>

public cmd_dmg(id)
{
    if(
is_user_alive(id) && id != 0pug_msg_tmp_empty(id,"PUG_CMD_NOTALLOWED");
    else
    {
        static 
Players[32], name[32]
        new 
playerCountiplayer
        get_players
(PlayersplayerCount"ch")

        new 
tmp_hitstmp_dmgtmp_rhitstmp_rdmgcheck
        
for (i=0i<playerCounti++)
        {
            
player Players[i]
            
tmp_hits pug_hits[id][player]
            
tmp_rhits pug_hits[player][id]

            if( 
tmp_hits || tmp_rhits )
            {
                
check 1
                tmp_dmg 
pug_dmg[id][player]
                
tmp_rdmg pug_dmg[player][id]

                if(
player == idclient_print(id,print_chat,"%s %L",pug_header,id,"PUG_AUX_DMG_SELF",tmp_dmg,tmp_hits)
                else
                {
                    
get_user_name(player,name31)
                    
client_print(id,print_chat,"%s %L",pug_header,id,"PUG_AUX_DMG",tmp_dmg,tmp_hits,tmp_rdmg,tmp_rhitsname)
                }
            }
          }

        
tmp_hits pug_hits[id][0]
        
tmp_rhits pug_hits[0][id]
        if( 
tmp_hits || tmp_rhits )
        {
            
tmp_dmg pug_dmg[id][0]
            
tmp_rdmg pug_dmg[0][id]
            
client_print(id,print_chat,"%s %L",pug_header,id,"PUG_AUX_DMG","WorldSpawn",tmp_hits,tmp_dmg)
        }
        else if(!
checkclient_print(id,print_chat,"%s %L",pug_header,id,"PUG_AUX_NODMG")
    }
    return 
PLUGIN_HANDLED


Here is an example of how to make a bool with the damage but i failed to include in my code https://forums.alliedmods.net/showth...98#post1113998

Someone to help me structuring my code with this example and asi able to see the damage caused to the last round when this live please help my code is based on the YET ANOTHER PUG (.dmg)

NOTE: What I wish to make with the bool is able to view the damage caused in the last round, since the PUG by default may not be be the damage caused when these live in a new round, what i achieve is to make something like ESEA, able to see the damage caused, in the last round being alive in a new round
flamin is offline
shuttle_wave
Veteran Member
Join Date: Apr 2009
Location: New Zealand
Old 03-12-2010 , 17:49   Re: [HELP] Make bool...
Reply With Quote #2

PHP Code:
new bool
__________________
JailBreak Mod with Plugin API ( 90% ) Public
shuttle_wave is offline
flamin
BANNED
Join Date: Jul 2009
Location: Los Teques
Old 03-12-2010 , 18:02   Re: [HELP] Make bool...
Reply With Quote #3

Do not understand sees the tutorial that i have placed i i want to implement this tutorial in my code i know that is new bool -.-"
flamin is offline
Seta00
The Seta00 user has crashed.
Join Date: Jan 2010
Location: Berlin
Old 03-12-2010 , 18:04   Re: [HELP] Make bool...
Reply With Quote #4

Quote:
Originally Posted by flamin View Post
public pug_cvar_help
public pug_cvar_admin_help
These vars don't need to be public.

I don't even know what PUG is, so I can only help with this.
Seta00 is offline
wrecked_
Veteran Member
Join Date: Jan 2010
Location: New York (GMT-5)
Old 03-12-2010 , 18:13   Re: [HELP] Make bool...
Reply With Quote #5

Yes, it's pretty difficult to see what he's doing with those pug_ commands, but I posted a fixed version of his code in the other thread, so I think this issue's resolved.
__________________
[ Paid Requests ]
DO NOT PM ME ABOUT BLOCKMAKER
NO PRIVATE SUPPORT
wrecked_ 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:39.


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