Raised This Month: $32 Target: $400
 8% 

[KZ] Jump-Bug Trainer


Post New Thread Reply   
 
Thread Tools Display Modes
danielkza
AMX Mod X Plugin Approver
Join Date: May 2007
Location: São Paulo - Brasil
Old 11-09-2008 , 07:07   Re: [KZ] Jump-Bug Trainer
Reply With Quote #31

Quote:
Originally Posted by MPNumB View Post
Plus using maxplayers... I don't like that way some why - looks & feels not professional.
I disagree. Thats exactly what get_players does: loop through all players and match them to your conditions. The problem its that it's buggy, and you have little to no control of how it checks players. The only possible use I can see for it is getting all connected players, since using it with flags IS NOT SUPPORTED. You should do all the filtering yourself.
__________________

Community / No support through PM
danielkza is offline
MPNumB
Veteran Member
Join Date: Feb 2007
Location: Lithuania
Old 11-09-2008 , 07:40   Re: [KZ] Jump-Bug Trainer
Reply With Quote #32

I would wanna see source of get_players() than. =P

// edit:

Updated colorchat.inc to 1.6
Fixed: when printing message globally and there are no connected players - it gives an error.
__________________
Skill and no annoying bugs with fixed balance issues is my goal!
My approved plugins what don't show up in Approved List:
* Bomb/Death/CSS Radar
* HotVision
___
Need help? Please check this documentation first.

Last edited by MPNumB; 11-09-2008 at 08:35.
MPNumB is offline
Send a message via Skype™ to MPNumB
danielkza
AMX Mod X Plugin Approver
Join Date: May 2007
Location: São Paulo - Brasil
Old 11-09-2008 , 19:41   Re: [KZ] Jump-Bug Trainer
Reply With Quote #33

Quote:
Originally Posted by MPNumB View Post
I would wanna see source of get_players() than. =P

// edit:

Updated colorchat.inc to 1.6
Fixed: when printing message globally and there are no connected players - it gives an error.
PHP Code:
static cell AMX_NATIVE_CALL get_players(AMX *amxcell *params/* 4 param */
{
    
int iNum 0;
    
int ilen;
    
charsptemp get_amxstring(amxparams[3], 0ilen);
    
int flags UTIL_ReadFlags(sptemp);

    
cell *aPlayers get_amxaddr(amxparams[1]);
    
cell *iMax get_amxaddr(amxparams[2]);

    
int team 0;

    if (
flags 48)
    {
        
sptemp get_amxstring(amxparams[4], 0ilen);

        if (
flags 16)
        {
            if (
flags 64)
                
team g_teamsIds.findTeamId(sptemp);
            else
                
team g_teamsIds.findTeamIdCase(sptemp);
        }
    }

    for (
int i 1<= gpGlobals->maxClients; ++i)
    {
        
CPlayerpPlayer GET_PLAYER_POINTER_I(i);
        if (
pPlayer->ingame)
        {
            if (
pPlayer->IsAlive() ? (flags 2) : (flags 1))
                continue;
            if (
pPlayer->IsBot() ? (flags 4) : (flags 8))
                continue;
            if ((
flags 16) && (pPlayer->teamId != team))
                continue;
            if ((
flags 128) && (pPlayer->pEdict->v.flags FL_PROXY))
                continue;
            if (
flags 32)
            {
                if (
flags 64)
                {
                    if (
stristr(pPlayer->name.c_str(), sptemp) == NULL)
                        continue;
                }
                else if (
strstr(pPlayer->name.c_str(), sptemp) == NULL)
                    continue;
            }
            
aPlayers[iNum++] = i;
        }
    }

    *
iMax iNum;
    
    return 
1;

__________________

Community / No support through PM

Last edited by danielkza; 11-09-2008 at 19:43.
danielkza is offline
houseaddicted001
Junior Member
Join Date: Jan 2010
Location: Argentina - Neuquen
Old 08-25-2010 , 11:04   Re: [KZ] Jump-Bug Trainer
Reply With Quote #34

hola Numb! tu plugin esta muy bueno!. lo estuve probando y pude hacer varios JB pero lo que pasa es que no se escucha el "excellent" osea, cuando logro hacer un jump-bug no suena el "mod_excellent.wav" bueno espero tu respuesta.. gracias..
houseaddicted001 is offline
Send a message via MSN to houseaddicted001 Send a message via Skype™ to houseaddicted001
Tz2tpji3
New Member
Join Date: Jan 2018
Old 01-09-2018 , 11:23   Re: [KZ] Jump-Bug Trainer
Reply With Quote #35

I made some small change, see attached sma file.
Attached Files
File Type: sma Get Plugin or Get Source (jb_trainer_auto_disabled.sma - 713 views - 18.1 KB)
Tz2tpji3 is offline
Reply


Thread Tools
Display Modes

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 11:45.


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