#include <amxmodx>
#include <amxmisc>
#include <cstrike>
#include <hamsandwich>
#define PLUGIN "Spec/Back"
#define AUTHOR "kramesa"
#define VERSION "v1.1"
new bool:TerroristTeam[33];
new CountTime[33];
public plugin_init()
{
register_plugin(PLUGIN, VERSION, AUTHOR);
register_clcmd("say /spec", "Spec");
register_clcmd("say /back", "Back");
register_cvar("amx_spectimes", "3");
}
public Spec(id)
{
if(is_user_admin(id))
{
if(CountTime[id] >= get_cvar_num("amx_spectimes"))
{
client_print(id, print_chat, "[AMXX] Sorry, you cant use this command more of %d times.", get_cvar_num("amx_spectimes"));
return PLUGIN_HANDLED;
}
if(cs_get_user_team(id) == CS_TEAM_T)
{
TerroristTeam[id] = true;
}
else
{
TerroristTeam[id] = false;
}
if(cs_get_user_team(id) == CS_TEAM_SPECTATOR)
{
client_print(id, print_chat, "[AMXX] You already Spectator.");
return PLUGIN_HANDLED;
}
else
{
cs_set_user_team(id, CS_TEAM_SPECTATOR);
user_kill(id, 1);
client_print(id, print_chat, "[AMXX] You are now in Spectator.");
CountTime[id]++;
return PLUGIN_HANDLED;
}
}
return PLUGIN_HANDLED;
}
public Back(id)
{
if(is_user_admin(id))
{
if(cs_get_user_team(id) != CS_TEAM_SPECTATOR)
{
client_print(id, print_chat, "[AMXX] You already Non-Spectator.");
return PLUGIN_HANDLED;
}
if(cs_get_user_team(id) == CS_TEAM_SPECTATOR)
{
if(TerroristTeam[id] == true)
{
cs_set_user_team(id, CS_TEAM_T);
client_print(id, print_chat, "[AMXX] You are now in Terrorist team.");
cs_set_user_deaths(id, 0);
ExecuteHam(Ham_CS_RoundRespawn, id);
return PLUGIN_HANDLED;
}
if(TerroristTeam[id] == false)
{
cs_set_user_team(id, CS_TEAM_CT);
client_print(id, print_chat, "[AMXX] You are now in Counter-Terrorist team.");
cs_set_user_deaths(id, 0);
ExecuteHam(Ham_CS_RoundRespawn, id);
return PLUGIN_HANDLED;
}
}
}
return PLUGIN_HANDLED;
}
Witamy w Nieoficjalnym polskim support'cie AMX Mod X
Witamy w Nieoficjalnym polskim support'cie AMX Mod X, jak w większości społeczności internetowych musisz się zarejestrować aby móc odpowiadać lub zakładać nowe tematy, ale nie bój się to jest prosty proces w którym wymagamy minimalnych informacji.
|
#1
Napisano 29.02.2012 19:36
Cs-Bosman.pl [De_Dust2] [FFA] [1000 FPS] - IP 188.116.33.132:27050
Cs-Bosman.pl [De_Dust2] [BF2] [1000 FPS] - IP 79.133.198.50:27055
Cs-Bosman.pl [GunGameExpMod] [600 FPS] - IP 31.186.81.18:27016
#2
Napisano 01.03.2012 02:39
if(is_user_admin(id))
i zbędne klamry ?
Użytkownik Joke edytował ten post 01.03.2012 02:40
#3
Napisano 01.03.2012 13:30
if(is_user_admin(id))
trzeba czymś innym zastąpić..
może troszkę jaśniej ? może troszkę konkretniej ?i zbędne klamry ?
Lepiej żeby wypowiedział się ktoś bardziej kompetentny.
Cs-Bosman.pl [De_Dust2] [FFA] [1000 FPS] - IP 188.116.33.132:27050
Cs-Bosman.pl [De_Dust2] [BF2] [1000 FPS] - IP 79.133.198.50:27055
Cs-Bosman.pl [GunGameExpMod] [600 FPS] - IP 31.186.81.18:27016
#4
Napisano 01.03.2012 13:58
#include <amxmodx> #include <amxmisc> #include <cstrike> #include <hamsandwich> #define PLUGIN "Spec/Back" #define AUTHOR "kramesa" #define VERSION "v1.1" new bool:TerroristTeam[33]; new CountTime[33]; public plugin_init() { register_plugin(PLUGIN, VERSION, AUTHOR); register_clcmd("say /spec", "Spec"); register_clcmd("say /back", "Back"); register_cvar("amx_spectimes", "3"); } public Spec(id) { if(CountTime[id] >= get_cvar_num("amx_spectimes")) { client_print(id, print_chat, "[AMXX] Sorry, you cant use this command more of %d times.", get_cvar_num("amx_spectimes")); return PLUGIN_HANDLED; } if(cs_get_user_team(id) == CS_TEAM_T) { TerroristTeam[id] = true; } else { TerroristTeam[id] = false; } if(cs_get_user_team(id) == CS_TEAM_SPECTATOR) { client_print(id, print_chat, "[AMXX] You already Spectator."); return PLUGIN_HANDLED; } else { cs_set_user_team(id, CS_TEAM_SPECTATOR); user_kill(id, 1); client_print(id, print_chat, "[AMXX] You are now in Spectator."); CountTime[id]++; return PLUGIN_HANDLED; } return PLUGIN_HANDLED; } public Back(id) { if(cs_get_user_team(id) != CS_TEAM_SPECTATOR) { client_print(id, print_chat, "[AMXX] You already Non-Spectator."); return PLUGIN_HANDLED; } if(cs_get_user_team(id) == CS_TEAM_SPECTATOR) { if(TerroristTeam[id] == true) { cs_set_user_team(id, CS_TEAM_T); client_print(id, print_chat, "[AMXX] You are now in Terrorist team."); cs_set_user_deaths(id, 0); ExecuteHam(Ham_CS_RoundRespawn, id); return PLUGIN_HANDLED; } if(TerroristTeam[id] == false) { cs_set_user_team(id, CS_TEAM_CT); client_print(id, print_chat, "[AMXX] You are now in Counter-Terrorist team."); cs_set_user_deaths(id, 0); ExecuteHam(Ham_CS_RoundRespawn, id); return PLUGIN_HANDLED; } } return PLUGIN_HANDLED; }
If you can dream it, you can do it.
Również z jednym lub większą ilością słów kluczowych: Modyfikacja
Inny
Dodanie Broni do PaintBallNapisany przez One ShooT, 05.02.2024 inny, modyfikacja |
|
||||
Modyfikacja
prośba o przerobienie pluginuprośba Napisany przez bili, 06.02.2021 modyfikacja |
|
||||
Modyfikacja
Prośba o dodanie modelu do vipa z generatoraNapisany przez Vanilla, 01.02.2021 modyfikacja |
|
||||
Modyfikacja
Plugin na przenikanie/spadochron pod komendąNapisany przez Polonez, 22.01.2021 modyfikacja |
|
||||
|
[ROZWIĄZANE] Modyfikacja pluginuNapisany przez _.-*`PaniQ*-._, 11.01.2021 modyfikacja |
|
Użytkownicy przeglądający ten temat: 0
0 użytkowników, 0 gości, 0 anonimowych