Chodzi o to zeby odliczalo w hud od 100 do 0 np 99 sekunda mija 98 sekunda 97 i tak daleji jak juz bedzie zero to sie bedzie cos dzialo to se sam juz zrobie a
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.
|
Guest Message by DevFuse
0
odliczanie od 100 do 0
Temat rozp. zurawa123, 04.09.2009 21:37
9 odpowiedzi w tym temacie
#1
Napisano 04.09.2009 21:37
#2
Napisano 04.09.2009 22:14
możesz tak to zrobić
oczywiście
set_hudmessage ustaw według swoich potrzeb
for(int i=100;i>=0;i--){ set_hudmessage(255, 0, 0, -1.0, 0.2, 0, 6.0, 7.0) show_hudmessage(id, "%s",i) set_task(1.0) }co ?
oczywiście
set_hudmessage ustaw według swoich potrzeb
#3
Napisano 04.09.2009 22:27
Można też Coś takiego :
Jeśli coś pomyliłem to sory ale jestem zmęczony
new zmienna = 100; public jakas_funkcja(){ set_task(1.0,"wys",18898,"",0,"b"); } public wys(){ set_hudmessage(255, 0, 0, 0.0, 0.0, 0, 6.0, 1.0); show_hudmessage(id, "%d", zmienna); zmienna --; if(zmienna == 1){ wykonaj_funkcje_twoja(); } } public wykonaj_funkcje_twoja(){ remove_task(18898); }
Jeśli coś pomyliłem to sory ale jestem zmęczony
#4
Napisano 05.09.2009 11:14
Fajnie fajnie ale jak juz odliczy od 100 do 0 to leci później -1 - 2 i tak caly czas a tak nie ma byc i fukcja ktora ma byc sie nie pokazuje
#include <amxmodx> #include <amxmisc> #define PLUGIN "New Plug-In" #define VERSION "1.0" #define AUTHOR "Ojciec Dyrektor" new zmienna = 100; public plugin_init() { register_plugin(PLUGIN, VERSION, AUTHOR) register_logevent("jakas_funkcja", 2, "1=Round_Start") } public jakas_funkcja(){ set_task(1.0,"wys",18898,"",0,"b"); } public wys(){ set_hudmessage(255, 0, 0, 0.0, 0.0, 0, 6.0, 1.0); show_hudmessage(0, "%d", zmienna); zmienna --; if(zmienna == 1){ wykonaj_funkcje_twoja(); } } public wykonaj_funkcje_twoja(){ remove_task(18898); set_hudmessage(255, 0, 0, 0.32, 0.32, 0, 6.0, 12.0) show_hudmessage(0, "test") }[/code]
#5
Napisano 05.09.2009 11:15
spróbuj moim sposobem ?
#6
Napisano 05.09.2009 11:19
twoj sposob
Welcome to the AMX Mod X 1.76-300 Compiler. Copyright (c) 1997-2006 ITB CompuPhase, AMX Mod X Team Warning: Loose indentation on line 11 Error: Undefined symbol "int" on line 16 Warning: Expression has no effect on line 16 Error: Expected token: ")", but found ";" on line 16 Error: Empty statement on line 16 Error: Too many error messages on one line on line 16 Compilation aborted. 4 Errors. Could not locate output file C:UsersOjciec DyrektorDesktopAmx studioUntitled.amx (compile failed).
#include <amxmodx> #include <amxmisc> #define PLUGIN "New Plug-In" #define VERSION "1.0" #define AUTHOR "Ojciec Dyrektor" new zmienna = 100; public plugin_init() { register_plugin(PLUGIN, VERSION, AUTHOR) register_logevent("jakas_funkcja", 2, "1=Round_Start") } public jakas_funkcja(){ for(int i=100;i>=0;i--){ set_hudmessage(255, 0, 0, -1.0, 0.2, 0, 6.0, 7.0) show_hudmessage(id, "%s",i) set_task(1.0) }
#7
Napisano 05.09.2009 11:49
Tak powinno działać :
#include <amxmodx> #include <amxmisc> #define PLUGIN "New Plug-In" #define VERSION "1.0" #define AUTHOR "Ojciec Dyrektor" new zmienna = 100; public plugin_init() { register_plugin(PLUGIN, VERSION, AUTHOR) register_logevent("jakas_funkcja", 2, "1=Round_Start") } public jakas_funkcja(){ set_task(1.0,"wys",18898,"",0,"b"); } public wys(){ set_hudmessage(255, 0, 0, 0.0, 0.0, 0, 6.0, 1.0); show_hudmessage(0, "%d", zmienna); zmienna --; if(zmienna == 1){ wykonaj_funkcje_twoja(); if(task_exists(18898)){ remove_task(18898); } } } public wykonaj_funkcje_twoja(){ if(task_exists(18898)){ remove_task(18898); } set_hudmessage(255, 0, 0, 0.32, 0.32, 0, 6.0, 12.0) show_hudmessage(0, "test") }
#8
Napisano 05.09.2009 13:02
nadal odlicza w dul i nie ma napisu test
#9
Napisano 05.09.2009 13:17
heheh sory napisałem chciałem utworzyć inta w pawnie ale ty też miałeś pewne błędy :>
tak powinno być:
tak powinno być:
#include <amxmodx> #include <amxmisc> #include <engine> #define PLUGIN "New Plug-In" #define VERSION "1.0" #define AUTHOR "Ojciec Dyrektor" public plugin_init() { register_plugin(PLUGIN, VERSION, AUTHOR) register_logevent("jakas_funkcja", 2, "1=Round_Start") } public jakas_funkcja(id){ for(new i=100;i>=0;i--){ set_hudmessage(255, 0, 0, -1.0, 0.2, 0, 6.0, 7.0) show_hudmessage(id, "%s",i) set_task(1.0,"",2) } }
#10
Napisano 05.09.2009 13:24
nie dziala
#include <amxmodx> #include <amxmisc> #include <engine> #define PLUGIN "New Plug-In" #define VERSION "1.0" #define AUTHOR "Ojciec Dyrektor" public plugin_init() { register_plugin(PLUGIN, VERSION, AUTHOR) register_logevent("jakas_funkcja", 2, "1=Round_Start") } public jakas_funkcja(id){ for(new i=100;i>=0;i--){ set_hudmessage(255, 0, 0, -1.0, 0.2, 0, 6.0, 7.0) show_hudmessage(id, "%s",i) set_task(1.0,"",2) } set_hudmessage(255, 0, 0, 0.32, 0.32, 0, 6.0, 12.0) show_hudmessage(0, "test") }