Jump to content

Bartek Studniarski

Użytkownik
  • Content Count

    28
  • Joined

  • Last visited

  • Days Won

    1

Bartek Studniarski last won the day on November 14 2017

Bartek Studniarski had the most liked content!

Community Reputation

2 Silver I

About Bartek Studniarski

  • Rank
    Silver II

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. L 11/09/2017 - 21:43:45: Info (map "deathrun_castlerun_ff_sc") (file "errors_20171109.log") L 11/09/2017 - 21:43:45: [deathrun_banner.smx] reason: Disconnect if(GetClientTeam(client == CS_TEAM_T) && StrContains(reason, "disconnect", false) != -1) { SourceBans_BanPlayer(0, client, 30, "Ucieczka przed TT"); LogError("AfterIf"); } } Tu ^ coś nie działa, tyle wiem.. Tylko dlaczego?
  2. Brainless.......... zaraz to ogarnę xD L 11/09/2017 - 21:32:09: [deathrun_banner.smx] reason: Disconnect
  3. #include <sourcemod> #include <sdkhooks> #include <sourcebans> #include <sourcecomms> #include <sdktools> #include <cstrike> #define CS_TEAM_T 2 public Plugin:myinfo = { name = "deathrun_banner", author = "Surprised", description = "deathrun banner", version = "0.1", url = "<- URL ->" } public OnPluginStart() { HookEvent("player_disconnect", Event_Disconnected, EventHookMode_Post); } public Action Event_Disconnected(Event event, const char[] name, bool dontBroadcast) { char reason[128] LogError("reason: %s", reason); GetEventString(event, "reason", reason, sizeof(reason)); int userid = GetEventInt(event, "userid"); int client = GetClientOfUserId(userid) if(GetClientTeam(client == CS_TEAM_T) && StrContains(reason, "disconnect", false) != -1) { SourceBans_BanPlayer(0, client, 30, "Ucieczka przed TT"); } }
  4. L 11/09/2017 - 21:05:19: [deathrun_banner.smx] reason: To samo..
  5. Debug: Nic się nie wyświetla, czy naprawdę coś zepsułem? (z print'em) PrintToConsole(0, "Debug: %s", reason);
  6. #include <sourcemod> #include <sdkhooks> #include <sourcebans> #include <sourcecomms> #include <sdktools> #include <cstrike> #define CS_TEAM_T 2 public Plugin:myinfo = { name = "deathrun_banner", author = "Surprised", description = "deathrun banner", version = "0.1", url = "<- URL ->" } public OnPluginStart() { HookEvent("player_disconnect", Event_Disconnected, EventHookMode_Post); } public Action Event_Disconnected(Event event, const char[] name, bool dontBroadcast) { char reason[128] //save2 GetEventString(event, "reason", reason, sizeof(reason)); int userid = GetEventInt(event, "userid"); int client = GetClientOfUserId(userid) if(GetClientTeam(client == CS_TEAM_T) && (StrContains(reason, "disconnect", false))) { SourceBans_BanPlayer(0, client, 30, "Ucieczka przed TT"); } } Teraz w ogóle nie działa...
  7. Tak? Dalej nie działa.. char reason[65]; char disconnect[65] = "disconnect" if((GetClientTeam(client) == CS_TEAM_T) && (StrContains(reason, disconnect)) { SourceBans_BanPlayer(0, client, 30, "Ucieczka przed TT"); }
  8. Pobawiłem się trochę, dalej nie działa ;/ char reason[10]; GetEventString(event, "reason", reason, sizeof(reason)); if(reason = "disconnect") { SourceBans_BanPlayer(0, client, 30, "Ucieczka przed TT"); }
  9. Pobrane (chyba) GetEventString(event, "reason"); A jak sprawdzić czy jest to "disconnect"? Pewnie się załamałeś... [*] xD
  10. Witam, Ma ktoś sprawdzony plugin na "color chat"? (taki jak np. na pompateam'ie) Z góry dzięki, pozdrawiam!
  11. Witam, ostatnio z "waszą" pomocą zrobiłem plugin, który banuje za "ucieczke z TT" za pomocą "HookEvent("player_disconnected")" Problem polega na tym że przy kick'owaniu i tak dodaje bana na 30 min SourceBans_BanPlayer(0, client, 30, "Ucieczka przed TT"); Ma ktoś pomysł jak to ominąć? W sourcepawn'a "bawię się" od niedawna, więc fajnie było by zobaczyć kod! Z góry dzięki, pozdrawiam!
  12. Działa!! Dzięki za poświęcony mi czas!! Ja już idę.. Pozdrawiam i "do zobaczenia"!! xD
  13. error'ów nie ma, ale sam "ban" nie działa logi: L 11/08/2017 - 22:38:25: Info (map "surf_mai_remix_ctgo") (file "errors_20171108.log") L 11/08/2017 - 22:38:25: [SM] Exception reported: Client index -1 is invalid L 11/08/2017 - 22:38:25: [SM] Blaming: sbpp_main.smx L 11/08/2017 - 22:38:25: [SM] Call stack trace: L 11/08/2017 - 22:38:25: [SM] [0] IsClientInGame L 11/08/2017 - 22:38:25: [SM] [1] Line 2218, sbpp_main.sp::Native_SBBanPlayer L 11/08/2017 - 22:38:25: [SM] [3] SourceBans_BanPlayer L 11/08/2017 - 22:38:25: [SM] [4] Line 33, E:\sourcemod-1.8.0-git6027-windows\addons\sourcemod\scripting\deathrun_banner.sp::Event_Disconnected
×
×
  • Create New...