Cum pot ezecuta o comanda iar dupa x minute sa se scoata?

Modificari necesare ale pluginurilor

Moderators: Moderatori ajutatori, Moderatori, Echipa eXtreamCS.com

Post Reply
User avatar
pigmy
Membru, skill +2
Membru, skill +2
Posts: 594
Joined: 14 Dec 2007, 17:49
Detinator Steam: Da
CS Status: PEACE!
Has thanked: 2 times
Been thanked: 23 times

06 Sep 2010, 01:45

Salutare, nu prea inteleg cum pot insera sa calculeze sau sa faca cumva...atunci cand dau mute, ii iau accesul la chat, dupa 10 minute de la primirea lui, sa primeasca remove.
Ceva idei?
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
Contact:

06 Sep 2010, 11:13

Poti sa faci ca in pluginul de aici. Dupa ce ii iei imunitatea, il stochezi intr-o variabila si faci un set_task cu executie la 10 minute.
User avatar
KronoS eXtream
Fost administrator
Fost administrator
Posts: 4380
Joined: 02 Apr 2009, 18:18
Detinator Steam: Da
Reputatie: Fost administrator
Fost detinator Zombie-Land.eXtream.Ro
Contribuitor
Fost Scripter eXtreamCS
Dezvoltator al listei de seriozitate eXtreamCS
Location: Bucharest
Has thanked: 543 times
Been thanked: 820 times
Contact:

06 Sep 2010, 12:29

Ciprian wrote:Poti sa faci ca in pluginul de aici. Dupa ce ii iei imunitatea, il stochezi intr-o variabila si faci un set_task cu executie la 10 minute.
sau cu remove_task
Nu efectuez tranzactii pe mess, skype etc. Aveti grija la indivizii care se dau drept mine!
Nu mai ofer suport asa ca nu imi mai trimiteti mesaje in legatura cu asta!


Zombie Plague Shade 1.2-debug1 [with Item Limiter] (12 September 2015) - Bombardier Branch
User avatar
pigmy
Membru, skill +2
Membru, skill +2
Posts: 594
Joined: 14 Dec 2007, 17:49
Detinator Steam: Da
CS Status: PEACE!
Has thanked: 2 times
Been thanked: 23 times

08 Sep 2010, 00:48

Ceva de genu?

Code: Select all

#include <amxmodx>

public plugin_init()
{
	register_plugin("Mute", "1.0", "Echipa")

	register_concmd("rt_mute", "cmdMute", ADMIN_SLAY, "<nume>")
}
public cmdMute(id, level, cid)
{
        CODUL DE LA PLUGIN
        client_print(0, print_chat,"[Admin] %s: mute [%s]", admin, nume)
        set_task(100.0, "cmdScoateMute", _,_,_,"b",0)
}
public cmdScoateMute(id, level, cid)
{
        CODUL DE LA PLUGIN PENTRU UNMUTE?!
}
User avatar
Arion
Scripter eXtreamCS
Scripter eXtreamCS
Posts: 3316
Joined: 15 May 2008, 20:19
Detinator Steam: Da
SteamID: arion1338
Reputatie: Fost Mapper eXtreamCS
Fost Detinator HNS.eXtreamCS.com
Nume anterior : Seekers
Scripter Echipa eXtreamCS
Fost Moderator jutator
Location: Copenhagen
Has thanked: 400 times
Been thanked: 412 times
Contact:

09 Sep 2010, 07:29

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

#define MINUTE 10
#define TASKID 12345

public plugin_init() {
	register_clcmd("amx_mute","cmdMute",ADMIN_KICK,"<nume>");
}

public cmdMute(id,level,cid) {
	
	//bla bla despre verificari,etc
	//bla bla, despre jucatori,etc
	
	set_task(MINUTE*60.0,"cmdRemove",TASKID,_,_,"b",id);
}

public cmdRemove(id) {
	remove_task(TASKID);
}
Join the biggest end-game club in Trove
Image
aurelian121
Membru, skill 0
Membru, skill 0
Posts: 9
Joined: 04 Mar 2009, 15:27
Detinator Steam: Nu
CS Status: Citesc forumul eXtreamCS.com!

09 Sep 2010, 07:47

pigmy e bine cum zici,dar
set_task(100.0, "cmdScoateMute",player)
}
public cmdScoateMute(player)
{
CODUL DE LA PLUGIN PENTRU UNMUTE?!
}
si prin player inteleg
new arg[32]
read_argv(1,arg,31)

