[ROZWIĄZANE] Czy ten plugin zadziała? Admi...
Maciek332
02.11.2012
Chciałem zrobić plugin na cod'a, który przywita i pożegna admina oraz premiowców.
Czy takie coś zadziała?
Jak zrobić, żeby po wyjściu z serwa pisało "admin/gracz premium nick wyszedl z serwa" ?
Czy takie coś zadziała?
#include <amxmodx>
#include <amxmisc>
#define PLUGIN "Admin Welcome"
#define VERSION "1.0"
#define AUTHOR "Sn!ff3r"
#define ADMIN ADMIN_LEVEL_A
#define PREMIUM ADMIN_LEVEL_H
public plugin_init()
register_plugin(PLUGIN, VERSION, AUTHOR)
public client_putinserver(id)
{
if (get_user_flags(id) && ADMIN)
{
new name[32]
get_user_name(id,name,31)
set_hudmessage(0, 255, 0, 0.0, 0.3, 0, 6.0, 5.0)
show_hudmessage(0, "Przychodzi admin!^n %s",name)
}
if (get_user_flags(id) && PREMIUM !& ADMIN)
{
new name[32]
get_user_name(id,name,31)
set_hudmessage(0, 255, 0, 0.0, 0.3, 0, 6.0, 5.0)
show_hudmessage(0, "Przychodzi gracz premium:!^n %s",name)
}
}
Jak zrobić, żeby po wyjściu z serwa pisało "admin/gracz premium nick wyszedl z serwa" ?
Bullecik
02.11.2012
Jak zrobić, żeby po wyjściu z serwa pisało "admin/gracz premium nick wyszedl z serwa" ?
client_disconnect (id)
Droso
02.11.2012
Zamiast && jedno czyli &
Możliwe, że ta osoba, która wbije nie zobaczy tego HUD'a, daj małe opóźnienie poprzez set_task
(Tak w ogóle pisałem taki plugin komuś tutaj na forum poszukaj w moich postach, tylko, że bez wyjścia.)
Wyjście zrób właśnie przez client_disconnect(index)
Możliwe, że ta osoba, która wbije nie zobaczy tego HUD'a, daj małe opóźnienie poprzez set_task
(Tak w ogóle pisałem taki plugin komuś tutaj na forum poszukaj w moich postach, tylko, że bez wyjścia.)
Wyjście zrób właśnie przez client_disconnect(index)
Gość_21977_* 02.11.2012
Automatyczna wiadomość
Ten temat został przeniesiony z forum
AMX Mod X → Pytania
do
Scripting AMXX → Problemy
Ten temat został przeniesiony z forum
AMX Mod X → Pytania
do
Scripting AMXX → Problemy
Maciek332
03.11.2012
#include <amxmodx>
#include <amxmisc>
#define PLUGIN "Admin Welcome"
#define VERSION "1.0"
#define AUTHOR "Sn!ff3r"
#define ADMIN ADMIN_LEVEL_A
#define PREMIUM ADMIN_LEVEL_H
public plugin_init()
register_plugin(PLUGIN, VERSION, AUTHOR)
public client_putinserver(id)
{
if (get_user_flags(id) & ADMIN)
{
set_task( 10.0, "admin", id );
}
if (get_user_flags(id) & PREMIUM & !ADMIN) // czy if (get_user_flags(id) & PREMIUM !& ADMIN) ??
{
set_task( 10.0, "premium", id );
}
}
public admin(id)
{
new name[32]
get_user_name(id,name,31)
set_hudmessage(0, 255, 0, 0.0, 0.3, 0, 6.0, 5.0)
show_hudmessage(0, "Przychodzi admin!^n %s",name)
}
public premium(id)
{
new name[32]
get_user_name(id,name,31)
set_hudmessage(0, 255, 0, 0.0, 0.3, 0, 6.0, 5.0)
show_hudmessage(0, "Przychodzi gracz premium:!^n %s",name)
}
client_disconnect (id)
{
if (get_user_flags(id) & ADMIN)
{
set_task( 10.0, "admin2", id );
}
if (get_user_flags(id) & PREMIUM & !ADMIN) // czy if (get_user_flags(id) & PREMIUM !& ADMIN) ??
{
set_task( 10.0, "premium2", id );
}
}
public admin2(id)
{
new name[32]
get_user_name(id,name,31)
set_hudmessage(0, 255, 0, 0.0, 0.3, 0, 6.0, 5.0)
show_hudmessage(0, "Odchodzi admin!^n %s",name)
}
public premium2(id)
{
new name[32]
get_user_name(id,name,31)
set_hudmessage(0, 255, 0, 0.0, 0.3, 0, 6.0, 5.0)
show_hudmessage(0, "Odchodzi gracz premium:!^n %s",name)
}
Użytkownik Maciek332 edytował ten post 03.11.2012 15:48
Droso
03.11.2012
Łap od razu z wyjściem z serwera
#include amxmodx #define PLUGIN "Admin Welcome" #define VERSION "1.0" #define AUTHOR "Sn!ff3r" #define ADMIN ADMIN_LEVEL_A #define PREMIUM ADMIN_LEVEL_H new name[32][32]; public plugin_init() register_plugin(PLUGIN, VERSION, AUTHOR) public client_putinserver(id) { if (get_user_flags(id) & ADMIN && !(get_user_flags(id) & PREMIUM)) { set_task( 10.0, "admin", id ); } else if (get_user_flags(id) & PREMIUM && !(get_user_flags(id) & ADMIN)) { set_task( 10.0, "premium", id ); } } public admin(id) { if(!is_user_connected(id)) return PLUGIN_CONTINUE; get_user_name(id,name[id],31) set_hudmessage(0, 255, 0, 0.0, 0.3, 0, 6.0, 5.0) show_hudmessage(0, "Przychodzi admin!^n %s",name[id]) return PLUGIN_CONTINUE; } public premium(id) { if(!is_user_connected(id)) return PLUGIN_CONTINUE; get_user_name(id,name[id],31) set_hudmessage(0, 255, 0, 0.0, 0.3, 0, 6.0, 5.0) show_hudmessage(0, "Przychodzi gracz premium:!^n %s",name[id]) return PLUGIN_CONTINUE; } public client_disconnect(id){ if (get_user_flags(id) & ADMIN && !(get_user_flags(id) & PREMIUM)) { set_hudmessage(255, 0, 0, 0.0, 0.3, 0, 6.0, 5.0) show_hudmessage(0, "Admin: %s ^nWyszedl z gry",name[id]) } else if (get_user_flags(id) & PREMIUM && !(get_user_flags(id) & ADMIN)) { set_hudmessage(255, 0, 0, 0.0, 0.3, 0, 6.0, 5.0) show_hudmessage(0, "VIP: %s ^nWyszedl z gry",name[id]) } }
dasiek
03.11.2012
Wiadomość wygenerowana automatycznie
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
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