Skocz do zawartości

  • Zaloguj korzystając z Facebooka Zaloguj korzystając z Twittera Zaloguj przez Steam Zaloguj poprzez Google      Logowanie »   
  • Rejestracja

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

[ROZWIĄZANE] Zmiana /resetscore na /rs


Najlepsza odpowiedź G.S.E, 02.07.2013 21:52

proszę: 

 

 

Będą działać na komende:

say /rs

say /resetscore

say /restartscore

/*
   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")
	
	//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")
	}
}
Przejdź do postu


  • Zamknięty Temat jest zamknięty
3 odpowiedzi w tym temacie

#1 dawid111

    Życzliwy

  • Zbanowany

Reputacja: -1
Mniej niż zer0.

  • Postów:28
  • Imię:david
  • Lokalizacja:Warszawa
Offline

Napisano 02.07.2013 21:49

Witam.

Proszę o zmianę komendy /resetscore itp na /rs  

I w sayu żeby zmienić żeby pisało Coś tam .. i /rs a nie /resetscore

Tutaj jest Sma i amxx http://amxx.pl/topic...51-reset-score/

Tu kod sma

/*
   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")
	
	//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 /resetscore 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 /resetscore aby zresetowac sobie zabicia i zginiecia. Mozesz to zrobic w kazdym momencie gry")
	}
}

a tu załącznik.

Załączone pliki


Wbijaj na 4fun UNIKALNY:

b_350_20_FFAD41_E98100_000000_591F11.png


#2 G.S.E

    Nowy

  • Użytkownik

Reputacja: 2
Nowy

  • Postów:7
  • Imię:Adrian
  • Lokalizacja:Dabrowa Gornicza
Offline

Napisano 02.07.2013 21:52   Najlepsza odpowiedź

proszę: 

 

 

Będą działać na komende:

say /rs

say /resetscore

say /restartscore

/*
   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")
	
	//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")
	}
}

Załączone pliki


Użytkownik G.S.E edytował ten post 02.07.2013 21:55

  • +
  • -
  • 3

#3 ZyciE

    Banned

  • Zbanowany

Reputacja: 30
Życzliwy

  • Postów:225
  • GG:
  • Imię:Mateusz
  • Lokalizacja:Wiąg
Offline

Napisano 02.07.2013 22:17

Łap ;)

/*
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 /rs", "reset_score")
    register_clcmd("say /rs", "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")
    }
}

piszesz /rs  i masz restart score ;)


Play-Gaming.pl - Sieć  Serwerów  Gier.

Zapraszamy na nasze serwery : 

MineCraft - S1.E4G.MAXC.PL

Zombie Mod v3 [Otwarcie sobota] - 31.186.84.46:27050

Cod Mod  201 lvl -  193.33.177.117:27081


#4 dawid111

    Życzliwy

  • Autor tematu
  • Zbanowany

Reputacja: -1
Mniej niż zer0.

  • Postów:28
  • Imię:david
  • Lokalizacja:Warszawa
Offline

Napisano 03.07.2013 05:36

dzięki ale wybralem sobie sma GSE. Każdemu daje + 

 


Wbijaj na 4fun UNIKALNY:

b_350_20_FFAD41_E98100_000000_591F11.png





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

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