modificare plugin say_restart

Modificari necesare ale pluginurilor

Moderators: Moderatori ajutatori, Moderatori, Echipa eXtreamCS.com

Post Reply
User avatar
b[L]u
Membru, skill +1
Membru, skill +1
Posts: 314
Joined: 31 May 2010, 13:27
Detinator Steam: Nu
Has thanked: 26 times
Been thanked: 8 times

20 Aug 2010, 15:30

salut as vrea sa-mi adaugati un sunet la acest plugin cand scriu /rr /restart /live sa se auda un sunet (EX:runda se va restarta) sunetul il am eu :D

| Afiseaza codul
#include <amxmodx>
#include <amxmisc>
#include <engine>

#define ACCESS ADMIN_SLAY

new Float:g_LastRestart[33]

public plugin_init() 
{
	register_plugin("Restart","2.0","D")
	register_clcmd("say /restart","say_restart",ACCESS)
        register_clcmd("say /rr","say_restart",ACCESS)
        register_clcmd("say /live","say_restart",ACCESS)
}

public say_restart(id) 
{
	if(!(get_user_flags(id) & ACCESS))
		return
    
	new Float:Time = halflife_time()
	if(Time - g_LastRestart[id] < 10.0)
		return
    
	g_LastRestart[id] = Time
 
	server_cmd("sv_restart 1")
	client_print(0, print_chat, " [----ReStaRt!----]")
	client_print(0, print_chat, " [ ----LIVE!----- ]")
	client_print(0, print_chat, " [----ReStaRt!----]")
    
	set_hudmessage(255,150, 0, 0.04, 0.47, 0, 6.0, 7.0) 
	show_hudmessage(0, "Live ! Live ! Live ! GL & HF !" )
	show_hudmessage(0, "Live ! Live ! Live ! Bafta la fraguri!" )
}
Last edited by Ciprian on 21 Aug 2010, 17:54, edited 1 time in total.
Reason: Foloseste sursa pt. texte lungi.
Nick: MiSteR D
Image
Reptile
Membru, skill +1
Membru, skill +1
Posts: 245
Joined: 12 Nov 2008, 14:11
Detinator Steam: Nu
Reputatie: Fost manager
Been thanked: 23 times

20 Aug 2010, 15:39

Code: Select all

#include <amxmodx>
#include <amxmisc>
#include <engine>

#define ACCESS ADMIN_SLAY

new Float:g_LastRestart[33]

new const g_Sound[] = "misc/rr.mp3";

public plugin_init()
{
    register_plugin("Restart","2.0","D")
    register_clcmd("say /restart","say_restart",ACCESS)
    register_clcmd("say /rr","say_restart",ACCESS)
    register_clcmd("say /live","say_restart",ACCESS)
}

public plugin_precache()
{
    precache_sound( g_Sound );
}

public say_restart(id)
{
    if(!(get_user_flags(id) & ACCESS))
        return

    new Float:Time = halflife_time()
    if(Time - g_LastRestart[id] < 10.0)
        return

    g_LastRestart[id] = Time

    server_cmd("sv_restart 1")

    client_cmd( 0, "mp3 loop %s", g_Sound );

    client_print(0, print_chat, " [----ReStaRt!----]")
    client_print(0, print_chat, " [ ----LIVE!----- ]")
    client_print(0, print_chat, " [----ReStaRt!----]")

    set_hudmessage(255,150, 0, 0.04, 0.47, 0, 6.0, 7.0)
    show_hudmessage(0, "Live ! Live ! Live ! GL & HF !" )
    show_hudmessage(0, "Live ! Live ! Live ! Bafta la fraguri!" )
}
mp3

Code: Select all

#include <amxmodx>
#include <amxmisc>
#include <engine>

#define ACCESS ADMIN_SLAY

new Float:g_LastRestart[33]

new const g_Sound[] = "misc/rr.wav";

public plugin_init()
{
	register_plugin("Restart","2.0","D")
	register_clcmd("say /restart","say_restart",ACCESS)
	register_clcmd("say /rr","say_restart",ACCESS)
	register_clcmd("say /live","say_restart",ACCESS)
}

public plugin_precache()
{
	precache_sound( g_Sound );
}

