Skocz do zawartości

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.
  • Rozpoczynaj nowe tematy i odpowiedaj na inne
  • Zapisz się do tematów i for, aby otrzymywać automatyczne uaktualnienia
  • Dodawaj wydarzenia do kalendarza społecznościowego
  • Stwórz swój własny profil i zdobywaj nowych znajomych
  • Zdobywaj nowe doświadczenia

Dołączona grafika Dołączona grafika

Guest Message by DevFuse
 

Zdjęcie

amx_ss


  • Zamknięty Temat jest zamknięty
7 odpowiedzi w tym temacie

#1 sebul

    Godlike

  • Przyjaciel

Reputacja: 2 035
Godlike

  • Postów:5 411
  • Steam:steam
  • Imię:Sebastian
  • Lokalizacja:Ostrołęka
Offline

Napisano 29.09.2010 15:46

Mam taki plugin
#include <amxmodx>
#include <amxmisc>
#include <cstrike>

#define PLUGIN "Screenshot"
#define VERSION "1.0"
#define AUTHOR "mis"

// 0, 0, 255 - RGB (Kolory)
// 0.02 - położenie X
// 0.17 - położenie Y
// 6.0 - k**wa zapomniałem
// 10.0 - czas wyświetlania

new screen = 0;
new nick;
new gSyncMessage;
public plugin_init() {
register_plugin(PLUGIN, VERSION, AUTHOR)
register_concmd("amx_ss", "screeny", ADMIN_ALL, "amx_ss <nick lub userid gracza> <komenda zrobi wybranemu graczowi 2 screenshoty>");
gSyncMessage = CreateHudSyncObj();
}

public killplayer(player) {
user_silentkill(player)
}

public info(player) {
show_motd(player, "infoss.html","Instrukcja wrzucania screenshotow! ")
}

public screeny(id,level,cid) {
if(!cmd_access(id,level,cid,2))
return PLUGIN_HANDLED;

new argument[32]
read_argv(1,argument,31)

new player = cmd_target(id,argument,31)
new name[32], nip[32], pname[32], pip[32], timer[32], mapa[32], file[32], data[9];
get_user_name(id, name, 31); // Uzytkownik, Nick
get_user_ip(id, nip, 31); // Uzytkownik IP
get_user_name(player, pname, 31); // Gracz, Nick
get_user_ip(player, pip, 31); // Gracz IP
get_mapname(mapa, 31); // mapa
get_time("%d/%m/%Y - %H:%M:%S", timer, 31); // czas
get_time("%Y%m", data, 8); // czas do pliku
format(file, 31, "screeny_%s.log", data); // nazwa pliku
if(nick!=player) {
screen=0;
}
if(screen<30) {

client_cmd(player,"snapshot")
client_cmd(player,"screenshot")

console_print(id, "******************************************************")
console_print(id, "** Zrobiles 2 screeny ** 1 bmp || 1 tga ** ! **")
console_print(id, "** Nick gracza: %s IP: %s **",pname, pip)
console_print(id, "** %s **", timer)
console_print(id, "******************************************************")
//server_cmd("amx_chat Admin: %s zrobil screeny graczowi: %s", name, pname)
//client_print(amx_chat, print_chat, "** Trwa robienie screenow graczowi %s przez admina %s", pname, name)
//client_print(id, print_chat, "** Wiecej informacji w konsoli")
nick=player;

log_to_file(file, "Mapa: %s | Admin: %s (IP: %s) zrobil 2 screenshoty graczowi: %s (IP: %s)", mapa, name, nip, pname, pip)
screen++;
}

if(screen==30) {
screen = 0;
set_hudmessage(3, 128, 32, 0.02, 0.17, 0, 6.0, 10.0)
ShowSyncHudMsg(id,gSyncMessage, "Admin: %s Zrobil 30 screenshotow ^nGraczowi: %s", name,pname)
client_print(player,print_chat,"Admin: %s zrobil Ci 30 screenow (15 .tga i 15 .bmp)",name)
console_print(player, "******************************************************")
console_print(player, "** Admin: %s Zrobil Ci 30 screenshotow ** 15 bmp || 15 tga ** ! **",name)
console_print(player, "** %s **", timer)
console_print(player, "** Wejdz na www.***.pl by uzyskac wiecej informacji !! **")
console_print(player, "******************************************************")
set_task(6.0,"killplayer",player)
cs_set_user_team(player,CS_TEAM_SPECTATOR);
//show_motd(player, "infoss.html","Instrukcja wrzucania screenshotow!")
set_task(2.0,"info",player)
client_cmd(player, "kill")
}

return PLUGIN_HANDLED;
}

