Raised This Month: $ Target: $400
 0% 

Questions About :Bool


Post New Thread Reply   
 
Thread Tools Display Modes
Merc3y
Member
Join Date: Dec 2009
Old 01-30-2010 , 09:54   Re: Questions About :Bool
Reply With Quote #21

Quote:
Originally Posted by NcB_Sav View Post
then fix it what i typed is correct man... just read and search bro..
Yea i'm using yours.

But i don't know how to sovle this:

PHP Code:
#define IsPlayer( %1 ) ( 1 <= %1 <= g_iMaxPlayers )

new g_iMaxPlayers

public plugin_init( )
{
    
g_iMaxPlayers get_maxplayers( )
}

public 
Game_Startid )
{
    if ( !
IsPlayerid ) )
    {
        new 
iPlayers32 ], iNum
        get_players
iPlayersiNum )
    
        if ( 
iNum <= ) {
        return;
        }
        new 
iRandomIndex randomiNum )
        for ( new 
0iNumi++ ) 
        {
            if ( 
== iRandomIndex 
            {
                
cs_set_user_teamiPlayers], CS_TEAM_CT )
                
g_iZombieid ] = false
            

            else 
            {
                
cs_set_user_teamiPlayers], CS_TEAM_T )
                
g_iZombieid ] = true
            
}
        }
 
        if ( 
g_iZombieid ] ) 
        {
            
set_task1.0"Zombie_Class_Menu"id )
            
g_iZombieid ] = true
        
}
        else
        {
            
set_task1.0"Human_Class_Menu"id )
            
g_iZombieid ] = false
        
}
    }
    return 
PLUGIN_HANDLED

__________________
How I Wish That I Can Host Without Any Problem.

Last edited by Merc3y; 01-30-2010 at 10:11.
Merc3y is offline
Doc-Holiday
AlliedModders Donor
Join Date: Jul 2007
Old 01-30-2010 , 19:54   Re: Questions About :Bool
Reply With Quote #22

define should be at the top..... make sure its typed correctly.
Doc-Holiday is offline
Excalibur.007
Veteran Member
Join Date: Sep 2009
Location: Singapore
Old 01-30-2010 , 20:22   Re: Questions About :Bool
Reply With Quote #23

PHP Code:
if( is_user_connectedid ) )
{
    
strip_user_weaponsid )

Ooh that is only if you want it on Player Spawn.

AND(1) strip the user weapons at the menu.

AND(2) RegisterHam( Ham_Player_PreThink, "player", "fw_PlayerPreThink" )
don't use FakeMeta

AND(3)
!IsPlayer( id )? I thought it's supposed to be IsPlayer( id ) ? Cause it work fine with me when i didn't even put the IsPlayer( id ) thingy.

AND(4)
PHP Code:
if( item == MENU_EXIT )
{
    
menu_destroymenu )
    return 
PLUGIN_HANDLED

--->
PHP Code:
if( item == MENU_EXIT || zp_get_user_zombieid ) || zp_get_user_nemesisid ) || zp_get_user_survivorid ) )
{
    
menu_destroymenu )
    return 
PLUGIN_HANDLED

This should block zombies, nemesis and survivor from cheating. Like if you don't choose a class wait for infection( If you got first zombie / nemesis / survivor you choose a class and you get guns! ) Do the same as zombie classes.
Excalibur.007 is offline
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 01-30-2010 , 21:32   Re: Questions About :Bool
Reply With Quote #24

Quote:
Originally Posted by Merc3y View Post
Yea i'm using yours.

But i don't know how to sovle this:
Here's your above code able to compile with 0 errors\warnings. Your IsPlayer macro was spaced and the compiler doesn't like that.

#define IsPlayer( %1 ) = bad
#define IsPlayer(%1) = good

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

#define IsPlayer(%1) (1<=%1<=g_iMaxPlayers)

new g_iMaxPlayers
new bool:g_iZombie33 ];

public 
plugin_init( )
{
    
g_iMaxPlayers get_maxplayers( )
}

public 
Game_Startid )
{
    if ( !
IsPlayerid ) )
        return 
PLUGIN_HANDLED;
        
    new 
iPlayers32 ], iNum
    get_players
