Skocz do zawartości

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.
  • Rozpoczynaj nowe tematy i odpowiedaj na inne
  • Zapisz się do tematów i for, aby otrzymywać automatyczne uaktualnienia
  • Dodawaj wydarzenia do kalendarza społecznościowego
  • Stwórz swój własny profil i zdobywaj nowych znajomych
  • Zdobywaj nowe doświadczenia

Dołączona grafika Dołączona grafika

Guest Message by DevFuse
 

Zdjęcie
Modyfikacja

Proszę zmodyfikować Plugin na flagę

modyfikacja

  • Nie możesz napisać tematu
  • Zaloguj się, aby dodać odpowiedź
14 odpowiedzi w tym temacie

#1 Blejder

    Banned

  • Zbanowany

Reputacja: 0
Nowy

  • Postów:26
  • GG:
  • Imię:Sławomir
  • Lokalizacja:Polska
Offline

Napisano 03.01.2014 12:27

Witam, proszę dodać do pluginów że było na flagę (tylko dla head admina)
 
1.PLUGIN

/* Plugin generated by AMXX-Studio */
#include <amxmodx>
#include <amxmisc>
#include <cstrike>
#include <hamsandwich>
 
#define PLUGIN "RespawnPlayer"
#define VERSION "1.0"
#define AUTHOR "FirebladeR"
 
new g_msgidSayText
 
public plugin_init() 
{
register_plugin(PLUGIN, VERSION, AUTHOR)
register_concmd("amx_respawn", "RespawnPlayer", ADMIN_BAN, "<name>")
}
 
public plugin_cfg()
{
g_msgidSayText = get_user_msgid ("SayText")
}
 
 
public RespawnPlayer(id, level, cid){
if (!cmd_access(id, level, cid, 2))
return PLUGIN_HANDLED
 
new arg[32]
read_argv(1, arg, 31)
new player = cmd_target(id, arg, CMDTARGET_OBEY_IMMUNITY | CMDTARGET_ALLOW_SELF)
 
if (!player)
return PLUGIN_HANDLED
 
new authid[32], authid2[32], name2[32], name[32]
 
get_user_authid(id, authid, 31)
get_user_authid(player, authid2, 31)
get_user_name(player, name2, 31)
get_user_name(id, name, 31)
 
if (!is_user_alive(player))
{
new kasa = cs_get_user_money(player);
 
ExecuteHamB(Ham_CS_RoundRespawn,player)
 
cs_set_user_money(player, kasa+1000)
console_print(id, " ")
console_print(id, "******[Respawn] Zrespiles %s****** ", name2)
console_print(id, " ")
 
console_print(player, " ")
console_print(player, "******[Respawn] Zostales zrespiony przez %s****** ", name)
console_print(player, " ")
col_mess(player, id, "!g[Respawn]!t Zostales zrespiony przez %s !", name)
}
 
else if(is_user_alive(player))
{
col_mess(id, id, "!g[Respawn]!t Nie mozna zrespic zywego gracza !", name)
}
 
return PLUGIN_HANDLED
}
 
col_mess(id, sender, string[], any:...)
{
static message[128]
message[0] = 0x01
vformat(message[1], 127, string, 4)
 
replace_all(message, 127, "!n", "^x01")
replace_all(message, 127, "!t", "^x03")
replace_all(message, 127, "!g", "^x04")
 
message_begin(MSG_ONE_UNRELIABLE, g_msgidSayText, _, id)
write_byte(sender)
write_string(message)
message_end()
}

}

2.PLUGIN
 