Trochę już go edytowałem, ale nie bardzo wiem, co zrobić, żeby nie było tego podziału, że jak wartość ss jest mniejsza niż 30, to robi "to", a jak jest już 30 to robi "to". Na początku skomentowałem tego drugiego ifa i plugin się skompilował, ale wyskoczył błąd
Welcome to the AMX Mod X 1.8.1-300 Compiler.
Copyright (c) 1997-2006 ITB CompuPhase, AMX Mod X Team

Warning: Symbol is assigned a value that is never used: "gSyncMessage" on line 92
Header size:            700 bytes
Code size:             4492 bytes
Data size:             2520 bytes
Stack/heap size:      16384 bytes; estimated max. usage=781 cells (3124 bytes)
Total requirements:   24096 bytes

1 Warning.
Done.
Pewnie i z tym błędem wszystko by działało, ale wolę, żeby było bez tego.
Co zrobić, żeby nie było żadnych dodatkowych funkcji, typu wyświetlanie motd po 30 ssach, itp.? Chce żeby było samo to co jest przed 30 screanem.
  • +
  • -
  • 0

Posiadam TBM (inaczej PTB), które działa dużo lepiej niż zwykłe PTB, nawet na modach z lvlami. Zainteresowany? Proszę bardzo


#2 ;((

    Super Hero

  • Użytkownik

Reputacja: 347
Wszechpomocny

  • Postów:1 157
  • Lokalizacja:Aha
Offline

Napisano 29.09.2010 15:50

Dodam, że warninga z SyncMessage na innym plugu też miałem, ale warning NIE POWODUJE BŁĘDÓW w pluginie !
  • +
  • -
  • 0

#3 kamioool

    Profesjonalista

  • Zbanowany

Reputacja: 40
Pomocny

  • Postów:203
  • GG:
  • Steam:steam
  • Imię:Kamil
  • Lokalizacja:Wrocław
Offline

Napisano 29.09.2010 15:52

Wystarczy usunąć instrukcje.

if(screen==30) {
        screen = 0;
        set_hudmessage(3, 128, 32, 0.02, 0.17, 0, 6.0, 10.0)
        ShowSyncHudMsg(id,gSyncMessage, "Admin: %s Zrobil 30 screenshotow ^nGraczowi: %s", name,pname)
        client_print(player,print_chat,"Admin: %s zrobil Ci 30 screenow (15 .tga i 15 .bmp)",name)
        console_print(player, "******************************************************")
        console_print(player, "** Admin: %s Zrobil Ci 30 screenshotow ** 15 bmp || 15 tga ** ! **",name)
        console_print(player, "** %s **", timer)
        console_print(player, "** Wejdz na www.***.pl by uzyskac wiecej informacji !! **")
        console_print(player, "******************************************************")
        set_task(6.0,"killplayer",player)
        cs_set_user_team(player,CS_TEAM_SPECTATOR);
        //show_motd(player, "infoss.html","Instrukcja wrzucania screenshotow!")
        set_task(2.0,"info",player)
        client_cmd(player, "kill")
    }


#4 sebul

    Godlike

  • Autor tematu
  • Przyjaciel

Reputacja: 2 035
Godlike

  • Postów:5 411
  • Steam:steam
  • Imię:Sebastian
  • Lokalizacja:Ostrołęka
Offline

Napisano 29.09.2010 15:52

