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

Zabicie po dolaczeniu podczas trwania rundy


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

#1 amxxmaster

    Profesjonalista

  • Zbanowany

Reputacja: 0
Nowy

  • Postów:207
  • Imię:Stad
  • Lokalizacja:Daleko
Offline

Napisano 14.06.2011 10:55

Znalazlem taki plugin, ale on kurcze niedziala wie ktos moze czemu lub ma jakis dzialajcy ze jak runda sie zacznie i minie 10 sekund to jak sie dolacza to od razu zabija lub poprostu jest sie niezywym?

/* Plugin generated by AMXX-Studio */

#include <amxmodx>
#include <amxmisc>
#include <cstrike>
#include <fun>

#define PLUGIN "Spawn Protector"
#define VERSION "1.0"
#define AUTHOR "lisek"



new bool:runda = false
new cvar_time

public plugin_init() {
    register_plugin(PLUGIN, VERSION, AUTHOR)
    cvar_time = register_cvar("cvar_time","10.0") // po jakim czasie ma zabijać
    register_event("HLTV", "NewRound", "a", "1=0", "2=0") 
    register_logevent("EndRound",2,"1=Round_End")
    }


public NewRound()
set_task(get_pcvar_float(cvar_time), "protekcja",0)


public EndRound()
runda=false

public client_spawn(id){
    if(runda==true && is_user_alive(id))
    client_cmd(id, "kill")
}

public protekcja()
runda=true


#2 Abes Mapper

    Repulsion Gel

  • Przyjaciel

Reputacja: 2 017
Godlike

  • Postów:7 356
  • Steam:steam
  • Imię:Sebastian
  • Lokalizacja:Sulejówek
Offline

Napisano 14.06.2011 16:27

Spawn Protection PL by Dudix - AMXX.pl: Support AMX Mod X
  • +
  • -
  • 1

#3 amxxmaster

    Profesjonalista

  • Autor tematu
  • Zbanowany

Reputacja: 0
Nowy

  • Postów:207
  • Imię:Stad
  • Lokalizacja:Daleko
Offline

Napisano 14.06.2011 16:46

hehe chyba cos pomyliles ale masz + bo chodzilo mi o cos innego to poprostu ochrania kogos zeby nie można bic przez x sekund od respawnu a mi chodzi o to zeby dolaczac nie można bylo po 10 sekundach zeby zabijalo goscia ;P jak dolaczy

#4 stepdub

    Profesjonalista

  • Użytkownik

Reputacja: 43
Pomocny

  • Postów:207
  • Lokalizacja:Kobyłka
Offline

Napisano 15.06.2011 14:32

#include < amxmodx >
#include < amxmisc >
#include < fun >
#include < cstrike >
#include < hamsandwich >
#define TASKID 146
new gRoundStart;
new round;
new iRoundTime;

public plugin_init(){
register_logevent("eventStartRound", 2, "1=Round_Start");
register_logevent("eventEndRound", 2, "1=Round_End");
RegisterHam(Ham_Spawn, "player", "SpawnPost")
}

public eventStartRound(){
round++
gRoundStart = get_systime();
set_task(1.0, "eventTimerTick", TASKID, _, _, "b")

}

public eventEndRound(){
if(task_exists( TASKID ))
remove_task(TASKID );
}

public eventTimerTick(){
new iRoundTime = get_systime() - gRoundStart;
}

public SpawnPost(id) {
if (!round > 1) return PLUGIN_CONTINUE;
if (!iRoundTime > 10) return PLUGIN_CONTINUE;
if (is_user_alive(id)){
user_kill(id);
cs_set_user_deaths(id, 0);
set_user_frags(id, 0);
}
else return PLUGIN_CONTINUE;
}


EDIT: sprawdź czy działa

Użytkownik stepdub edytował ten post 15.06.2011 15:51

  • +
  • -
  • 0

#5 amxxmaster

    Profesjonalista

  • Autor tematu
  • Zbanowany

Reputacja: 0
Nowy

  • Postów:207
  • Imię:Stad
  • Lokalizacja:Daleko
Offline

Napisano 15.06.2011 15:06