/* Plugin generated by AMXX-Studio */
#include <amxmodx>
#include <amxmisc>
#include <cstrike>
#include <fun>
 
 
#define PLUGIN  "Custom Frags And Deaths"
#define VERSION  "1.1"
#define AUTHOR  "FirebladeR"
 
 
#define ACCESS_LEVEL  ADMIN_BAN
 
 
public plugin_init()
{
register_plugin(PLUGIN, VERSION, AUTHOR)
register_concmd("amx_setfrags", "set_frags", ACCESS_LEVEL, "<nick or #userid> <Fragi>")
register_concmd("amx_setdeaths", "set_deaths", ACCESS_LEVEL, "<nick or #userid> <Dedy>") 
register_concmd("amx_setscore", "set_score", ACCESS_LEVEL, "<nick or #userid> <Fragi> <Zgony>") 
}
 
 
public set_frags(id, level, cid)
{
if (!cmd_access(id, level, cid, 3))
return PLUGIN_HANDLED
 
new arg1[33], arg2[33], newFrags
read_argv(1, arg1, 32)
read_argv(2, arg2, 32)
newFrags = str_to_num(arg2)
 
if(arg1[0] == '*')
{
new players[32], playersCount, i
get_players(players, playersCount)
 
for (i = 0; i < playersCount; i++)
{
if(!is_user_connected(players[i]))
return PLUGIN_CONTINUE
 
set_user_frags(players[i], newFrags)
}
}
 
else if (arg1[0] == '@')
{
new team[32], teamCount, i
 
if(equali(arg1[1], "T"))
get_players(team, teamCount, "e", "TERRORIST")
 
else if (equali(arg1[1], "CT"))
get_players(team, teamCount, "e", "CT")
 
for (i = 0; i < teamCount; i++)
{
 
if(!is_user_connected(team[i]))
return PLUGIN_CONTINUE
 
set_user_frags(team[i], newFrags)
}
}
 
else if (arg1[0] == '!')
{
new tag[32], tagCount, i
replace(arg1, 32, "!", "")
get_players(tag, tagCount, "f", arg1)
 
for (i = 0; i < tagCount; i++)
{
 
if(!is_user_connected(tag[i]))
return PLUGIN_CONTINUE
 
set_user_frags(tag[i], newFrags)
}
}
 
else
{
new target = cmd_target(id, arg1, 3)
 
if(!is_user_connected(target))
return PLUGIN_HANDLED
 
set_user_frags(target, newFrags)
}
 
return PLUGIN_HANDLED
 
}
 
public set_deaths(id, level, cid)
{
if (!cmd_access(id, level, cid, 3))
return PLUGIN_HANDLED
 
new arg1[33], arg2[33], newDeaths
read_argv(1, arg1, 32)
read_argv(2, arg2, 32)
newDeaths = str_to_num(arg2)
 
if(arg1[0] == '*')
{
new players[32], playersCount, i
get_players(players, playersCount)
 
for (i = 0; i < playersCount; i++)
{
if(!is_user_connected(players[i]))
return PLUGIN_CONTINUE
 
cs_set_user_deaths(players[i], newDeaths)
}
}
 
else if (arg1[0] == '@')
{
new team[32], teamCount, i
 
if(equali(arg1[1], "T"))
get_players(team, teamCount, "e", "TERRORIST")
 
else if (equali(arg1[1], "CT"))
get_players(team, teamCount, "e", "CT")
 
for (i = 0; i < teamCount; i++)
{
 
if(!is_user_connected(team[i]))
return PLUGIN_CONTINUE
 
cs_set_user_deaths(team[i], newDeaths)
}
}
 
else if (arg1[0] == '!')
{
new tag[32], tagCount, i
replace(arg1, 32, "!", "")
get_players(tag, tagCount, "f", arg1)
 
for (i = 0; i < tagCount; i++)
{
 
if(!is_user_connected(tag[i]))
return PLUGIN_CONTINUE
 
cs_set_user_deaths(tag[i], newDeaths)
}
}
 
else
{
new target = cmd_target(id, arg1, 3)
 
if(!is_user_connected(target))
return PLUGIN_HANDLED
 
cs_set_user_deaths(target, newDeaths) 
}
 
return PLUGIN_HANDLED
 
}
 
public set_score(id, level, cid)
{
if (!cmd_access(id, level, cid, 4))
return PLUGIN_HANDLED
 
new arg1[33], arg2[33], arg3[33], newFrags, newDeaths
 
read_argv(1, arg1, 32)
read_argv(2, arg2, 32)
read_argv(3, arg3, 32)
newFrags = str_to_num(arg2)
newDeaths = str_to_num(arg3)
 
if(arg1[0] == '*')
{
new players[32], playersCount, i
get_players(players, playersCount)
 
for (i = 0; i < playersCount; i++)
{
if(!is_user_connected(players[i]))
return PLUGIN_CONTINUE
 
set_user_frags(players[i], newFrags)
cs_set_user_deaths(players[i], newDeaths)
}
}
 
else if (arg1[0] == '@')
{
new team[32], teamCount, i
 
if(equali(arg1[1], "T"))
get_players(team, teamCount, "e", "TERRORIST")
 
else if (equali(arg1[1], "CT"))
get_players(team, teamCount, "e", "CT")
 
for (i = 0; i < teamCount; i++)
{
 
if(!is_user_connected(team[i]))
return PLUGIN_CONTINUE
 
set_user_frags(team[i], newFrags)
cs_set_user_deaths(team[i], newDeaths)
}
}
 
else if (arg1[0] == '!')
{
new tag[32], tagCount, i
replace(arg1, 32, "!", "")
get_players(tag, tagCount, "f", arg1)
 
for (i = 0; i < tagCount; i++)
{
 
if(!is_user_connected(tag[i]))
return PLUGIN_CONTINUE
 
set_user_frags(tag[i], newFrags)
cs_set_user_deaths(tag[i], newDeaths) 
}
}
 
else
{
new target = cmd_target(id, arg1, 3)
 
if(!is_user_connected(target))
return PLUGIN_HANDLED
 
set_user_frags(target, newFrags)
cs_set_user_deaths(target, newDeaths) 
}
 
return PLUGIN_HANDLED
}