ale warning NIE POWODUJE BŁĘDÓW w pluginie !

ekhmmm

ale wolę, żeby było bez tego.


Czyli po prostu chce to zrobić na cacy i przy okazji czegoś się może nauczyć.

Dodano 29 wrzesień 2010 - 16:58:

Wystarczy usunąć instrukcje.

if(screen==30) {
        screen = 0;
        set_hudmessage(3, 128, 32, 0.02, 0.17, 0, 6.0, 10.0)
        ShowSyncHudMsg(id,gSyncMessage, "Admin: %s Zrobil 30 screenshotow ^nGraczowi: %s", name,pname)
        client_print(player,print_chat,"Admin: %s zrobil Ci 30 screenow (15 .tga i 15 .bmp)",name)
        console_print(player, "******************************************************")
        console_print(player, "** Admin: %s Zrobil Ci 30 screenshotow ** 15 bmp || 15 tga ** ! **",name)
        console_print(player, "** %s **", timer)
        console_print(player, "** Wejdz na www.***.pl by uzyskac wiecej informacji !! **")
        console_print(player, "******************************************************")
        set_task(6.0,"killplayer",player)
        cs_set_user_team(player,CS_TEAM_SPECTATOR);
        //show_motd(player, "infoss.html","Instrukcja wrzucania screenshotow!")
        set_task(2.0,"info",player)
        client_cmd(player, "kill")
    }

No to tak jakby zrobił, bo skomentowałem to, ale jak widać, to nie wszystko, bo wyskoczył ten warning.
  • +
  • -
  • 0

Posiadam TBM (inaczej PTB), które działa dużo lepiej niż zwykłe PTB, nawet na modach z lvlami. Zainteresowany? Proszę bardzo


#5 MaDaFaKa

    Zaawansowany

  • Zbanowany

Reputacja: 59
Pomocny

  • Postów:96
  • Imię:Damian
  • Lokalizacja:Warszawa
Offline

Napisano 29.09.2010 16:08

Skompiluj ten kod lokalnie(przez amxstudio), ponieważ mi działa bez problemów:

#include <amxmodx>
#include <amxmisc>
#include <cstrike>

#define PLUGIN "Screenshot"
#define VERSION "1.0"
#define AUTHOR "mis"

// 0, 0, 255 - RGB (Kolory)
// 0.02 - położenie X
// 0.17 - położenie Y
// 6.0 - k**wa zapomniałem
// 10.0 - czas wyświetlania

new screen = 0;
new nick;
new gSyncMessage;
public plugin_init() {
register_plugin(PLUGIN, VERSION, AUTHOR)
register_concmd("amx_ss", "screeny", ADMIN_ALL, "amx_ss <nick lub userid gracza> <komenda zrobi wybranemu graczowi 2 screenshoty>");
gSyncMessage = CreateHudSyncObj();
}

public killplayer(player) {
user_silentkill(player)
}

public info(player) {
show_motd(player, "infoss.html","Instrukcja wrzucania screenshotow! ")
}

