AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   1 player in one team (https://forums.alliedmods.net/showthread.php?t=40721)

BloodyNuker 07-02-2006 13:29

1 player in one team
 
Hello, i search and search and search but i donīt found how to show how many players are in team CT and how many players are in team Terrorist.

Beacause i need 1 player in team CT and the other all players in team terrorist

Tnkz!

jtp10181 07-02-2006 13:33

Re: 1 player in one team
 
Code:
new ctnum, ct[32], tnum, t[32]   get_players(ct, ctnum, "eg", "CT") get_players(t, tnum, "eg", "TERRORIST")

BloodyNuker 07-02-2006 13:48

Re: 1 player in one team
 
Tnkz im go to test, sorry but i have got a problem show this.. is my plugin

Code:

#include <amxmodx>
#include <amxmisc>
#include <engine>
#include <cstrike>
#include <fun>

new ctnum, ct[32], tnum, t[32]

public plugin_init()
{
  register_plugin("Mancha","1.0.0","lol")
  register_event("Damage", "Event_Damage", "b", "2!0", "3=0", "4!0" );
  register_event("ResetHUD", "sp_on", "be")
  return PLUGIN_CONTINUE
}

public client_putinserver(id)
{
set_task(1.0, "client_verificacion1", id, "b")
}

public client_verificacion1(id)
{
if( !is_user_connected(id) ) { return PLUGIN_HANDLED; }
cs_set_user_money(id, 0,1)
strip_user_weapons(id);
give_item(id, "weapon_knife")
get_players(t, tnum, "eg", "TERRORIST")
get_players(ct, ctnum, "eg", "CT")

if(tnum == 1)
{
               
}
else
{
cs_set_user_team(id,CS_TEAM_CT)
}

cs_set_user_money(id, 0,1)
cs_set_user_armor (id, 999, CsArmorType:2)
set_user_health(id, 999)
cs_set_weapon_ammo(id, 0)
return PLUGIN_CONTINUE
}


public Event_Damage()
{
        new damage = read_data(2);
        new victim = read_data(0);
        new attacker = get_user_attacker(victim)
        new team[9];

cs_set_user_team(victim,CS_TEAM_T)
cs_set_user_team(attacker,CS_TEAM_CT)

set_user_health(attacker, 999)
set_user_health(victim, 999)

cs_set_user_armor (attacker, 999, CsArmorType:2)
cs_set_user_armor (victim, 999, CsArmorType:2)

  return PLUGIN_CONTINUE
}

public sp_on(id)
{
      set_task(0.1, "client_verificacion1", id, "b")
  return PLUGIN_CONTINUE
}


When round start streep all weapons to all players if a terrorist i give to he a knife.

When this terrorist damage a counter terrorist the terrorist transfer to counter terrorist and the counter terrorist transfer to terrorist, and i need give a knife to the new terrorist this is not a problem but when streep the knife from old terrorist (the new Counter) the server crash. There are a solution to thease?

Tnkz!


All times are GMT -4. The time now is 08:05.

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