Z GÓRY DZIĘKUJE! +



#2 HaX GaminG

    Pomocny

  • Użytkownik

Reputacja: 18
Początkujący

  • Postów:73
  • GG:
  • Lokalizacja:wawa
Offline

Napisano 03.01.2014 12:42

1.

/* Plugin generated by AMXX-Studio */
#include <amxmodx>
#include <amxmisc>
#include <cstrike>
#include <hamsandwich>
 
#define PLUGIN "RespawnPlayer"
#define VERSION "1.0"
#define AUTHOR "FirebladeR"
 
new g_msgidSayText
 
public plugin_init() 
{
register_plugin(PLUGIN, VERSION, AUTHOR)
register_concmd("amx_respawn", "RespawnPlayer", ADMIN_IMMUNITY, "<name>")
}
 
public plugin_cfg()
{
g_msgidSayText = get_user_msgid ("SayText")
}
 
 
public RespawnPlayer(id, level, cid){
if (!cmd_access(id, level, cid, 2))
return PLUGIN_HANDLED
 
new arg[32]
read_argv(1, arg, 31)
new player = cmd_target(id, arg, CMDTARGET_OBEY_IMMUNITY | CMDTARGET_ALLOW_SELF)
 
if (!player)
return PLUGIN_HANDLED
 
new authid[32], authid2[32], name2[32], name[32]
 
get_user_authid(id, authid, 31)
get_user_authid(player, authid2, 31)
get_user_name(player, name2, 31)
get_user_name(id, name, 31)
 
if (!is_user_alive(player))
{
new kasa = cs_get_user_money(player);
 
ExecuteHamB(Ham_CS_RoundRespawn,player)
 
cs_set_user_money(player, kasa+1000)
console_print(id, " ")
console_print(id, "******[Respawn] Zrespiles %s****** ", name2)
console_print(id, " ")
 
console_print(player, " ")
console_print(player, "******[Respawn] Zostales zrespiony przez %s****** ", name)
console_print(player, " ")
col_mess(player, id, "!g[Respawn]!t Zostales zrespiony przez %s !", name)
}
 
else if(is_user_alive(player))
{
col_mess(id, id, "!g[Respawn]!t Nie mozna zrespic zywego gracza !", name)
}
 
return PLUGIN_HANDLED
}
 
col_mess(id, sender, string[], any:...)
{
static message[128]
message[0] = 0x01
vformat(message[1], 127, string, 4)
 
replace_all(message, 127, "!n", "^x01")
replace_all(message, 127, "!t", "^x03")
replace_all(message, 127, "!g", "^x04")
 
message_begin(MSG_ONE_UNRELIABLE, g_msgidSayText, _, id)
write_byte(sender)
write_string(message)
message_end()
}

}

2.