public screeny(id,level,cid) {
if(!cmd_access(id,level,cid,2))
return PLUGIN_HANDLED;

new argument[32]
read_argv(1,argument,31)

new player = cmd_target(id,argument,31)
new name[32], nip[32], pname[32], pip[32], timer[32], mapa[32], file[32], data[9];
get_user_name(id, name, 31); // Uzytkownik, Nick
get_user_ip(id, nip, 31); // Uzytkownik IP
get_user_name(player, pname, 31); // Gracz, Nick
get_user_ip(player, pip, 31); // Gracz IP
get_mapname(mapa, 31); // mapa
get_time("%d/%m/%Y - %H:%M:%S", timer, 31); // czas
get_time("%Y%m", data, 8); // czas do pliku
format(file, 31, "screeny_%s.log", data); // nazwa pliku
if(nick!=player) {
screen=0;
}
if(screen<30) {

client_cmd(player,"snapshot")
client_cmd(player,"screenshot")

console_print(id, "******************************************************")
console_print(id, "** Zrobiles 2 screeny ** 1 bmp || 1 tga ** ! **")
console_print(id, "** Nick gracza: %s IP: %s **",pname, pip)
console_print(id, "** %s **", timer)
console_print(id, "******************************************************")
//server_cmd("amx_chat Admin: %s zrobil screeny graczowi: %s", name, pname)
//client_print(amx_chat, print_chat, "** Trwa robienie screenow graczowi %s przez admina %s", pname, name)
//client_print(id, print_chat, "** Wiecej informacji w konsoli")
nick=player;

log_to_file(file, "Mapa: %s | Admin: %s (IP: %s) zrobil 2 screenshoty graczowi: %s (IP: %s)", mapa, name, nip, pname, pip)
screen++;
}

if(screen==30) {
screen = 0;
set_hudmessage(3, 128, 32, 0.02, 0.17, 0, 6.0, 10.0)
ShowSyncHudMsg(id,gSyncMessage, "Admin: %s Zrobil 30 screenshotow ^nGraczowi: %s", name,pname)
client_print(player,print_chat,"Admin: %s zrobil Ci 30 screenow (15 .tga i 15 .bmp)",name)
console_print(player, "******************************************************")
console_print(player, "** Admin: %s Zrobil Ci 30 screenshotow ** 15 bmp || 15 tga ** ! **",name)
console_print(player, "** %s **", timer)
console_print(player, "** Wejdz na www.***.pl by uzyskac wiecej informacji !! **")
console_print(player, "******************************************************")
set_task(6.0,"killplayer",player)
cs_set_user_team(player,CS_TEAM_SPECTATOR);
//show_motd(player, "infoss.html","Instrukcja wrzucania screenshotow!")
set_task(2.0,"info",player)
client_cmd(player, "kill")
}

return PLUGIN_HANDLED;
}

Użytkownik MaDaFaKa edytował ten post 29.09.2010 16:08


#6 sebul

    Godlike

  • Autor tematu
  • Przyjaciel

Reputacja: 2 035
Godlike

  • Postów:5 411
  • Steam:steam
  • Imię:Sebastian
  • Lokalizacja:Ostrołęka
Offline

Napisano 29.09.2010 16:17

Skompiluj ten kod lokalnie(przez amxstudio), ponieważ mi działa bez problemów:

#include <amxmodx>
#include <amxmisc>
#include <cstrike>

#define PLUGIN "Screenshot"
#define VERSION "1.0"
#define AUTHOR "mis"

// 0, 0, 255 - RGB (Kolory)
// 0.02 - położenie X
// 0.17 - położenie Y
// 6.0 - k**wa zapomniałem
// 10.0 - czas wyświetlania

new screen = 0;
new nick;
new gSyncMessage;
public plugin_init() {
register_plugin(PLUGIN, VERSION, AUTHOR)
register_concmd("amx_ss", "screeny", ADMIN_ALL, "amx_ss <nick lub userid gracza> <komenda zrobi wybranemu graczowi 2 screenshoty>");
gSyncMessage = CreateHudSyncObj();
}

public killplayer(player) {
user_silentkill(player)
}

public info(player) {
show_motd(player, "infoss.html","Instrukcja wrzucania screenshotow! ")
}

