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

Help needed


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
pizzavesel
Member
Join Date: Dec 2008
Location: Romania
Old 02-10-2011 , 21:31   Help needed
Reply With Quote #1

How can i make the super heros only to be availabal for Ct's, is this posibal cas i reala need it. Imagin something like this: tero dont'd hace nothing from the sh mode, ct have sh mode.
pizzavesel is offline
Send a message via Yahoo to pizzavesel Send a message via Skype™ to pizzavesel
vittu
SuperHero Moderator
Join Date: Oct 2004
Location: L.A. County, CA
Old 02-10-2011 , 21:34   Re: Help needed
Reply With Quote #2

You recode the entire mod yourself.
vittu is offline
Send a message via AIM to vittu Send a message via MSN to vittu Send a message via Yahoo to vittu
Jelle
[b]MOAR CANDY[/b]
Join Date: Aug 2009
Location: Denmark
Old 02-11-2011 , 02:20   Re: Help needed
Reply With Quote #3

Or make a plugin which, each round, checks what team a player is on, if the player is on T then sh ban them.
__________________
No idea what to write here...
Jelle is offline
Send a message via MSN to Jelle
pizzavesel
Member
Join Date: Dec 2008
Location: Romania
Old 02-11-2011 , 07:27   Re: Help needed
Reply With Quote #4

i'm not a coder... can i ghet some help? Or i have to try learning coding agien ...., in sted of rerigthing all the plugin, whay can't i set the plugin to force the ct's to use sh , only the ct's ? Or why do i have to reright all the plugin ? Some explanations cold help me solv this little problem.
I need this to conbine sh whit a zombi mode, ther must be a way to stop infected players from using super powers.

Last edited by pizzavesel; 02-11-2011 at 08:46.
pizzavesel is offline
Send a message via Yahoo to pizzavesel Send a message via Skype™ to pizzavesel
Jelle
[b]MOAR CANDY[/b]
Join Date: Aug 2009
Location: Denmark
Old 02-11-2011 , 10:02   Re: Help needed
Reply With Quote #5

I was about to do that too, and I was combining all the heroes into the zp plugin by making a check in each hero. If he guy was a zombie he wouldn't be able to get the powers.
It was a dead end as some powers in sh mod, like giving health can't be done outside plugin_init().
I am thinking that it could check what team a player is on each second or so, since zp and the zombie choosing thing is really weird.
As I said, I did try it. There is a forward which runs each time a new zombie is selected, but I couldn't get that forward to work properly.
I can try to make what I said above where it checks each player each second and then bans them from having sh powers if they are on T team.
__________________
No idea what to write here...
Jelle is offline
Send a message via MSN to Jelle
Jelle
[b]MOAR CANDY[/b]
Join Date: Aug 2009
Location: Denmark
Old 02-11-2011 , 10:20   Re: Help needed
Reply With Quote #6

Try this:
PHP Code:
#include <superheromod>


public plugin_init()
{
    
register_plugin("No SH for T""1.0""Jelle")
    
    
set_task(1.0"check_team"___"b")
}

public 
check_team()
{
    new 
players[32], playerCountplayer
    get_players
(playersplayerCount"h")
    
    new 
bool:banned[SH_MAXSLOTS+1]
    
    for ( new 
0playerCounti++ )
    {
        
player players[i]
        
        new 
name[32]
        
get_user_name(playername31)
        
        if ( 
get_user_team(player) == )
        {
            
server_cmd("amx_shban ^"%d^""name)
            
            
banned[player] = true
        
}
        
        else
        {
            if ( 
banned[player] )
            {
                
server_cmd("amx_shunban ^"%d^""name)
            }
        }
    }

Keep in mind that it is not very efficient, so if your server starts to lag it is because of this plugin. If that happens then tell me and I will see if I can make a better way to do this.
Also, I didn't test it. There may be bugs, or it might not work at all.
__________________
No idea what to write here...
Jelle is offline
Send a message via MSN to Jelle
pizzavesel
Member
Join Date: Dec 2008
Location: Romania
Old 02-11-2011 , 10:26   Re: Help needed
Reply With Quote #7

i'm using zombi biohazard, and this can be solvd i think. I will try to solv this, but i don't think i can, mabe i can use the ban system to ban the tr team, in stade of a single player? Or to ban an infected player?


testing plugin

works but not ....

Can io ban this (from biohazard.inc)
/* Returns 1 if user is a zombie */
native is_user_zombie(index)

Last edited by pizzavesel; 02-11-2011 at 11:05.
pizzavesel is offline
Send a message via Yahoo to pizzavesel Send a message via Skype™ to pizzavesel
Jelle
[b]MOAR CANDY[/b]
Join Date: Aug 2009
Location: Denmark
Old 02-11-2011 , 11:03   Re: Help needed
Reply With Quote #8

The plugin should ban all T players. It checks all player connected to the server each second for what team they are on. If they are on T team then sh ban them, if they are on any else team (spectator, unassigned, CT) they will be unbanned again.
__________________
No idea what to write here...
Jelle is offline
Send a message via MSN to Jelle
pizzavesel
Member
Join Date: Dec 2008
Location: Romania
Old 02-11-2011 , 11:09   Re: Help needed
Reply With Quote #9

mor simple wold be i think to check plyers if they ar infected, after theat ban?
/* Returns 1 if user is a zombie */
native is_user_zombie(index)
pizzavesel is offline
Send a message via Yahoo to pizzavesel Send a message via Skype™ to pizzavesel
DarkGod
SourceMod DarkCrab
Join Date: Jul 2007
Location: Sweden
Old 02-11-2011 , 11:59   Re: Help needed
Reply With Quote #10

Just curious, if someone is banned does it then stay until next map? If so, revise plugin.
__________________
DarkGod is offline
Send a message via AIM to DarkGod Send a message via MSN to DarkGod
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:41.


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