/* Plugin generated by AMXX-Studio */
#include <amxmodx>
#include <amxmisc>
#include <cstrike>
#include <fun>
 
 
#define PLUGIN "Custom Frags And Deaths"
#define VERSION "1.1"
#define AUTHOR "FirebladeR"
 
 
#define ACCESS_LEVEL ADMIN_IMMUNITY
 
 
public plugin_init()
{
register_plugin(PLUGIN, VERSION, AUTHOR)
register_concmd("amx_setfrags", "set_frags", ACCESS_LEVEL, "<nick or #userid> <Fragi>")
register_concmd("amx_setdeaths", "set_deaths", ACCESS_LEVEL, "<nick or #userid> <Dedy>")
register_concmd("amx_setscore", "set_score", ACCESS_LEVEL, "<nick or #userid> <Fragi> <Zgony>") 
}
 
 
public set_frags(id, level, cid)
{
if (!cmd_access(id, level, cid, 3))
return PLUGIN_HANDLED
 
new arg1[33], arg2[33], newFrags
read_argv(1, arg1, 32)
read_argv(2, arg2, 32)
newFrags = str_to_num(arg2)
 
if(arg1[0] == '*')
{
new players[32], playersCount, i
get_players(players, playersCount)
 
for (i = 0; i < playersCount; i++)
{
if(!is_user_connected(players[i]))
return PLUGIN_CONTINUE
 
set_user_frags(players[i], newFrags)
}
}
 
else if (arg1[0] == '@')
{
new team[32], teamCount, i
 
if(equali(arg1[1], "T"))
get_players(team, teamCount, "e", "TERRORIST")
 
else if (equali(arg1[1], "CT"))
get_players(team, teamCount, "e", "CT")
 
for (i = 0; i < teamCount; i++)
{
 
if(!is_user_connected(team[i]))
return PLUGIN_CONTINUE
 
set_user_frags(team[i], newFrags)
}
}
 
else if (arg1[0] == '!')
{
new tag[32], tagCount, i
replace(arg1, 32, "!", "")
get_players(tag, tagCount, "f", arg1)
 
for (i = 0; i < tagCount; i++)
{
 
if(!is_user_connected(tag[i]))
return PLUGIN_CONTINUE
 
set_user_frags(tag[i], newFrags)
}
}
 
else
{
new target = cmd_target(id, arg1, 3)
 
if(!is_user_connected(target))
return PLUGIN_HANDLED
 
set_user_frags(target, newFrags)
}
 
return PLUGIN_HANDLED
 
}
 
public set_deaths(id, level, cid)
{
if (!cmd_access(id, level, cid, 3))
return PLUGIN_HANDLED
 
new arg1[33], arg2[33], newDeaths
read_argv(1, arg1, 32)
read_argv(2, arg2, 32)
newDeaths = str_to_num(arg2)
 
if(arg1[0] == '*')
{
new players[32], playersCount, i
get_players(players, playersCount)
 
for (i = 0; i < playersCount; i++)
{
if(!is_user_connected(players[i]))
return PLUGIN_CONTINUE
 
cs_set_user_deaths(players[i], newDeaths)
}
}
 
else if (arg1[0] == '@')
{
new team[32], teamCount, i
 
if(equali(arg1[1], "T"))
get_players(team, teamCount, "e", "TERRORIST")
 
else if (equali(arg1[1], "CT"))
get_players(team, teamCount, "e", "CT")
 
for (i = 0; i < teamCount; i++)
{
 
if(!is_user_connected(team[i]))
return PLUGIN_CONTINUE
 
cs_set_user_deaths(team[i], newDeaths)
}
}
 
else if (arg1[0] == '!')
{
new tag[32], tagCount, i
replace(arg1, 32, "!", "")
get_players(tag, tagCount, "f", arg1)
 
for (i = 0; i < tagCount; i++)
{
 
if(!is_user_connected(tag[i]))
return PLUGIN_CONTINUE
 
cs_set_user_deaths(tag[i], newDeaths)
}
}
 
else
{
new target = cmd_target(id, arg1, 3)
 
if(!is_user_connected(target))
return PLUGIN_HANDLED
 
cs_set_user_deaths(target, newDeaths) 
}
 
return PLUGIN_HANDLED
 
}
 
