AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   bool in public return false alltime (https://forums.alliedmods.net/showthread.php?t=76929)

steve139 09-02-2008 07:19

bool in public return false alltime
 
hello , i got a problem...

i wanted to do a bool function to check if the map is de_azteck and is in a zone


but the function return allways "false"
(
PHP Code:

if(( bomb_check_map(id))) { 

)

look my functions


PHP Code:

public bomb_check_map(id) {
    new 
mapname[32]
    
get_mapname(mapname,31)
    if((
equali(mapname,"de_aztec"))) {
        
bomb_check_de_aztec(id)
    }
    else {
        return 
0
    
}
    return 
PLUGIN_CONTINUE
    
    
}
public 
bomb_check_list_map() {
    new 
mapname[32]
    
get_mapname(mapname,31)
    if((
equali(mapname,"de_aztec"))) {
        return 
1
    
}
    else {
        return 
0
    
}
    return 
PLUGIN_CONTINUE
    
    
}
public 
bomb_check_de_aztec(id) {
    new 
u_origin[3]
    
get_user_origin(id,u_origin)
    new 
A_origin[3]
    
A_origin[0] = -575
    A_origin
[1] = -1483
    A_origin
[2] = -187

    
new B_origin[3]
    
B_origin[0] = -2121
    B_origin
[1] = 975
    B_origin
[2] = -187


    
new A_dis get_distance(u_origin,A_origin)
    new 
B_dis get_distance(u_origin,B_origin)
    
    if(( 
A_dis <= get_cvar_num("cs_bomb_dis") )) {
        return 
true
    
}
    else if(( 
B_dis <= get_cvar_num("cs_bomb_dis") )) {
        return 
true
    
}
    else {
        return 
false
    
}
    return 
PLUGIN_CONTINUE
    



anyone can help ?

anakin_cstrike 09-02-2008 08:06

Re: bool in public return false alltime
 
PHP Code:

boolCheck(const map[])
{
        new 
mapname[32]; get_mapname(mapname,31);
        if(
equal(mapname,map))
               return 
true;
        return 
false;



steve139 09-02-2008 08:10

Re: bool in public return false alltime
 
ok ok thanks :up:


All times are GMT -4. The time now is 03:06.

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