WhiteBlue Opublikowano Wrzesień 13, 2016 o 17:32 Udostępnij Opublikowano Wrzesień 13, 2016 o 17:32 Witam! Ostatnio wpadłem na pomysł aby przenieść kolejkę z CS 1.6 autorstwa DarkGL (https://amxx.pl/topic/72351-kolejka-do-tt-na-deathrun/) do CS:GO następnie połączyłem ją z timerem DeathRun shavit. Mam cały czas z nią problem bo jak wgrywam na serwer nikt nie może na niego wejść i pojawia się błąd "Connection rejected". Co jest nieprawidłowego w tym kodzie? /* Plugin Template generated by Pawn Studio */ #include <sourcemod> #include <cstrike> #include <sdktools> #include <sdkhooks> #include <shavit> #include <dynamic> #define dmg(%1,%2) (GetArraySize(arKolejka) > 0 && GetArrayCell(arKolejka, 0) == %2 && GetClientTeam(%1) == 2) #define dmg2(%1,%2) (GetArraySize(arKolejka) > 0 && GetArrayCell(arKolejka, 0) == %1 && GetClientTeam(%2) == 2) Handle: arKolejka; public Plugin:myinfo = { name = "[DR] Kolejka do TT", author = "DarkGL & .WhiteBlue", description = "Ten plugin dodaje kolejkę do zabicia Terrorysty.", version = "1.0", url = "http://amxx.pl/ | http://ogrpg.pl/" } public OnPluginStart() { // inicjalizacja tabely arKolejka = CreateArray(1, 64); // rozpoczęcie rundy HookEvent("round_start", Event_RoundStart); // zadawane obrażenia //HookEvent("player_hurt", Event_PlayerHurt); // odrodzenie gracza HookEvent("player_spawned", Event_PlayerSpawned); // śmierć gracza HookEvent("player_death", Event_PlayerDeath); } public Action:Event_PlayerDeath(Handle:event, const String:name[], bool:dontBroadcast) { new victim = GetEventInt(event, "userid"); new client = GetClientOfUserId(victim); new iRet = iFind(victim); if (iRet != -1) { RemoveFromArray(arKolejka, iRet); if (iRet == 0 && GetArraySize(arKolejka) > 0 && GetArrayCell(arKolejka, 0) == victim) { RemoveFromArray(arKolejka, 0); if (GetArraySize(arKolejka) > 0) SetEntityRenderColor(client, 255, 255, 255, 255); } } return Plugin_Handled; } public Action:Event_PlayerSpawned(Handle:event, const String:name[], bool:dontBroadcast) { new victim = GetEventInt(event, "userid"); new client = GetClientOfUserId(victim); if (!IsPlayerAlive(client)) return; SetEntityRenderColor(client, 255, 255, 255, 255); } public Action:Event_RoundStart(Handle:event, const String:name[], bool:dontBroadcast) { ClearArray(arKolejka); } public Shavit_OnFinish(client) { if (IsPlayerAlive(client) && GetClientTeam(client) == 3) { new iRet = iFind(client); if (iRet == -1) PushArrayCell(arKolejka, client); if (IsPlayerAlive(GetArrayCell(arKolejka, 0))) SetEntityRenderColor(GetArrayCell(arKolejka, 0), 255, 255, 255, 155); else RemoveFromArray(arKolejka, 0); } } public bool:OnClientConnect(client, String:rejectmsg[], maxlen) { if (!IsFakeClient(client)) arClear(client); } public OnClientDisconnect(client) { arClear(client); } public arClear(client) { new iRet = iFind(client); if(iRet == -1) return; RemoveFromArray(arKolejka, iRet); } public iFind(client) { for (new i = 0; i < GetArraySize(arKolejka); i++) { if (GetArrayCell(arKolejka, i) == client) return i; } return -1; } Za pomoc dziękuję, pozdrawiam. Odnośnik do komentarza Udostępnij na innych stronach Więcej opcji udostępniania...
n.o.x Opublikowano Listopad 21, 2016 o 21:21 Udostępnij Opublikowano Listopad 21, 2016 o 21:21 (edytowane) Zaloguj się lub zarejestruj aby zobaczyć zawartość. Edytowane Listopad 21, 2016 o 21:23 przez n.o.x Odnośnik do komentarza Udostępnij na innych stronach Więcej opcji udostępniania...
Rekomendowane odpowiedzi
Jeśli chcesz dodać odpowiedź, zaloguj się lub zarejestruj nowe konto
Jedynie zarejestrowani użytkownicy mogą komentować zawartość tej strony.
Zarejestruj nowe konto
Załóż nowe konto. To bardzo proste!
Zarejestruj sięZaloguj się
Posiadasz już konto? Zaloguj się poniżej.
Zaloguj się