public set_score(id, level, cid)
{
if (!cmd_access(id, level, cid, 4))
return PLUGIN_HANDLED
 
new arg1[33], arg2[33], arg3[33], newFrags, newDeaths
 
read_argv(1, arg1, 32)
read_argv(2, arg2, 32)
read_argv(3, arg3, 32)
newFrags = str_to_num(arg2)
newDeaths = str_to_num(arg3)
 
if(arg1[0] == '*')
{
new players[32], playersCount, i
get_players(players, playersCount)
 
for (i = 0; i < playersCount; i++)
{
if(!is_user_connected(players[i]))
return PLUGIN_CONTINUE
 
set_user_frags(players[i], newFrags)
cs_set_user_deaths(players[i], newDeaths)
}
}
 
else if (arg1[0] == '@')
{
new team[32], teamCount, i
 
if(equali(arg1[1], "T"))
get_players(team, teamCount, "e", "TERRORIST")
 
else if (equali(arg1[1], "CT"))
get_players(team, teamCount, "e", "CT")
 
for (i = 0; i < teamCount; i++)
{
 
if(!is_user_connected(team[i]))
return PLUGIN_CONTINUE
 
set_user_frags(team[i], newFrags)
cs_set_user_deaths(team[i], newDeaths)
}
}
 
else if (arg1[0] == '!')
{
new tag[32], tagCount, i
replace(arg1, 32, "!", "")
get_players(tag, tagCount, "f", arg1)
 
for (i = 0; i < tagCount; i++)
{
 
if(!is_user_connected(tag[i]))
return PLUGIN_CONTINUE
 
set_user_frags(tag[i], newFrags)
cs_set_user_deaths(tag[i], newDeaths) 
}
}
 
else
{
new target = cmd_target(id, arg1, 3)
 
if(!is_user_connected(target))
return PLUGIN_HANDLED
 
set_user_frags(target, newFrags)
cs_set_user_deaths(target, newDeaths) 
}
 
return PLUGIN_HANDLED
}

Sprawdź czy dobrze ,bo jestem w tym początkujący :)

 

To jest na flagę "a"  jbc :D

 


Użytkownik HaX GaminG edytował ten post 03.01.2014 12:57

  • +
  • -
  • 1

Zapraszam na mój serwer counter strike 1.6 - DD2+BF2 >> Free Odznaka [Weteran]

IP:213.189.52.237:27471

b_350_20_5A6C3E_383F2D_D2E1B5_2E3226.png

Cs:GO [DD2/INF/NUKE/TRAIN] | 31.186.82.185:28060

b_350_20_5A6C3E_383F2D_D2E1B5_2E3226.png

Forum: CsW


#3 corel

    Profesjonalista

  • Użytkownik

Reputacja: 25
Życzliwy

  • Postów:216
  • GG:
  • Imię:Olek
  • Lokalizacja:Świdnica
Offline

Napisano 03.01.2014 13:03

W pierwszym zmieniasz po prostu ADMIN_BAN na ADMIN_LEVEL_X i za x sobie podstawiasz flage którą tylko ty masz i w drugim pluginie masz dokładnie tak samo


  • +
  • -
  • 1

PCL.PL znowu powraca ! Zapraszam serdecznie :)


#4 Blejder

    Banned

  • Autor tematu
  • Zbanowany

Reputacja: 0
Nowy

  • Postów:26
  • GG:
  • Imię:Sławomir
  • Lokalizacja:Polska
Offline

Napisano 03.01.2014 13:09

dzięki corel



#5 Blejder

    Banned

  • Autor tematu
  • Zbanowany

Reputacja: 0
Nowy

  • Postów:26
  • GG:
  • Imię:Sławomir
  • Lokalizacja:Polska
Offline

Napisano 03.01.2014 13:15

nie działa 



#6 corel

    Profesjonalista

  • Użytkownik

Reputacja: 25
Życzliwy

  • Postów:216
  • GG:
  • Imię:Olek
  • Lokalizacja:Świdnica
Offline

Napisano 03.01.2014 13:27

Ale co nie działa ?  Podmień flage ADMIN_BAN na ADMIN_LEVEL_C i w users.ini daj sobie flage o , ale innym nie dawaj i będzie śmigać :)


  • +
  • -
  • 1

PCL.PL znowu powraca ! Zapraszam serdecznie :)


#7 HaX GaminG

    Pomocny

  • Użytkownik

Reputacja: 18
Początkujący

  • Postów:73
  • GG:
  • Lokalizacja:wawa
Offline

Napisano 03.01.2014 13:38

To moje nie działa ?? dodaj sobie flagę "a" do pozostałych i powinno śmigać ...

A jeśli nadal niedziała to opisz jak to robisz :P Bo nwm czy Ty samego .sma nie wgrywasz :D


  • +
  • -
  • 2

Zapraszam na mój serwer counter strike 1.6 - DD2+BF2 >> Free Odznaka [Weteran]

IP:213.189.52.237:27471

b_350_20_5A6C3E_383F2D_D2E1B5_2E3226.png

Cs:GO [DD2/INF/NUKE/TRAIN] | 31.186.82.185:28060

b_350_20_5A6C3E_383F2D_D2E1B5_2E3226.png

