odliczanie od 100 do 0
zurawa123
04.09.2009
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
DarkGL
04.09.2009
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
Knopers
04.09.2009
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
zurawa123
05.09.2009
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]
zurawa123
05.09.2009
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) }
Knopers
05.09.2009
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") }
DarkGL
05.09.2009
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) } }
zurawa123
05.09.2009
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") }