public say_restart(id)
{
	if(!(get_user_flags(id) & ACCESS))
		return

	new Float:Time = halflife_time()
	if(Time - g_LastRestart[id] < 10.0)
		return

	g_LastRestart[id] = Time

	server_cmd("sv_restart 1")

	client_cmd( 0, "spk %s", g_Sound );

	client_print(0, print_chat, " [----ReStaRt!----]")
	client_print(0, print_chat, " [ ----LIVE!----- ]")
	client_print(0, print_chat, " [----ReStaRt!----]")

	set_hudmessage(255,150, 0, 0.04, 0.47, 0, 6.0, 7.0)
	show_hudmessage(0, "Live ! Live ! Live ! GL & HF !" )
	show_hudmessage(0, "Live ! Live ! Live ! Bafta la fraguri!" )
}
wav
SaByUtZa VaSy ;x

20 Aug 2010, 17:27

Poti face asa?:
Cand un admin tasteaza in consola amx_live , amx_rr , amx_restart sa se dea rr si sa se auda un sunet.Fara mesaj.
Reptile
Membru, skill +1
Membru, skill +1
Posts: 245
Joined: 12 Nov 2008, 14:11
Detinator Steam: Nu
Reputatie: Fost manager
Been thanked: 23 times

20 Aug 2010, 17:43

Ca veni vorba, plugin-ul nu a fost facut de asa-zisul D, ci de Alka.

Code: Select all

#include <amxmodx>
#include <amxmisc>

#pragma semicolon 1

new const g_version[] = "0.1";

new const g_Sound[] = "misc/rr.mp3";

public plugin_precache()
{
    register_plugin( "New restart", g_version, "compaq" );

    precache_sound( g_Sound );
}

public plugin_init()
{
    register_concmd( "amx_live", "cmdRR", ADMIN_SLAY, "<seconds> - restart" );
    register_concmd( "amx_rr", "cmdRR", ADMIN_SLAY, "<seconds> - restart" );
    register_concmd( "amx_restart", "cmdRR", ADMIN_SLAY, "<seconds> - restart" );
}

public cmdRR( i_Index, iLevel, iCid )
{
    if( !cmd_access( i_Index, iLevel, iCid, 2 ) )
    {
        return PLUGIN_HANDLED;
    }

    server_cmd( "sv_restart 1" );

    client_cmd( 0, "mp3 loop %s", g_Sound );

    return PLUGIN_CONTINUE;
}
mp3

Code: Select all

#include <amxmodx>
#include <amxmisc>

#pragma semicolon 1

new const g_version[] = "0.1";

new const g_Sound[] = "misc/rr.wav";

public plugin_precache()
{
    register_plugin( "New restart", g_version, "compaq" );

    precache_sound( g_Sound );
}

public plugin_init()
{
    register_concmd( "amx_live", "cmdRR", ADMIN_SLAY, "<seconds> - restart" );
    register_concmd( "amx_rr", "cmdRR", ADMIN_SLAY, "<seconds> - restart" );
    register_concmd( "amx_restart", "cmdRR", ADMIN_SLAY, "<seconds> - restart" );
}

public cmdRR( i_Index, iLevel, iCid )
{
    if( !cmd_access( i_Index, iLevel, iCid, 2 ) )
    {
        return PLUGIN_HANDLED;
    }

    server_cmd( "sv_restart 1" );

    client_cmd( 0, "spk %s", g_Sound );

    return PLUGIN_CONTINUE;
}
wav
User avatar
Ciprian
Fost administrator
Fost administrator
Posts: 5172
Joined: 10 May 2008, 20:29
Detinator Steam: Da
CS Status: ^^
SteamID: crazycipry
Reputatie: Fost administrator
Fost Scripter eXtreamCS
Fost Supervizor CS.eXtreamCS.com
Fost Unbanner ZM.eXtreamCS.com
Fost Contribuitor
Nume anterior: crazy.cipry
Location: Baia Mare
Has thanked: 176 times
Been thanked: 401 times

21 Aug 2010, 17:54

Mutat in Programare CS - Pluginuri!
Post Reply

Return to “Modificari pluginuri”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 9 guests