Forum: CsW


#8 Blejder

    Banned

  • Autor tematu
  • Zbanowany

Reputacja: 0
Nowy

  • Postów:26
  • GG:
  • Imię:Sławomir
  • Lokalizacja:Polska
Offline

Napisano 03.01.2014 14:59

Zwykły gracz nie może użyć komend amx_respawn i amx_setfrags 

Admin z flagą bdeijkmnopqrstu może użyć komend, co nie powinien bo nie ma flagi C

 

ja wgrywam na serwer sma i skompilowanego amx



#9 corel

    Profesjonalista

  • Użytkownik

Reputacja: 25
Życzliwy

  • Postów:216
  • GG:
  • Imię:Olek
  • Lokalizacja:Świdnica
Offline

Napisano 03.01.2014 15:05

ADMIN_LEVEL_C to flaga  "o" czyli skoro będzie miał takie flagi "abcdeijkmnpqrstu" to nei będzie mógł użyć tych komend


  • +
  • -
  • 1

PCL.PL znowu powraca ! Zapraszam serdecznie :)


#10 Blejder

    Banned

  • Autor tematu
  • Zbanowany

Reputacja: 0
Nowy

  • Postów:26
  • GG:
  • Imię:Sławomir
  • Lokalizacja:Polska
Offline

Napisano 03.01.2014 15:24

nadal nie działa :(



#11 corel

    Profesjonalista

  • Użytkownik

Reputacja: 25
Życzliwy

  • Postów:216
  • GG:
  • Imię:Olek
  • Lokalizacja:Świdnica
Offline

Napisano 03.01.2014 15:44

1 sprawdź czy pliki amxx na 100% znajdują się w odpowiednim folderze

2 sprawdź czy pluginy masz dopisane do plugins.ini

3 czy resetowałeś mape po wgraniu pluginu

4 sprawdz czy masz odblokowane wymagane moduly

5 sprawdz czy na pewno dobrze wpisujesz komendy ( dot 1 pluginu <gracz musi być martwy żeby go ożywić >)


  • +
  • -
  • 0

PCL.PL znowu powraca ! Zapraszam serdecznie :)


#12 Blejder

    Banned

  • Autor tematu
  • Zbanowany

Reputacja: 0
Nowy

  • Postów:26
  • GG:
  • Imię:Sławomir
  • Lokalizacja:Polska
Offline

Napisano 03.01.2014 17:08

Komendy działają, tylko flaga coś nie chce działać.



#13 Blejder

    Banned

  • Autor tematu
  • Zbanowany

Reputacja: 0
Nowy

  • Postów:26
  • GG:
  • Imię:Sławomir
  • Lokalizacja:Polska
Offline

Napisano 03.01.2014 17:09

Komendy działają, tylko flaga coś nie chce działać.



#14 Wielkie Jol

    REPREZENTUJE SIEBIE I CAŁĄ GALAKTYKĘ

  • Support Team

Reputacja: 683
Wszechmogący

  • Postów:1 258
  • GG:
  • Lokalizacja:AMXX
Offline

Napisano 03.01.2014 17:13

Obydwa na flage admin_immunity ( a ), która z reguły jest tylko przypisana dla H@

/* Plugin generated by AMXX-Studio */
#include <amxmodx>
#include <amxmisc>
#include <cstrike>
#include <hamsandwich>

#define PLUGIN "RespawnPlayer"
#define VERSION "1.0"
#define AUTHOR "FirebladeR"

new g_msgidSayText

public plugin_init()
{
    register_plugin(PLUGIN, VERSION, AUTHOR)
    register_concmd("amx_respawn", "RespawnPlayer", ADMIN_IMMUNITY, "<name>")
}

public plugin_cfg()
{
    g_msgidSayText = get_user_msgid ("SayText")
}


