/*
This is a simple plugin I made that will just restart a players score
making their deaths and kills set to 0, this is to help players out a
little bit because they no longer have to reconnect or retry if they
want their score to start over, they can just type a simple command
---------------------------------
--------- MADE BY SILENTTT -----
------ MADE BY SILENTTT ------
-- MADE BY SILENTTT -------
------ MADE BY SILENTTT ------
--------- MADE BY SILENTTT -----
---------------------------------
*/
#include <amxmodx>
#include <amxmisc>
#include <cstrike>
#include <fun>
#define adtime 600.0 //Default of 10 minuites
new pcvar_Advertise
new pcvar_Display
public plugin_init()
{
register_plugin("Reset Score", "1.0", "Silenttt")
//You may type /resetscore or /restartscore
register_clcmd("say /resetscore", "reset_score")
register_clcmd("say /restartscore", "reset_score")
register_clcmd("say /rs", "reset_score")
register_clcmd("say /usunstaty", "reset_score")
//This command by default will be set at 0
//Change it to 1 in server.cfg if you want
//A message to be shown to advertise this.
pcvar_Advertise = register_cvar("sv_rsadvertise", "0")
//This command by default is also 0
//Change it to 1 in server.cfg if you want
//It to show who reset their scores when they do it
pcvar_Display = register_cvar("sv_rsdisplay", "0")
if(get_cvar_num("sv_rsadvertise") == 1)
{
set_task(adtime, "advertise", _, _, _, "b")
}
}
public reset_score(id)
{
//These both NEED to be done twice, otherwise your frags wont
//until the next round
cs_set_user_deaths(id, 0)
set_user_frags(id, 0)
cs_set_user_deaths(id, 0)
set_user_frags(id, 0)
if(get_pcvar_num(pcvar_Display) == 1)
{
new name[33]
get_user_name(id, name, 32)
client_print(0, print_chat, "%s wlasnie zresetowal sobie statystyki", name)
}
else
{
client_print(id, print_chat, "Wlasnie zresetowales sobie statystki")
}
}
public advertise()
{
set_hudmessage(255, 0, 0, -1.0, 0.20, 0, 0.2, 12.0)
show_hudmessage(0, "Wpisz /rs aby zresetowac sobie zabicia i zginiecia")
}
public client_putinserver(id)
{
if(get_pcvar_num(pcvar_Advertise) == 1)
{
set_task(10.0, "connectmessage", id, _, _, "a", 1)
}
}
public connectmessage(id)
{
if(is_user_connected(id))
{
client_print(id, print_chat, "Wpisz /rs aby zresetowac sobie zabicia i zginiecia. Mozesz to zrobic w kazdym momencie gry")
}
}
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.
|
Guest Message by DevFuse
3 odpowiedzi w tym temacie
#1
Napisano 31.03.2012 19:22
Witam, chciałbym przypisać do pluginu flagę tak, aby tylko gracze z flagą t (level H) mogli używać pluginu resetscore. Niżej wrzucam .sma pluginu resetscore.
#2
Napisano 31.03.2012 21:34
/*
This is a simple plugin I made that will just restart a players score
making their deaths and kills set to 0, this is to help players out a
little bit because they no longer have to reconnect or retry if they
want their score to start over, they can just type a simple command
---------------------------------
--------- MADE BY SILENTTT -----
------ MADE BY SILENTTT ------
-- MADE BY SILENTTT -------
------ MADE BY SILENTTT ------
--------- MADE BY SILENTTT -----
---------------------------------
*/
#include <amxmodx>
#include <amxmisc>
#include <cstrike>
#include <fun>
#define adtime 600.0 //Default of 10 minuites
new pcvar_Advertise
new pcvar_Display
public plugin_init()
{
register_plugin("Reset Score", "1.0", "Silenttt")
//You may type /resetscore or /restartscore
register_clcmd("say /resetscore", "reset_score")
register_clcmd("say /restartscore", "reset_score")
register_clcmd("say /rs", "reset_score")
register_clcmd("say /usunstaty", "reset_score")
//This command by default will be set at 0
//Change it to 1 in server.cfg if you want
//A message to be shown to advertise this.
pcvar_Advertise = register_cvar("sv_rsadvertise", "0")
//This command by default is also 0
//Change it to 1 in server.cfg if you want
//It to show who reset their scores when they do it
pcvar_Display = register_cvar("sv_rsdisplay", "0")
if(get_cvar_num("sv_rsadvertise") == 1)
{
set_task(adtime, "advertise", _, _, _, "b")
}
}
public reset_score(id)
{
if(get_user_flags(id) & ADMIN_LEVEL_H)
{
//These both NEED to be done twice, otherwise your frags wont
//until the next round
cs_set_user_deaths(id, 0)
set_user_frags(id, 0)
cs_set_user_deaths(id, 0)
set_user_frags(id, 0)
if(get_pcvar_num(pcvar_Display) == 1)
{
new name[33]
get_user_name(id, name, 32)
client_print(0, print_chat, "%s wlasnie zresetowal sobie statystyki", name)
}
else
{
client_print(id, print_chat, "Wlasnie zresetowales sobie statystki")
}
}
else
{
client_print(id, print_chat, "Nie posiadasz uprawnien do wykonania tej komendy!")
}
}
public advertise()
{
set_hudmessage(255, 0, 0, -1.0, 0.20, 0, 0.2, 12.0)
show_hudmessage(0, "Wpisz /rs aby zresetowac sobie zabicia i zginiecia")
}
public client_putinserver(id)
{
if(get_pcvar_num(pcvar_Advertise) == 1)
{
set_task(10.0, "connectmessage", id, _, _, "a", 1)
}
}
public connectmessage(id)
{
if(is_user_connected(id))
{
client_print(id, print_chat, "Wpisz /rs aby zresetowac sobie zabicia i zginiecia. Mozesz to zrobic w kazdym momencie gry")
}
}
DarkGL to mój autorytet.
skomplikować skomplikować skomplikować skomplikować skomplikować skomplikować skomplikować skomplikować skomplikować skomplikować skomplikować skomplikować skomplikować skomplikować
#3
Napisano 31.03.2012 21:51
WIELKIE DZIĘKI. LECI +
#4
Napisano 01.04.2012 00:08
Wiadomość wygenerowana automatycznie
Ten temat został zamknięty przez moderatora.
Powód: Pomoc udzielona
Jeśli się z tym nie zgadzasz, raportuj ten post, a moderator lub administrator rozpatrzy go ponownie.
Z pozdrowieniami,
Zespół AMXX.PL
Ten temat został zamknięty przez moderatora.
Powód: Pomoc udzielona
Jeśli się z tym nie zgadzasz, raportuj ten post, a moderator lub administrator rozpatrzy go ponownie.
Z pozdrowieniami,
Zespół AMXX.PL
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