Fixed some include bugs

Fixed adminslots not showing right slots on connect
Fixed RTEs on wrong team
This commit is contained in:
David Anderson 2004-09-19 00:52:15 +00:00
parent 2e24077b77
commit d14c107db1
4 changed files with 15 additions and 5 deletions

View File

@ -50,6 +50,10 @@ public plugin_init() {
random_num('A','Z') , random_num('A','Z') ,random_num('A','Z'),random_num('A','Z') )
register_clcmd( g_cmdLoopback, "ackSignal" )
new maxplayers = get_maxplayers()
new players = get_playersnum(1)
new limit = maxplayers - get_cvar_num("amx_reservation")
setVisibleSlots(players, maxplayers, limit)
}
public ackSignal(id) {

View File

@ -509,6 +509,9 @@ public cmdMenu(id,level,cid){
}
checkRest(id,menu,key){
new team = get_user_team(id)
if (team != 1 && team != 2)
return PLUGIN_HANDLED
if ( g_blockPos[ (menu * 8 + key) + (get_user_team(id) - 1) * 56 ] ){
engclient_cmd(id,"menuselect","10")
client_print(id,print_center, g_Restricted )

View File

@ -15,7 +15,7 @@
/* Function is called after grenade throw */
forward grenade_throw(index,greindex,wId);
/* Example: for full stamina use set_player_stamina(1,STAMINA_SET,100,100) */
/* Example: for full stamina use dod_player_stamina(1,STAMINA_SET,100,100) */
/* value is from 0 - 100 */
native dod_set_stamina(index,set=STAMINA_SET,minvalue=0,maxvalue=100);
@ -53,7 +53,10 @@ native dod_get_pl_teamname(index,szName[],len);
/* Returns 1 is player weapon is deployed (bar,mg..) */
native dod_is_deployed(index);
/*Sets the ammo of the specified weapon entity id */
native dod_set_user_ammo(index,wid,value);
/*Gets the ammo of the specified weapon entity id */
native dod_get_user_ammo(index,wid);

View File

@ -53,7 +53,7 @@ stock gpgobals_time()
return halflife_time()
stock get_range(ida, idb)
return entity_get_range(ida, idb)
return entity_range(ida, idb)
stock supercede()
return 0
@ -210,7 +210,7 @@ stock ns2amx_gethives()
/* Returns 1 if the two entities are within the given range. */
stock ns2amx_inrange(ida,idb,range)
{
if (entity_get_range(ida,idb) <= range)
if (entity_range(ida,idb) <= range)
return 1
return 0
}