Welcome to the AMX Mod X 1.76-300 Compiler.
Copyright © 1997-2006 ITB CompuPhase, AMX Mod X Team

Warning: Symbol is assigned a value that is never used: "iRoundTime" on line 30
Warning: Tag mismatch on line 33
Error: Undefined symbol "iRoundTime" on line 34
Warning: Function "SpawnPost" should return a value on line 41

1 Error.

#6 stepdub

    Profesjonalista

  • Użytkownik

Reputacja: 43
Pomocny

  • Postów:207
  • Lokalizacja:Kobyłka
Offline

Napisano 15.06.2011 15:50

zdefiniuj zmienną globalną
new iRoundTime;

nie zauważyłem :)

całość - zlikwidowałem warningi

#include < amxmodx >
#include < amxmisc >
#include < fun >
#include < cstrike >
#include < hamsandwich >
new gRoundStart
new round
new iRoundTime
#define TASKID 146

public plugin_init(){
register_plugin("Selekcjoner", "1.0", "stepdub");
register_logevent("eventStartRound", 2, "1=Round_Start");
register_logevent("eventEndRound", 2, "1=Round_End");
RegisterHam(Ham_Spawn, "player", "SpawnPost");
}

public eventStartRound(){
round++
gRoundStart = get_systime();
set_task(1.0, "eventTimerTick", TASKID, _, _, "b")
}

public eventEndRound(){
if(task_exists( TASKID ))
remove_task(TASKID );
}

public eventTimerTick(){
new iRoundTime = get_systime() - gRoundStart;
}

public SpawnPost(id) {
if (round < 1) return PLUGIN_CONTINUE;
if (iRoundTime < 10) return PLUGIN_CONTINUE;
if (is_user_alive(id)){
user_silentkill(id);
cs_set_user_deaths(id, 0);
set_user_frags(id, 0);
}
else return PLUGIN_CONTINUE;
return PLUGIN_CONTINUE;
}


EDIT: zmieniłem na user_silentkill

Użytkownik stepdub edytował ten post 15.06.2011 19:15

  • +
  • -
  • 0

#7 amxxmaster

    Profesjonalista

  • Autor tematu
  • Zbanowany

Reputacja: 0
Nowy

  • Postów:207
  • Imię:Stad
  • Lokalizacja:Daleko
Offline

Napisano 16.06.2011 11:10

teraz wyskakuje Warning: Symbol is assigned a value that is never used: "iRoundTime" on line 31
1 Warning.

#8 góruś

    Profesjonalista

  • Użytkownik

Reputacja: 136
Zaawansowany

  • Postów:164
  • GG:
  • Imię:Damian
  • Lokalizacja:Grójec
Offline

Napisano 16.06.2011 11:29

#include < amxmodx >
#include < amxmisc >
#include < fun >
#include < cstrike >
#include < hamsandwich >
new gRoundStart
new round
new iRoundTime
#define TASKID 146

public plugin_init(){
register_plugin("Selekcjoner", "1.0", "stepdub");
register_logevent("eventStartRound", 2, "1=Round_Start");
register_logevent("eventEndRound", 2, "1=Round_End");
RegisterHam(Ham_Spawn, "player", "SpawnPost");
}

public eventStartRound(){
round++
gRoundStart = get_systime();
set_task(1.0, "eventTimerTick", TASKID, _, _, "b")
}

public eventEndRound(){
if(task_exists( TASKID ))
remove_task(TASKID );
}

public eventTimerTick(){
iRoundTime = get_systime() - gRoundStart;
}

public SpawnPost(id) {
if (round < 1) return PLUGIN_CONTINUE;
if (iRoundTime < 10) return PLUGIN_CONTINUE;
if (is_user_alive(id)){
user_silentkill(id);
cs_set_user_deaths(id, 0);
set_user_frags(id, 0);
}
else return PLUGIN_CONTINUE;
return PLUGIN_CONTINUE;
}

zamiast

public eventTimerTick(){
new iRoundTime = get_systime() - gRoundStart;
}


public eventTimerTick(){
iRoundTime = get_systime() - gRoundStart;
}

gdyż masz już zadeklarowaną zmienną na początku
  • +
  • -
  • 0