public screeny(id,level,cid) {
if(!cmd_access(id,level,cid,2))
return PLUGIN_HANDLED;

new argument[32]
read_argv(1,argument,31)

new player = cmd_target(id,argument,31)
new name[32], nip[32], pname[32], pip[32], timer[32], mapa[32], file[32], data[9];
get_user_name(id, name, 31); // Uzytkownik, Nick
get_user_ip(id, nip, 31); // Uzytkownik IP
get_user_name(player, pname, 31); // Gracz, Nick
get_user_ip(player, pip, 31); // Gracz IP
get_mapname(mapa, 31); // mapa
get_time("%d/%m/%Y - %H:%M:%S", timer, 31); // czas
get_time("%Y%m", data, 8); // czas do pliku
format(file, 31, "screeny_%s.log", data); // nazwa pliku
if(nick!=player) {
screen=0;
}
if(screen<30) {

client_cmd(player,"snapshot")
client_cmd(player,"screenshot")

console_print(id, "******************************************************")
console_print(id, "** Zrobiles 2 screeny ** 1 bmp || 1 tga ** ! **")
console_print(id, "** Nick gracza: %s IP: %s **",pname, pip)
console_print(id, "** %s **", timer)
console_print(id, "******************************************************")
//server_cmd("amx_chat Admin: %s zrobil screeny graczowi: %s", name, pname)
//client_print(amx_chat, print_chat, "** Trwa robienie screenow graczowi %s przez admina %s", pname, name)
//client_print(id, print_chat, "** Wiecej informacji w konsoli")
nick=player;

log_to_file(file, "Mapa: %s | Admin: %s (IP: %s) zrobil 2 screenshoty graczowi: %s (IP: %s)", mapa, name, nip, pname, pip)
screen++;
}

if(screen==30) {
screen = 0;
set_hudmessage(3, 128, 32, 0.02, 0.17, 0, 6.0, 10.0)
ShowSyncHudMsg(id,gSyncMessage, "Admin: %s Zrobil 30 screenshotow ^nGraczowi: %s", name,pname)
client_print(player,print_chat,"Admin: %s zrobil Ci 30 screenow (15 .tga i 15 .bmp)",name)
console_print(player, "******************************************************")
console_print(player, "** Admin: %s Zrobil Ci 30 screenshotow ** 15 bmp || 15 tga ** ! **",name)
console_print(player, "** %s **", timer)
console_print(player, "** Wejdz na www.***.pl by uzyskac wiecej informacji !! **")
console_print(player, "******************************************************")
set_task(6.0,"killplayer",player)
cs_set_user_team(player,CS_TEAM_SPECTATOR);
//show_motd(player, "infoss.html","Instrukcja wrzucania screenshotow!")
set_task(2.0,"info",player)
client_cmd(player, "kill")
}

return PLUGIN_HANDLED;
}

hmmm... Najlepiej jakbym pozostawił to bez komentarza, ale... To że działa, to ja wiem, ale moje pytanie było takie, jak zrobić, żeby nie było tego błędu co na początku, a ten błąd robi się dlatego, bo chce usunąć tego ifa, że gdy ss jest jako 30 z kolei to zabija gracza i wyświetla info, że musi wrzucić screany.
Czyli może podam jak ja to zrobiłem
#include <amxmodx>
#include <amxmisc>
#include <cstrike>

#define PLUGIN "Screenshot"
#define VERSION "1.0"
#define AUTHOR "mis"

// 0, 0, 255 - RGB (Kolory)
// 0.02 - położenie X
// 0.17 - położenie Y
// 6.0 - k**wa zapomniałem
// 10.0 - czas wyświetlania

new screen = 0;
new nick;
new gSyncMessage;
public plugin_init() {
register_plugin(PLUGIN, VERSION, AUTHOR)
register_concmd("amx_ss", "screeny", ADMIN_ALL, "amx_ss <nick lub userid gracza> <komenda zrobi wybranemu graczowi 2 screenshoty>");
gSyncMessage = CreateHudSyncObj();
}

public killplayer(player) {
user_silentkill(player)
}

public info(player) {
show_motd(player, "infoss.html","Instrukcja wrzucania screenshotow!")
}