public RespawnPlayer(id, level, cid){
    if (!(get_user_flags(id) & ADMIN_IMMUNITY))
        return PLUGIN_HANDLED
    
    new arg[32]
    read_argv(1, arg, 31)
    new player = cmd_target(id, arg, CMDTARGET_OBEY_IMMUNITY | CMDTARGET_ALLOW_SELF)
    
    if (!player)
        return PLUGIN_HANDLED
    
    new authid[32], authid2[32], name2[32], name[32]
    
    get_user_authid(id, authid, 31)
    get_user_authid(player, authid2, 31)
    get_user_name(player, name2, 31)
    get_user_name(id, name, 31)
    
    if (!is_user_alive(player))
    {
        new kasa = cs_get_user_money(player);
        
        ExecuteHamB(Ham_CS_RoundRespawn,player)
        
        cs_set_user_money(player, kasa+1000)
        console_print(id, " ")
        console_print(id, "******[Respawn] Zrespiles %s****** ", name2)
        console_print(id, " ")
        
        console_print(player, " ")
        console_print(player, "******[Respawn] Zostales zrespiony przez %s****** ", name)
        console_print(player, " ")
        col_mess(player, id, "!g[Respawn]!t Zostales zrespiony przez %s !", name)
    }
    
    else if(is_user_alive(player))
    {
        col_mess(id, id, "!g[Respawn]!t Nie mozna zrespic zywego gracza !", name)
    }
    
    return PLUGIN_HANDLED
}

col_mess(id, sender, string[], any:...)
{
static message[128]
message[0] = 0x01
vformat(message[1], 127, string, 4)

replace_all(message, 127, "!n", "^x01")
replace_all(message, 127, "!t", "^x03")
replace_all(message, 127, "!g", "^x04")

message_begin(MSG_ONE_UNRELIABLE, g_msgidSayText, _, id)
write_byte(sender)
write_string(message)
message_end()
}

/* Plugin generated by AMXX-Studio */
#include <amxmodx>
#include <amxmisc>
#include <cstrike>
#include <fun>


#define PLUGIN  "Custom Frags And Deaths"
#define VERSION  "1.1"
#define AUTHOR  "FirebladeR"


#define ACCESS_LEVEL  ADMIN_BAN


public plugin_init()
{
    register_plugin(PLUGIN, VERSION, AUTHOR)
    register_concmd("amx_setfrags", "set_frags", ADMIN_IMMUNITY, "<nick or #userid> <Fragi>")
    register_concmd("amx_setdeaths", "set_deaths", ADMIN_IMMUNITY, "<nick or #userid> <Dedy>")
    register_concmd("amx_setscore", "set_score", ADMIN_IMMUNITY, "<nick or #userid> <Fragi> <Zgony>")
}


public set_frags(id, level, cid)
{
    if (!(get_user_flags(id) & ADMIN_IMMUNITY))
        return PLUGIN_HANDLED
    
    new arg1[33], arg2[33], newFrags
    read_argv(1, arg1, 32)
    read_argv(2, arg2, 32)
    newFrags = str_to_num(arg2)
    
    if(arg1[0] == '*')
    {
        new players[32], playersCount, i
        get_players(players, playersCount)
        
        for (i = 0; i < playersCount; i++)
        {
            if(!is_user_connected(players[i]))
                return PLUGIN_CONTINUE
            
            set_user_frags(players[i], newFrags)
        }
    }
    
    else if (arg1[0] == '@')
    {
        new team[32], teamCount, i
        
        if(equali(arg1[1], "T"))
            get_players(team, teamCount, "e", "TERRORIST")
        
        else if (equali(arg1[1], "CT"))
            get_players(team, teamCount, "e", "CT")
        
        for (i = 0; i < teamCount; i++)
        {
            
            if(!is_user_connected(team[i]))
                return PLUGIN_CONTINUE
            
            set_user_frags(team[i], newFrags)
        }
    }
    
    else if (arg1[0] == '!')
    {
        new tag[32], tagCount, i
        replace(arg1, 32, "!", "")
        get_players(tag, tagCount, "f", arg1)
        
        for (i = 0; i < tagCount; i++)
        {
            
            if(!is_user_connected(tag[i]))
                return PLUGIN_CONTINUE
            
            set_user_frags(tag[i], newFrags)
        }
    }
    
    else
    {
        new target = cmd_target(id, arg1, 3)
        
        if(!is_user_connected(target))
            return PLUGIN_HANDLED
        
        set_user_frags(target, newFrags)
    }
    
    return PLUGIN_HANDLED
    
}

