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.
|
[ROZWIĄZANE] Wykonywanie server_cmd co x
#1
Napisano 27.04.2013 13:07
set_task raczej odpada.
Chciałem co nową runde i set_task, ale jakoś głupio.
Jest coś takiego, że moge ustalić co jaką runde?
Pozdrawiam.
#2
Napisano 27.04.2013 13:17
/* Plugin generated by AMXX-Studio */ #include <amxmodx> #include <amxmisc> #define PLUGIN "xXPLUGINXx" #define VERSION "1.0" #define AUTHOR "Pan Marian" new runda; public plugin_init() { register_plugin(PLUGIN, VERSION, AUTHOR) register_logevent("Runda", 2, "1=Round_Start") register_event("TextMsg", "reset", "a", "2&#Game_will_restart_in" ); register_event("TextMsg", "reset", "a", "2&#Game_C") } public Runda(){ runda++ if(runda == 1){ // COS } else if(runda == 3){ // COS } } public reset(){ runda = 0 }
Użytkownik Pan Marian edytował ten post 27.04.2013 13:22
#3
Napisano 27.04.2013 13:22
#4
Napisano 27.04.2013 13:27
Jest coś takiego, że moge ustalić co jaką runde?
Tak napisałeś, więc podałem Ci w jaki sposób możesz ustalić co jaką rundę to może się wykonywać, a jeżeli chcesz co drugą, robisz tak
public Runda(){ runda++ if(runda == 1 || runda == 3 || runda == 5 || runda == 7){ // COS } }
Nie jestem pewien, czy nie mogło by być po prostu
if(runda == 1 || 3)
, dlatego Ci podałem o taką wersję, ale chyba tak by być nie mogło
Użytkownik Pan Marian edytował ten post 27.04.2013 13:29
#5
Napisano 27.04.2013 13:33
/* Plugin generated by AMXX-Studio */ #include <amxmodx> #include <amxmisc> #define PLUGIN "xXPLUGINXx" #define VERSION "1.0" #define AUTHOR "Pan Marian" new runda; public plugin_init() { register_plugin(PLUGIN, VERSION, AUTHOR) register_logevent("Runda", 2, "1=Round_Start") register_event("TextMsg", "reset", "a", "2&#Game_will_restart_in" ); register_event("TextMsg", "reset", "a", "2&#Game_C") } public Runda() { runda++ if(runda % 2 == 0) { //Cos! } } public reset() { runda = 0 }
To rozwiąże Sprawę
#6
Napisano 27.04.2013 13:40
/* Plugin generated by AMXX-Studio */
#include <amxmodx>
#include <amxmisc>
#define PLUGIN "xXPLUGINXx"
#define VERSION "1.0"
#define AUTHOR "Pan Marian"
new runda;
public plugin_init() {
register_plugin(PLUGIN, VERSION, AUTHOR)
register_logevent("Runda", 2, "1=Round_Start")
register_event("TextMsg", "reset", "a", "2&#Game_will_restart_in", "2&#Game_C");
}
public Runda()
{
if(!(++runda % 2))
{
//Cos!
}
}
public reset()
{
runda = 0
}
Posiadam TBM (inaczej PTB), które działa dużo lepiej niż zwykłe PTB, nawet na modach z lvlami. Zainteresowany? Proszę bardzo
#7
Napisano 27.04.2013 15:58
#8 Gość_21977_*
Napisano 30.04.2013 04:03
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
Użytkownicy przeglądający ten temat: 0
0 użytkowników, 0 gości, 0 anonimowych