Piszesz na gg w sprawie pomocy? Z góry ignore, pozdrawiam.

CS 1.6 Download
Serwery CS
Cs nonsteam download


#9 amxxmaster

    Profesjonalista

  • Autor tematu
  • Zbanowany

Reputacja: 0
Nowy

  • Postów:207
  • Imię:Stad
  • Lokalizacja:Daleko
Offline

Napisano 16.06.2011 11:35

niestety ale to nie dziala ;/ dolaczam po 20 sekundach, po 30 i nie dziala

Użytkownik amxxmaster edytował ten post 16.06.2011 11:35


#10 stepdub

    Profesjonalista

  • Użytkownik

Reputacja: 43
Pomocny

  • Postów:207
  • Lokalizacja:Kobyłka
Offline

Napisano 16.06.2011 13:58

teraz zauważyłem, że funkcja jest wywoływana przy respie, dlatego funkcja nie działa po 10 sekundach :'(
zaraz coś pomyślę dalej

EDIT: spróbuj to:
zamień
#include < hamsandwich >

na
#include < fakemeta >


zamień
public SpawnPost(id) {
        if (round < 1) return PLUGIN_CONTINUE;
        if (iRoundTime < 10) return PLUGIN_CONTINUE;
        if (is_user_alive(id)){
                user_silentkill(id);
                cs_set_user_deaths(id, 0);
                set_user_frags(id, 0);
        }
        else return PLUGIN_CONTINUE;
        return PLUGIN_CONTINUE;
}

na
public fm_cs_user_spawn(id) {
        if (round < 1) return PLUGIN_CONTINUE;
        if (iRoundTime < 10) return PLUGIN_CONTINUE;
        if (is_user_alive(id)){
                user_silentkill(id);
                cs_set_user_deaths(id, 0);
                set_user_frags(id, 0);
        }
        else return PLUGIN_CONTINUE;
        return PLUGIN_CONTINUE;
}

usuń
RegisterHam(Ham_Spawn, "player", "SpawnPost");

zamień
public eventTimerTick(){
new iRoundTime = get_systime() - gRoundStart;
}

na
public eventTimerTick(){
iRoundTime = get_systime() - gRoundStart;
}

i powinno być OK

Dodano 16 czerwiec 2011 - 14:10:
#include < amxmodx >
#include < amxmisc >
#include < fun >
#include < cstrike >
#include < fakemeta >
new gRoundStart
new round
new iRoundTime
#define TASKID 146

public plugin_init(){
register_plugin("Selekcjoner", "1.0", "stepdub");
register_logevent("eventStartRound", 2, "1=Round_Start");
register_logevent("eventEndRound", 2, "1=Round_End");
}

public eventStartRound(){
round++
gRoundStart = get_systime();
set_task(1.0, "eventTimerTick", TASKID, _, _, "b")
}

public eventEndRound(){
if(task_exists( TASKID ))
remove_task(TASKID );
}

public eventTimerTick(){
iRoundTime = get_systime() - gRoundStart;
}

public fm_cs_user_spawn(id) {
if (round < 1) return PLUGIN_CONTINUE;
if (iRoundTime < 10) return PLUGIN_CONTINUE;
if (is_user_alive(id)){
user_silentkill(id);
cs_set_user_deaths(id, 0);
set_user_frags(id, 0);
}
else return PLUGIN_CONTINUE;
return PLUGIN_CONTINUE;
}

Użytkownik stepdub edytował ten post 16.06.2011 14:10

  • +
  • -
  • 0

#11 amxxmaster

    Profesjonalista

  • Autor tematu
  • Zbanowany

Reputacja: 0
Nowy

  • Postów:207
  • Imię:Stad
  • Lokalizacja:Daleko
Offline

Napisano 16.06.2011 14:41

dalej to samo :P poprostu nic sie niedzieje dolaczam po 20 sekundach i gram sobie

Użytkownik amxxmaster edytował ten post 16.06.2011 14:41


#12 stepdub

    Profesjonalista

  • Użytkownik

Reputacja: 43
Pomocny

  • Postów:207
  • Lokalizacja:Kobyłka