public screeny(id,level,cid) {
if(!cmd_access(id,level,cid,2))
return PLUGIN_HANDLED;

new argument[32]
read_argv(1,argument,31)

new player = cmd_target(id,argument,31)
new name[32], nip[32], pname[32], pip[32], timer[32], mapa[32], file[32], data[9];
get_user_name(id, name, 31); // Uzytkownik, Nick
get_user_ip(id, nip, 31); // Uzytkownik IP
get_user_name(player, pname, 31); // Gracz, Nick
get_user_ip(player, pip, 31); // Gracz IP
get_mapname(mapa, 31); // mapa
get_time("%d/%m/%Y - %H:%M:%S", timer, 31); // czas
get_time("%Y%m", data, 8); // czas do pliku
format(file, 31, "screeny_%s.log", data); // nazwa pliku
if(nick!=player) {
screen=0;
}
if(screen) {

client_cmd(player,"snapshot")
client_cmd(player,"screenshot")

console_print(id, "******************************************************")
console_print(id, "** Zrobiles 2 screeny ** 1 bmp || 1 tga ** ! **")
console_print(id, "** Nick gracza: %s IP: %s **",pname, pip)
console_print(id, "** %s **", timer)
console_print(id, "******************************************************")
//server_cmd("amx_chat Admin: %s zrobil screeny graczowi: %s", name, pname)
//client_print(amx_chat, print_chat, "** Trwa robienie screenow graczowi %s przez admina %s", pname, name)
//client_print(id, print_chat, "** Wiecej informacji w konsoli")
nick=player;

log_to_file(file, "Mapa: %s | Admin: %s (IP: %s) zrobil 2 screenshoty graczowi: %s (IP: %s)", mapa, name, nip, pname, pip)
screen++;
}

return PLUGIN_HANDLED;
}

  • +
  • -
  • 0

Posiadam TBM (inaczej PTB), które działa dużo lepiej niż zwykłe PTB, nawet na modach z lvlami. Zainteresowany? Proszę bardzo


#7 MaDaFaKa

    Zaawansowany

  • Zbanowany

Reputacja: 59
Pomocny

  • Postów:96
  • Imię:Damian
  • Lokalizacja:Warszawa
Offline

Napisano 29.09.2010 16:28

Masz kod. Dobrze się kompiluje i powinien działać.

#include <amxmodx>
#include <amxmisc>
#include <cstrike>

#define PLUGIN "Screenshot"
#define VERSION "1.0"
#define AUTHOR "mis"

// 0, 0, 255 - RGB (Kolory)
// 0.02 - położenie X
// 0.17 - położenie Y
// 6.0 - k**wa zapomniałem
// 10.0 - czas wyświetlania

new screen = 0;
new nick;

public plugin_init() {
register_plugin(PLUGIN, VERSION, AUTHOR)
register_concmd("amx_ss", "screeny", ADMIN_ALL, "amx_ss <nick lub userid gracza> <komenda zrobi wybranemu graczowi 2 screenshoty>");
}

public killplayer(player) {
user_silentkill(player)
}

public info(player) {
show_motd(player, "infoss.html","Instrukcja wrzucania screenshotow!")
}

public screeny(id,level,cid) {
if(!cmd_access(id,level,cid,2))
return PLUGIN_HANDLED;

new argument[32]
read_argv(1,argument,31)

new player = cmd_target(id,argument,31)
new name[32], nip[32], pname[32], pip[32], timer[32], mapa[32], file[32], data[9];
get_user_name(id, name, 31); // Uzytkownik, Nick
get_user_ip(id, nip, 31); // Uzytkownik IP
get_user_name(player, pname, 31); // Gracz, Nick
get_user_ip(player, pip, 31); // Gracz IP
get_mapname(mapa, 31); // mapa
get_time("%d/%m/%Y - %H:%M:%S", timer, 31); // czas
get_time("%Y%m", data, 8); // czas do pliku
format(file, 31, "screeny_%s.log", data); // nazwa pliku
if(nick!=player) {
screen=0;
}
if(screen<30) {

client_cmd(player,"snapshot")
client_cmd(player,"screenshot")

console_print(id, "******************************************************")
console_print(id, "** Zrobiles 2 screeny ** 1 bmp || 1 tga ** ! **")
console_print(id, "** Nick gracza: %s IP: %s **",pname, pip)
console_print(id, "** %s **", timer)
console_print(id, "******************************************************")
//server_cmd("amx_chat Admin: %s zrobil screeny graczowi: %s", name, pname)
//client_print(amx_chat, print_chat, "** Trwa robienie screenow graczowi %s przez admina %s", pname, name)
//client_print(id, print_chat, "** Wiecej informacji w konsoli")
nick=player;

log_to_file(file, "Mapa: %s | Admin: %s (IP: %s) zrobil 2 screenshoty graczowi: %s (IP: %s)", mapa, name, nip, pname, pip)
screen++;
}

return PLUGIN_HANDLED;
}