iPlayersiNum )
    
    if ( 
iNum <= 
        return 
PLUGIN_HANDLED;
        
    new 
iRandomIndex randomiNum )
    for ( new 
0iNumi++ ) 
    {
        if ( 
== iRandomIndex 
        {
            
cs_set_user_teamiPlayers], CS_TEAM_CT )
            
g_iZombieid ] = false
        

        else 
        {
            
cs_set_user_teamiPlayers], CS_TEAM_T )
            
g_iZombieid ] = true
        
}
    }
    
    if ( 
g_iZombieid ] ) 
    {
        
set_task1.0"Zombie_Class_Menu"id )
        
g_iZombieid ] = true
    
}
    else
    {
        
set_task1.0"Human_Class_Menu"id )
        
g_iZombieid ] = false
    
}
    
    return 
PLUGIN_HANDLED

__________________
Bugsy is offline
Merc3y
Member
Join Date: Dec 2009
Old 01-31-2010 , 00:32   Re: Questions About :Bool
Reply With Quote #25

Quote:
Originally Posted by Excalibur.007 View Post
PHP Code:
if( is_user_connectedid ) ) 
PHP Code:
[font=Verdana]{[/font]
[
font=Verdana]    strip_user_weaponsid )[/font]
[
font=Verdana]}[/font
Ooh that is only if you want it on Player Spawn.

AND(1) strip the user weapons at the menu.

AND(2) RegisterHam( Ham_Player_PreThink, "player", "fw_PlayerPreThink" )
don't use FakeMeta

AND(3)!IsPlayer( id )? I thought it's supposed to be IsPlayer( id ) ? Cause it work fine with me when i didn't even put the IsPlayer( id ) thingy.

AND(4)
PHP Code:
if( item == MENU_EXIT )
{
    
menu_destroymenu )
    return 
PLUGIN_HANDLED

--->
PHP Code:
if( item == MENU_EXIT || zp_get_user_zombieid ) || zp_get_user_nemesisid ) || zp_get_user_survivorid ) )
{
    
menu_destroymenu )
    return 
PLUGIN_HANDLED

This should block zombies, nemesis and survivor from cheating. Like if you don't choose a class wait for infection( If you got first zombie / nemesis / survivor you choose a class and you get guns! ) Do the same as zombie classes.
what the heck ?

Code:
This should block zombies, nemesis and survivor from cheating. Like if you don't choose a class wait for infection( If you got first zombie / nemesis / survivor you choose a class and you get guns! ) Do the same as zombie classes.
Did you see that i included <zombieplague>

It true it about zombie but i not using zombieplague include.
__________________
How I Wish That I Can Host Without Any Problem.
Merc3y is offline
Merc3y
Member
Join Date: Dec 2009
Old 01-31-2010 , 00:34   Re: Questions About :Bool
Reply With Quote #26

Quote:
Originally Posted by Bugsy View Post
Here's your above code able to compile with 0 errors\warnings. Your IsPlayer macro was spaced and the compiler doesn't like that.

#define IsPlayer( %1 ) = bad
#define IsPlayer(%1) = good

PHP Code:
#include <amxmodx>
#include <cstrike>
 
#define IsPlayer(%1) (1<=%1<=g_iMaxPlayers)
 
new g_iMaxPlayers
new bool:g_iZombie33 ];
 
public 
plugin_init( )
{
    
g_iMaxPlayers get_maxplayers( )
}
 
public 
Game_Startid )
{
    if ( !
IsPlayerid ) )
        return 
PLUGIN_HANDLED;
 
    new 
iPlayers32 ], iNum
    get_players
iPlayersiNum )
 
    if ( 
iNum <= 
        return 
PLUGIN_HANDLED;
 
    new 
iRandomIndex randomiNum )
    for ( new 
0iNumi++ ) 
    {
        if ( 
== iRandomIndex 
        {
            
cs_set_user_teamiPlayers], CS_TEAM_CT )
            
g_iZombieid ] = false
        

        else 
        {
            
cs_set_user_teamiPlayers], CS_TEAM_T )
            
g_iZombieid ] = true
        
}
    }
 
    if ( 
g_iZombieid ] ) 
    {
        
set_task1.0"Zombie_Class_Menu"id )
        
g_iZombieid ] = true
    
}
    else
    {
        
set_task1.0"Human_Class_Menu"id )
        
g_iZombieid ] = false
    
}
 
    return 
