Skocz do zawartości

Nowy szablon forum

mygo.pl

Stworzyliśmy dla Was nowy wygląd forum. Z pewnością znajdziesz rzeczy, które wg Ciebie mogą zostać zmienione - wspomnij o tym w specjalnym wątku.

Czytaj więcej

Jak założyć własną sieć

serwerów CS

Zastanawiasz się nad prowadzeniem własnej sieci serwerów? Przeczytaj podstawowe informacje, na które należy zwrócić uwagę, przy takim projekcie.

Czytaj więcej

Tworzymy spis sieci

dodaj swoją

Dodaj sieć do której należysz, pozwoli to na promocję i budowę ogólnopolskiej bazy sieci CS.

Czytaj więcej

RSSHelp Me Plz!


MYGO.pl
 Udostępnij

Rekomendowane odpowiedzi

  • RSSy
Hello. I would like some modifications to the plugin mentioned below. When players type "/afk" and enter the system, the screen should become transparently red, but the game should still be visible. When players type "/afk" and exit the system, the screen should return to normal. The plugin I mentioned is:
#pragma semicolon 1

#include <amxmodx>
#include <reapi>

new bool:g_blPlayerAFK[MAX_PLAYERS+1];

public plugin_init(){
register_plugin("Is Player AFK", "0.1", "` BesTCore;"); /*Duzenleme: By.KinG*/

RegisterHookChain(RG_CBasePlayer_Spawn, "RG_CBasePlayer_Spawn_Post", .post = true);

register_clcmd("say /afk", "clcmd_afk");

register_clcmd("say", "clcmd_say");
register_clcmd("say_team", "clcmd_say");
}

public clcmd_say(const id){
if(g_blPlayerAFK[id]){
client_print_color(id, id, "^3Afk sisteminde olduğunuz için mesajlaşamazsınız, çıkış yapmak için ^4/afk^3 yazınız.");
show_hudmessage(id, "^3Afk sisteminde olduğunuz için mesajlaşamazsınız, çıkış yapmak için ^4/afk^3 yazınız.", 0.45, 0.05, 1.0, 1.0, 0, 0.1, 1.0);
return PLUGIN_HANDLED;
}
return PLUGIN_CONTINUE;
}

public RG_CBasePlayer_Spawn_Post(const id){
if(get_member(id, m_bJustConnected)){
return;
}

if(g_blPlayerAFK[id]){
set_task(5.0, "UserKill", id);
}
}

public UserKill(id){
client_print_color(id, id, "^3Afk sisteminde olduğunuz için slaylandınız, çıkış yapmak için ^4/afk^3 yazınız.");
show_hudmessage(id, "^3Afk sisteminde olduğunuz için slaylandınız, çıkış yapmak için ^4/afk^3 yazınız.", 0.45, 0.05, 1.0, 1.0, 0, 0.1, 1.0);
user_kill(id, 1);
set_entvar(id, var_frags, 0.0);
set_member(id, m_iDeaths, 0);
}

public clcmd_afk(const id){
if(g_blPlayerAFK[id]){
client_print_color(id, id, "^3Başarılı bir şekilde afk sisteminden çıkış yaptınız.");
show_hudmessage(id, "^3Başarılı bir şekilde afk sisteminden çıkış yaptınız.", 0.45, 0.05, 1.0, 1.0, 0, 0.1, 1.0);
g_blPlayerAFK[id] = false;
return PLUGIN_HANDLED;
}
else {
g_blPlayerAFK[id] = true;
client_print_color(id, id, "^3Afk sistemine giriş yaptınız, her el başı slaylanacak ve artık mesaj atamayacaksınız.");
show_hudmessage(id, "^3Afk sistemine giriş yaptınız, her el başı slaylanacak ve artık mesaj atamayacaksınız.", 0.45, 0.05, 1.0, 1.0, 0, 0.1, 1.0);
if(is_user_alive(id)){
set_task(5.0, "UserKill", id);
}
}
return PLUGIN_HANDLED;
}

public client_disconnected(id){
g_blPlayerAFK[id] = false;
}

Przeczytaj cały wpis

Odnośnik do komentarza
Udostępnij na innych stronach

Gość
Ten temat został zamknięty. Brak możliwości dodania odpowiedzi.
 Udostępnij

  • Ostatnio przeglądający   0 użytkowników

    • Brak zarejestrowanych użytkowników przeglądających tę stronę.
×
×
  • Dodaj nową pozycję...