Offline

Napisano 16.06.2011 15:03

#include < amxmodx >
#include < amxmisc >
#include < fun >
#include < cstrike >
#include < hamsandwich >
new gRoundStart
new round
new iRoundTime
#define TASKID 146

public plugin_init(){
register_plugin("Selekcjoner", "1.0", "stepdub");
register_logevent("eventStartRound", 2, "1=Round_Start");
register_logevent("eventEndRound", 2, "1=Round_End");
RegisterHam(HamSpawn, "player", "SpawnPost");
}

public eventStartRound(){
round++
gRoundStart = get_systime();
set_task(1.0, "eventTimerTick", TASKID, _, _, "b")
}

public eventEndRound(){
if(task_exists( TASKID ))
remove_task(TASKID );
}

public eventTimerTick(){
iRoundTime = get_systime() - gRoundStart;
}

public SpawnPost(id) {
if (round < 1) return PLUGIN_CONTINUE;
if (iRoundTime < 10) return PLUGIN_CONTINUE;
if (is_user_alive(id)){
user_kill(id);
cs_set_user_deaths(id, 0);
set_user_frags(id, 0);
}
return PLUGIN_CONTINUE;
}

sorry, jednak HamSpawn działa jak miał działać pierwotnie gdy zaczynałem pisać to
sprawdź teraz
  • +
  • -
  • 0

#13 amxxmaster

    Profesjonalista

  • Autor tematu
  • Zbanowany

Reputacja: 0
Nowy

  • Postów:207
  • Imię:Stad
  • Lokalizacja:Daleko
Offline

Napisano 16.06.2011 15:08

no ale wez lukaj czy da rade skompilowac xD i dzięki ogolnie :D ze probojesz pomoc

Error: Undefined symbol "HamSpawn" on line 22
Warning: Expression has no effect on line 22
Warning: Expression has no effect on line 22
Error: Expected token: ";", but found ")" on line 22
Error: Invalid expression, assumed zero on line 22
Error: Too many error messages on one line on line 22

Compilation aborted.
4 Errors.

Użytkownik amxxmaster edytował ten post 16.06.2011 15:08


#14 ;((

    Super Hero

  • Użytkownik

Reputacja: 347
Wszechpomocny

  • Postów:1 157
  • Lokalizacja:Aha
Offline

Napisano 16.06.2011 15:15

#include < amxmodx >

#include < amxmisc >

#include < fun >

#include < cstrike >

#include < hamsandwich >

new gRoundStart

new round

new iRoundTime

#define TASKID 146



public plugin_init(){

        register_plugin("Selekcjoner", "1.0", "stepdub");

        register_logevent("eventStartRound", 2, "1=Round_Start");

        register_logevent("eventEndRound", 2, "1=Round_End");

        RegisterHam(Ham_Spawn, "player", "SpawnPost");

}



public eventStartRound(){

        round++

        gRoundStart = get_systime();

        set_task(1.0, "eventTimerTick", TASKID, _, _, "b")     

}



public eventEndRound(){

        if(task_exists( TASKID ))

                remove_task(TASKID );

}



public eventTimerTick(){

        iRoundTime = get_systime() - gRoundStart;

}



public SpawnPost(id) {

        if (round < 1) return PLUGIN_CONTINUE;

        if (iRoundTime < 10) return PLUGIN_CONTINUE;

        if (is_user_alive(id)){

                user_kill(id);

                cs_set_user_deaths(id, 0);

                set_user_frags(id, 0);

        }

        return PLUGIN_CONTINUE;

}

  • +
  • -
  • 0

#15 amxxmaster

    Profesjonalista

  • Autor tematu
  • Zbanowany

Reputacja: 0
Nowy

  • Postów:207
  • Imię:Stad
  • Lokalizacja:Daleko
Offline

Napisano 16.06.2011 15:26

nie wiem co napisac, napisze poprostu nie dziala ;/

#16 MarWit

    The Chosen One

  • Przyjaciel

Reputacja: 843
Czempion

  • Postów:1 485
  • GG:
  • Steam:steam
  • Imię:Marcin
  • Lokalizacja:Bystrzyca