PLUGIN_HANDLED

So that why

But 1 problem the function Game_Start didn't work.
__________________
How I Wish That I Can Host Without Any Problem.

Last edited by Merc3y; 01-31-2010 at 04:41.
Merc3y is offline
Excalibur.007
Veteran Member
Join Date: Sep 2009
Location: Singapore
Old 02-01-2010 , 03:56   Re: Questions About :Bool
Reply With Quote #27

Maybe this make it didn't work
PHP Code:
set_taskget_pcvar_floatg_iDelay ), "Game_Start" 
-->
PHP Code:
set_taskget_pcvar_floatg_iDelay ), "Game_Start"id 
What is this for in your Round Start event
PHP Code:
for ( new 1<= g_iMaxPlayersi++ ) 
Try it idk if it will work if it doesn't just use Ham_Spawn. I don't see the point of making the file size smaller & lesser includes.
Excalibur.007 is offline
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 02-01-2010 , 08:34   Re: Questions About :Bool
Reply With Quote #28

Replace your functions with these

PHP Code:
public Game_Start()
{    
    new 
iPlayers32 ] , iNum id
    get_players
iPlayersiNum )
    
    if ( 
iNum <= 
        return 
PLUGIN_HANDLED
        
    
new iRandomIndex randomiNum );
    
    for ( new 
iNum i++ ) 
    {
        
id iPlayers]
        
        if ( 
== iRandomIndex 
        {
            
cs_set_user_teamid CS_TEAM_CT )
            
g_iZombieid ] = false
            set_task
1.0"Human_Class_Menu"id )
        } 
        else 
        {
            
cs_set_user_teamid CS_TEAM_T )
            
g_iZombieid ] = true
            set_task
1.0 "Zombie_Class_Menu" id )
        }
    }
    
    return 
PLUGIN_HANDLED
}

public 
logevent_round_start( )
{
    if ( 
get_cvar_num"deadworld_toggle" ) == )
    {
        
set_taskget_pcvar_floatg_iDelay ) , "Game_Start" )
    }

__________________
Bugsy is offline
Merc3y
Member
Join Date: Dec 2009
Old 02-03-2010 , 03:24   Re: Questions About :Bool
Reply With Quote #29

Quote:
Originally Posted by Excalibur.007 View Post
Maybe this make it didn't work
PHP Code:
set_taskget_pcvar_floatg_iDelay ), "Game_Start" 
-->
PHP Code:
set_taskget_pcvar_floatg_iDelay ), "Game_Start"id 
What is this for in your Round Start event
PHP Code:
for ( new 1<= g_iMaxPlayersi++ ) 
Try it idk if it will work if it doesn't just use Ham_Spawn. I don't see the point of making the file size smaller & lesser includes.
It was not the set_task.
__________________
How I Wish That I Can Host Without Any Problem.
Merc3y is offline
Old 02-03-2010, 08:16
zombieplague
This message has been deleted by zombieplague.
Merc3y
Member
Join Date: Dec 2009
Old 02-05-2010 , 01:35   Re: Questions About :Bool
Reply With Quote #30

Objective:

"CT" see human classes menu only.

"T" see zombie classes menu only.

Every round random pick random number of player.

Problem:

"CT" see zombie classes menu, "T" see human classes menu also.

PHP Code:
public Game_Start() 
{     
    new 
iPlayers32 ] , iNum id 
    get_players
iPlayersiNum 
 
    if ( 
iNum <= )  
        return 
PLUGIN_HANDLED 
 
    
new iRandomIndex randomiNum )
 
    for ( new 
iNum i++ )  
    { 
        
id iPlayers
 
        if ( 
== iRandomIndex )  
        { 
            
cs_set_user_teamid CS_TEAM_CT 
            
g_iZombieid ] = false 
            set_task
1.0"Human_Class_Menu"id 
        } 
 
        else  
        { 
            
cs_set_user_teamg_Zombie CS_TEAM_T 
            
g_iZombieid ] = true 
            set_task
1.0 "Zombie_Class_Menu"id 
        } 
    } 
 
    return 
PLUGIN_HANDLED 

__________________
How I Wish That I Can Host Without Any Problem.

Last edited by Merc3y; 02-06-2010 at 01:14.
Merc3y 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 01:44.


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