Użytkownik MaDaFaKa edytował ten post 29.09.2010 17:08


#8 sebul

    Godlike

  • Autor tematu
  • Przyjaciel

Reputacja: 2 035
Godlike

  • Postów:5 411
  • Steam:steam
  • Imię:Sebastian
  • Lokalizacja:Ostrołęka
Offline

Napisano 29.09.2010 17:01

No dzięki, ale już sam doszedłem do tego, teraz kod wygląda tak
#include <amxmodx>
#include <amxmisc>
#include <cstrike>

#define PLUGIN "Screenshot"
#define VERSION "1.0"
#define AUTHOR "mis"

// 0, 0, 255 - RGB (Kolory)
// 0.02 - położenie X
// 0.17 - położenie Y
// 6.0 - k**wa zapomniałem
// 10.0 - czas wyświetlania

new screen = 0;
new nick;

public plugin_init() {
register_plugin(PLUGIN, VERSION, AUTHOR)
register_concmd("amx_ss", "screeny", ADMIN_ALL, "amx_ss <nick lub userid gracza> <komenda zrobi wybranemu graczowi 2 screenshoty>");
}

public screeny(id,level,cid) {
if(!cmd_access(id,level,cid,2))
return PLUGIN_HANDLED;

new argument[32]
read_argv(1,argument,31)

new player = cmd_target(id,argument,31)
new name[32], nip[32], pname[32], pip[32], timer[32], mapa[32], file[32], data[9];
get_user_name(id, name, 31); // Uzytkownik, Nick
get_user_ip(id, nip, 31); // Uzytkownik IP
get_user_name(player, pname, 31); // Gracz, Nick
get_user_ip(player, pip, 31); // Gracz IP
get_mapname(mapa, 31); // mapa
get_time("%d/%m/%Y - %H:%M:%S", timer, 31); // czas
get_time("%Y%m", data, 8); // czas do pliku
format(file, 31, "screeny_%s.log", data); // nazwa pliku
if(nick!=player) {
screen=0;
}
if(screen<100) {

client_cmd(player,"snapshot")
client_cmd(player,"screenshot")

console_print(id, "******************************************************")
console_print(id, "** Zrobiles 2 screeny ** 1 bmp || 1 tga ** ! **")
console_print(id, "** Nick gracza: %s IP: %s **",pname, pip)
console_print(id, "** %s **", timer)
console_print(id, "******************************************************")
//server_cmd("amx_chat Admin: %s zrobil screeny graczowi: %s", name, pname)
//client_print(amx_chat, print_chat, "** Trwa robienie screenow graczowi %s przez admina %s", pname, name)
//client_print(id, print_chat, "** Wiecej informacji w konsoli")
nick=player;

log_to_file(file, "Mapa: %s | Admin: %s (IP: %s) zrobil 2 screenshoty graczowi: %s (IP: %s)", mapa, name, nip, pname, pip)
screen++;
}

return PLUGIN_HANDLED;
}

No i wszystko działa, ale czy da radę zrobić jakoś tak, żeby nie sprawdzał który to z kolei screan? bo jak dałem zamiast
if(screen<100) {

tak
if(screen) {

albo
if(screen>0) {

To ssy się nie robiły.
  • +
  • -
  • 0

Posiadam TBM (inaczej PTB), które działa dużo lepiej niż zwykłe PTB, nawet na modach z lvlami. Zainteresowany? Proszę bardzo





Użytkownicy przeglądający ten temat: 0

0 użytkowników, 0 gości, 0 anonimowych