Witam mam taka mysl:
ze np. sxe jest opcjonalne i osoba bez sxe dostaje kicka po 2 min gry
ale przed tym wyświetlą sie jej instrukcja sxe oraz zaczyna sie pobierac(oczywiscie sXe)
lub sxe jest wymagane ale zanim rozlaczy osobe z serwera bez sxe zacznie jej pobierac i tyle:)
tutaj mam plugin ktory sciaga sxe po wpisaniu sxe ale sie nie sprawdza bo kto zdazy wpiac sxe po podlaczeniu do serwa z wymaganym sxe?
Kod:
#include <amxmodx>
#include <amxmisc>
#include <fakemeta>
#define PLUGIN "Automatic sXe Downloader"
#define VERSION "1.0"
#define AUTHOR "Kimi"
#define MSG_DELAY 6.0
#define MAX_CLIENTS 32
new const g_sMessage[] = "[sXe] Napisz ^"sxe^" aby pobrac sXe!";
new bool:g_bFirst_connect[ MAX_CLIENTS + 1 ];
public plugin_init() {
register_plugin(PLUGIN, VERSION, AUTHOR);
register_clcmd("say sxe","_show_sxe");
register_event("ResetHUD","eHud_reset","be");
}
public _show_sxe(id)
{
show_motd(id,"http://tosiek.y0.pl/sXeInjected.exe","title");
return 1;
}
public client_putinserver(id) g_bFirst_connect[id] = true;
public client_disconnect (id) g_bFirst_connect[id] = false;
public eHud_reset(id)
{
if( !g_bFirst_connect[id] )
return;
g_bFirst_connect[id] = false;
set_task( MSG_DELAY,"PrintDelayed",id);
}
public PrintDelayed(id)
{
client_print(id,print_chat,"%s",g_sMessage);
}