public set_deaths(id, level, cid)
{
    if (!(get_user_flags(id) & ADMIN_IMMUNITY))
        return PLUGIN_HANDLED
    
    new arg1[33], arg2[33], newDeaths
    read_argv(1, arg1, 32)
    read_argv(2, arg2, 32)
    newDeaths = str_to_num(arg2)
    
    if(arg1[0] == '*')
    {
        new players[32], playersCount, i
        get_players(players, playersCount)
        
        for (i = 0; i < playersCount; i++)
        {
            if(!is_user_connected(players[i]))
                return PLUGIN_CONTINUE
            
            cs_set_user_deaths(players[i], newDeaths)
        }
    }
    
    else if (arg1[0] == '@')
    {
        new team[32], teamCount, i
        
        if(equali(arg1[1], "T"))
            get_players(team, teamCount, "e", "TERRORIST")
        
        else if (equali(arg1[1], "CT"))
            get_players(team, teamCount, "e", "CT")
        
        for (i = 0; i < teamCount; i++)
        {
            
            if(!is_user_connected(team[i]))
                return PLUGIN_CONTINUE
            
            cs_set_user_deaths(team[i], newDeaths)
        }
    }
    
    else if (arg1[0] == '!')
    {
        new tag[32], tagCount, i
        replace(arg1, 32, "!", "")
        get_players(tag, tagCount, "f", arg1)
        
        for (i = 0; i < tagCount; i++)
        {
            
            if(!is_user_connected(tag[i]))
                return PLUGIN_CONTINUE
            
            cs_set_user_deaths(tag[i], newDeaths)
        }
    }
    
    else
    {
        new target = cmd_target(id, arg1, 3)
        
        if(!is_user_connected(target))
            return PLUGIN_HANDLED
        
        cs_set_user_deaths(target, newDeaths)
    }
    
    return PLUGIN_HANDLED
    
}

public set_score(id, level, cid)
{
    if (!(get_user_flags(id) & ADMIN_IMMUNITY))
        return PLUGIN_HANDLED
    
    new arg1[33], arg2[33], arg3[33], newFrags, newDeaths
    
    read_argv(1, arg1, 32)
    read_argv(2, arg2, 32)
    read_argv(3, arg3, 32)
    newFrags = str_to_num(arg2)
    newDeaths = str_to_num(arg3)
    
    if(arg1[0] == '*')
    {
        new players[32], playersCount, i
        get_players(players, playersCount)
        
        for (i = 0; i < playersCount; i++)
        {
            if(!is_user_connected(players[i]))
                return PLUGIN_CONTINUE
            
            set_user_frags(players[i], newFrags)
            cs_set_user_deaths(players[i], newDeaths)
        }
    }
    
    else if (arg1[0] == '@')
    {
        new team[32], teamCount, i
        
        if(equali(arg1[1], "T"))
            get_players(team, teamCount, "e", "TERRORIST")
        
        else if (equali(arg1[1], "CT"))
            get_players(team, teamCount, "e", "CT")
        
        for (i = 0; i < teamCount; i++)
        {
            
            if(!is_user_connected(team[i]))
                return PLUGIN_CONTINUE
            
            set_user_frags(team[i], newFrags)
            cs_set_user_deaths(team[i], newDeaths)
        }
    }
    
    else if (arg1[0] == '!')
    {
        new tag[32], tagCount, i
        replace(arg1, 32, "!", "")
        get_players(tag, tagCount, "f", arg1)
        
        for (i = 0; i < tagCount; i++)
        {
            
            if(!is_user_connected(tag[i]))
                return PLUGIN_CONTINUE
            
            set_user_frags(tag[i], newFrags)
            cs_set_user_deaths(tag[i], newDeaths)
        }
    }
    
    else
    {
        new target = cmd_target(id, arg1, 3)
        
        if(!is_user_connected(target))
            return PLUGIN_HANDLED
        
        set_user_frags(target, newFrags)
        cs_set_user_deaths(target, newDeaths)
    }
    
    return PLUGIN_HANDLED
}

  • +
  • -
  • 1

"Żaden etyczny inżynier oprogramowania nie zgodzi się napisać procedury zniszczBagdad. Jego poczucie etyki domaga się, aby napisał procedurę zniszczMiasto, a Bagdad przekazał jako parametr" - Nathaniel Borenstein.


#15 Blejder

    Banned

  • Autor tematu
  • Zbanowany

Reputacja: 0
Nowy

  • Postów:26
  • GG:
  • Imię:Sławomir
  • Lokalizacja:Polska
Offline

Napisano 03.01.2014 22:17

Dzięki już działa :)

 

Temat można zamknąć.







Również z jednym lub większą ilością słów kluczowych: modyfikacja

Użytkownicy przeglądający ten temat: 0

0 użytkowników, 0 gości, 0 anonimowych