Raised This Month: $ Target: $400
 0% 

question about Players


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
MrKiller2010
Senior Member
Join Date: Aug 2012
Old 09-08-2013 , 05:04   question about Players
Reply With Quote #1

I have a plugin which counts and all players, once there is one T left it should run a command.

It works perfect with a server with bots only.

I tried it with real players. It run the commands when there is 5 Ts left.
I doesn't count the players right.

My question:
Why does it works perfect with bots and not with real players?
__________________
JailBreak & HNS
MrKiller2010 is offline
JusTGo
Veteran Member
Join Date: Mar 2013
Old 09-08-2013 , 05:16   Re: question about Players
Reply With Quote #2

how we can help and you not giving us some information post the code or maby you are not cheking if player alive/valid/connected..
JusTGo is offline
MrKiller2010
Senior Member
Join Date: Aug 2012
Old 09-08-2013 , 05:27   Re: question about Players
Reply With Quote #3

Quote:
Originally Posted by JusTGo View Post
how we can help and you not giving us some information post the code or maby you are not cheking if player alive/valid/connected..
How can i check if the player is alive/valid/connected


PHP Code:
public Ham_PlayerKillediVictimiAttackershouldgibid 
{    
    new 
players[32], num
    get_players
(playersnum"ae""TERRORIST")

    if (
num == 1)
    
StopGame();

Should it be:

PHP Code:
public Ham_PlayerKillediVictimiAttackershouldgibid 
{
    if( !
is_user_aliveid ) )
        return 
HAM_IGNORED;

    new 
players[32], num
    get_players
(playersnum"ae""TERRORIST")

    if (
num == 1)
    
StopGame();

__________________
JailBreak & HNS

Last edited by MrKiller2010; 09-08-2013 at 05:35.
MrKiller2010 is offline
mottzi
Veteran Member
Join Date: May 2010
Location: Switzerland
Old 09-08-2013 , 06:03   Re: question about Players
Reply With Quote #4

Show plugin_init()
mottzi is offline
Send a message via MSN to mottzi
MrKiller2010
Senior Member
Join Date: Aug 2012
Old 09-08-2013 , 06:31   Re: question about Players
Reply With Quote #5

Quote:
Originally Posted by JusTGo View Post
how we can help and you not giving us some information post the code or maby you are not cheking if player alive/valid/connected..
Quote:
Originally Posted by mottzi View Post
Show plugin_init()
PHP Code:
public plugin_init()
{
    
register_plugin("JB GM"VERSION"MrKiller2010");
    
register_clcmd"say /gm""GameMenu" );
    
register_clcmd"say /music""musicmenu" );
    
register_clcmd"say /open""OpenCell" );
    
    
register_logevent"LogEvent_RoundEnd",     2"1=Round_End"     );
    
    
    
RegisterHamHam_Touch"grenade""Ham_Touch_Grenade_Pre");
    
RegisterHamHam_Killed"player""Ham_PlayerKilled", .Post=);
    
RegisterHamHam_Touch"armoury_entity""Ham_WeaponTouch_Pre");
    
RegisterHamHam_Touch"weaponbox""Ham_WeaponTouch_Pre");
    
RegisterHamHam_Touch"worldspawn""Ham_WallTouch_Pre");
    
RegisterHamHam_Touch"func_wall""Ham_WallTouch_Pre");
    
RegisterHamHam_Touch"func_breakable""Ham_WallTouch_Pre");
    
RegisterHamHam_Weapon_PrimaryAttack"weapon_deagle""Ham_ElitePrimaryAttack")
    
    
register_event"23""EventSpray""a""1=112" )
    
register_event("CurWeapon""event_CurWeapon""be""1=1")
    
register_forward(FM_AddToFullPack"Forward_AddToFullPack_Post");
    
register_forward(FM_PlayerPreThink"Forward_PreThink");
    
register_forward(FM_PlayerPreThink"fw_playerprethink"1);
    
register_forward(FM_SetModel"fwdSetModel")
    
register_forward(FM_EmitSound "EmitSound")
    
register_forward(FM_PlaybackEvent"fwPlaybackEvent")
    
    
    
g_pOpenCells    register_cvar"jb_opencells""1" );
    
    
setup_buttons();

__________________
JailBreak & HNS
MrKiller2010 is offline
akcaliberg
Senior Member
Join Date: Nov 2011
Location: Istanbul
Old 09-08-2013 , 12:42   Re: question about Players
Reply With Quote #6

Quote:
Originally Posted by MrKiller2010 View Post
How can i check if the player is alive/valid/connected


PHP Code:
public Ham_PlayerKillediVictimiAttackershouldgibid 
{    
    new 
players[32], num
    get_players
(playersnum"ae""TERRORIST")

    if (
num == 1)
    
StopGame();

Should it be:

PHP Code:
public Ham_PlayerKillediVictimiAttackershouldgibid 
{
    if( !
is_user_aliveid ) )
        return 
HAM_IGNORED;

    new 
players[32], num
    get_players
(playersnum"ae""TERRORIST")

    if (
num == 1)
    
StopGame();

I don't think Ham_Killed has 4 parameters. Remove the last parameter "id". Probably it's not the problem though.
Plus, ident StopGame(); with one tab

Last edited by akcaliberg; 09-08-2013 at 12:44.
akcaliberg 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 19:14.


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