AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   [core] [NS] ns_get_build (https://forums.alliedmods.net/showthread.php?t=6492)

karlos 10-04-2004 13:50

[core] [NS] ns_get_build
 
with amx i could use this in plugin_precache()
Code:
if ( is_combat() && ( get_ent("team_command",0) > 1 ) )
with amxx 0.16 and 0.2 only is_combat() worked/works

get_ent("team_command",0) = ns_get_build("team_command",1,0) in amxx 0.2

altough i used ns2amx with amxx 0.16 it has not worked but amx + ns2amx did

karlos 10-04-2004 15:40

not fixed but found another way:
Code:
if ( is_combat() && check_cc_num() ) check_cc_num(){     new entid = find_ent_by_class(-1, "team_command") // get commcchair id     new num     while( entid > 0 ){         num++         if( num > 1 ) // more than 1 cc found             return 1         entid = find_ent_by_class(entid, "team_command") // get next commchair id     }     return 0 }
this works

karlos 10-05-2004 16:23

the new way works at least for plugin_init(), BUT it is more important to have this in plugin_precache(), but it does not work there
plz someone help

Votorx 10-06-2004 13:01

How does it not work?

karlos 10-06-2004 13:18

its not morkin
eg: i make if ( if is_combat() && check_cc_num() ) a=1
but a is not set to 1


All times are GMT -4. The time now is 17:15.

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