new player = cmd_target(id,arg,1)
dupa creeru meu ala mic asa se face
si execution imi zici pls ce face remove_task?
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
Contact:

09 Sep 2010, 14:11

| Afiseaza codul
[code=php]/* Plugin generated by AMXX-Studio */

#include < amxmodx >
#include < amxmisc >

#define PLUGIN "New Plug-In"
#define VERSION "1.0"
#define AUTHOR "Ciprian"

public plugin_init ( ) {
    register_plugin ( PLUGIN, VERSION, AUTHOR );
    
    register_clcmd ( "amx_mute", "cmdMute", ADMIN_KICK, "- blabla" );
}

public cmdMute ( id, level, cid ) {
    if ( ! cmd_access ( id, level, cid, 2 ) ) 
    return PLUGIN_HANDLED;
    
    new s_Arg[ 32 ];
    read_argv ( 1, s_Arg, charsmax ( s_Arg ) );
    
    new player = cmd_target ( id, s_Arg, 11 );
    
    // setarile aplicate clientului
    
    set_task ( 100.0, "cmdUnMute", player );
}

public cmdUnMute ( id ) {
    // setari
} [/code]
User avatar
pigmy
Membru, skill +2
Membru, skill +2
Posts: 594
Joined: 14 Dec 2007, 17:49
Detinator Steam: Da
CS Status: PEACE!
Has thanked: 2 times
Been thanked: 23 times

10 Sep 2010, 09:23

aurelian121: E bine ca faci observatii, dar vreau sa-ti spun ceva ce sigur nu sti, eu nu urc tot codul, urc o parte sa intelegeti. :>
O sa revin cu un edit in caz ca nu ma descurc. :D
EDIT:
De ce nu sta 10 minute?!
| Afiseaza codul
#include <amxmodx>
#include <amxmisc>

new Mute[33]

public plugin_init()
{
    register_plugin("Mute", "1.0", "Echipa")
    
    register_clcmd("rt_mute", "cmdMute", ADMIN_KICK, "<nume>")

    register_clcmd("say", "cmdChat")
    register_clcmd("say_team", "cmdChat")
}

public cmdChat(id)
{
    return Mute[id]
}

public cmdMute(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, 3)
    if(!player)
        return PLUGIN_HANDLED

    new admin[32], nume[32]
    get_user_name(id, admin, 31)
    get_user_name(player, nume, 31)

    Mute[player] = 1
    client_print(0, print_chat,"[Admin] %s: mute [%s]", admin, nume)

    set_task(100.0, "cmdUnMute", player);

    return PLUGIN_HANDLED
}

public cmdUnMute(player)
{
    Mute[player] = 0
    client_print(player, print_chat,"Accesul la chat tia revenit.")

    return PLUGIN_HANDLED
}
compaq
Fost moderator
Fost moderator
Posts: 2598
Joined: 01 Dec 2008, 15:32
Detinator Steam: Da
Reputatie: Fost eXtream Mod
Fost contribuitor
Fost manager
Fost Scripter eXtreamCS
Has thanked: 15 times
Been thanked: 150 times

10 Sep 2010, 12:51

La task ai pus 100 de secunde.
User avatar
pigmy
Membru, skill +2
Membru, skill +2
Posts: 594
Joined: 14 Dec 2007, 17:49
Detinator Steam: Da
CS Status: PEACE!
Has thanked: 2 times
Been thanked: 23 times

10 Sep 2010, 17:02

Ah...da, neatentia. b-(
User avatar
Arion
Scripter eXtreamCS
Scripter eXtreamCS
Posts: 3316
Joined: 15 May 2008, 20:19
Detinator Steam: Da
SteamID: arion1338
Reputatie: Fost Mapper eXtreamCS
Fost Detinator HNS.eXtreamCS.com
Nume anterior : Seekers
Scripter Echipa eXtreamCS
Fost Moderator jutator
Location: Copenhagen
Has thanked: 400 times
Been thanked: 412 times
Contact:

11 Sep 2010, 08:49

aurelian121 wrote:pigmy e bine cum zici,dar
set_task(100.0, "cmdScoateMute",player)
}
public cmdScoateMute(player)
{
CODUL DE LA PLUGIN PENTRU UNMUTE?!
}
si prin player inteleg
new arg[32]
read_argv(1,arg,31)

new player = cmd_target(id,arg,1)
dupa creeru meu ala mic asa se face
si execution imi zici pls ce face remove_task?
Pai simplu opreste un set task :))
Join the biggest end-game club in Trove
Image
Post Reply

Return to “Modificari pluginuri”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 7 guests