Offline

Napisano 16.06.2011 17:29

Spróbuj coś takiego


#include <amxmodx>
#include <amxmisc>
#include <hamsandwich>
#include <cstrike>

#define PLUGIN "PluginName"
#define VERSION "1.0"
#define AUTHOR ".:Vitek:."

new czas = 10 //tu ustawiasz po ilu sec ma killac

public plugin_init() {
register_plugin(PLUGIN, VERSION, AUTHOR)
RegisterHam(Ham_Spawn, "player", "Spawn", 1)
register_logevent("Poczatek_Rundy", 2, "1=Round_Start")
}

public Poczatek_Rundy()
{
czas --;
return PLUGIN_CONTINUE
}

public Spawn(id)
{
if(czas < 1 && is_user_alive(id))
{
user_silentkill(id)
cs_set_user_deaths(id, 0)
}
}

Użytkownik MarWit edytował ten post 16.06.2011 17:55

  • +
  • -
  • 0

marwit-0.png


#17 stepdub

    Profesjonalista

  • Użytkownik

Reputacja: 43
Pomocny

  • Postów:207
  • Lokalizacja:Kobyłka
Offline

Napisano 16.06.2011 18:07

amxxmaster, pisałem tamto w notatniku xD
a zobacz to:
#include < amxmodx >
#include < amxmisc >
#include < fun >
#include < cstrike >
#include < hamsandwich >
new gRoundStart
new round
new iRoundTime
#define TASKID 146

public plugin_init(){
register_plugin("Selekcjoner", "1.0", "stepdub");
register_logevent("eventStartRound", 2, "1=Round_Start");
register_logevent("eventEndRound", 2, "1=Round_End");
RegisterHam(Ham_Spawn, "player", "SpawnPost", 1);
}

public eventStartRound(){
round++
gRoundStart = get_systime();
set_task(1.0, "eventTimerTick", TASKID, _, _, "b")
}

public eventEndRound(){
if(task_exists( TASKID ))
remove_task(TASKID );
}

public eventTimerTick(){
iRoundTime = get_systime() - gRoundStart;
}

public SpawnPost(id) {
if (round > 1) return HAM_SUPERCEDE;
if (iRoundTime > 10) return HAM_SUPERCEDE;
return PLUGIN_CONTINUE;
}


zamiast zabijania zablokowałem wywołanie funkcji

Użytkownik stepdub edytował ten post 16.06.2011 18:08

  • +
  • -
  • 0

#18 amxxmaster

    Profesjonalista

  • Autor tematu
  • Zbanowany

Reputacja: 0
Nowy

  • Postów:207
  • Imię:Stad
  • Lokalizacja:Daleko
Offline

Napisano 16.06.2011 20:06

to i to nie dziala :/

#19 stepdub

    Profesjonalista

  • Użytkownik

Reputacja: 43
Pomocny

  • Postów:207
  • Lokalizacja:Kobyłka
Offline

Napisano 16.06.2011 20:31

#include < amxmodx >
#include < amxmisc >
#include < fun >
#include < cstrike >
#include < hamsandwich >
new gRoundStart
new round
new iRoundTime
#define TASKID 146

public plugin_init(){
register_plugin("Selekcjoner", "1.0", "stepdub");
register_logevent("eventStartRound", 2, "1=Round_Start");
register_logevent("eventEndRound", 2, "1=Round_End");
RegisterHam(Ham_Spawn, "player", "SpawnPost", 1);
}

public eventStartRound(){
round++
gRoundStart = get_systime();
set_task(1.0, "eventTimerTick", TASKID, _, _, "b")
}

public eventEndRound(){
if(task_exists( TASKID ))
remove_task(TASKID );
}

public eventTimerTick(){
iRoundTime = get_systime() - gRoundStart;
}

public SpawnPost(id) {
if(iRoundTime > 10)
{
if(round < 1) {
return HAM_HANDLED;
}
if(round > 1)
return HAM_SUPERCEDE;
}
return HAM_HANDLED;
}

a teraz?
może ktoś inny spróbuje, bo mi się pomysły kończą
  • +
  • -
  • 1




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

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