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

ogbudowa

Użytkownik
  • Postów

    26
  • Dołączył

  • Ostatnia wizyta

  • Wygrane w rankingu

    1

Ostatnia wygrana ogbudowa w dniu 1 Lutego 2021

Użytkownicy przyznają ogbudowa punkty reputacji!

Ostatnie wizyty

702 wyświetleń profilu

Osiągnięcia ogbudowa

Nowicjusz

Nowicjusz (1/14)

  • Week One Done
  • One Month Later
  • One Year In

Najnowsze odznaki

6

Reputacja

  1. Wyświetla się ostatnia bo nadpisujesz zmienną chat Z której korzystasz tutaj
  2. Plugin "na rtv" domyślnie znajduje się w katalogu plugins/disabled pod nazwą "rockthevote.smx", wystarczy że przeniesiesz go do katalogu plugins.
  3. native float GoMod_AddEuro(int client, float amount); zgaduje że jak pod parametrem amount jest wartosc ujemna to odejmie graczowi euro
  4. #include <sourcemod> #include <cstrike> #include <sdktools> #define freeze_time 3.0 #define freeze_sound "physics/glass/glass_impact_bullet4.wav" float g_freeze_time[MAXPLAYERS + 1] = {0.0, ...} public OnPluginStart() { HookEvent("player_hurt", player_hurt); } public OnMapStart() { PrecacheSound(freeze_sound, true); } public Action player_hurt(Event e, const char[] n, bool b) { char weapon[256]; GetEventString(e, "weapon", weapon, sizeof(weapon)); if (strlen(weapon) > 0) { int vic = GetClientOfUserId(GetEventInt(e, "userid")); float vec[3]; GetClientAbsOrigin(vic, vec); EmitAmbientSound(freeze_sound, vec, vic, SNDLEVEL_RAIDSIREN); g_freeze_time[vic] = freeze_time; freeze_player(vic); CreateTimer(1.0, freeze_timer, vic, TIMER_REPEAT); } return Plugin_Continue; } public Action freeze_player(int client) { SetEntityMoveType(client, MOVETYPE_NONE); SetEntityRenderColor(client, 0, 128, 255, 192); } public Action unfreeze_player(int client) { SetEntityMoveType(client, MOVETYPE_WALK); SetEntityRenderColor(client, 255, 255, 255, 255); } public Action freeze_timer(Handle timer, int vic) { if (g_freeze_time[vic] == 0.0) { unfreeze_player(vic); KillTimer(timer); return Plugin_Stop; } g_freeze_time[vic]--; return Plugin_Continue; } powinno działać
  5. #include <sourcemod> #include <cstrike> #define tt_text "Terroryści" #define ct_text "Antyterroryści" #define refresh_time 0.5 public OnMapStart() { CreateTimer(refresh_time, refresh_hud, _, TIMER_REPEAT); } public Action refresh_hud(Handle timer) { for (int i = 1; i <= MaxClients; i++) { if (is_valid_client(i)) draw_text(i); } } int draw_text(int client) { if (!is_valid_client(client)) return 0; int count_tt = get_all_players(CS_TEAM_T); int count_ct = get_all_players(CS_TEAM_CT); SetHudTextParams(0.01, 0.02, refresh_time, 255, 255, 255, 0); ShowHudText(client, -1, "%s: %d", tt_text, count_tt); SetHudTextParams(0.01, 0.06, refresh_time, 255, 255, 255, 0); ShowHudText(client, -1, "%s: %d", ct_text, count_ct); return 0; } int get_all_players(int team) { int counter = 0; for (int i = 1; i <= MaxClients; i++) { if (is_valid_client(i) && IsPlayerAlive(i) && GetClientTeam(i) == team) counter++; } return counter; } stock bool is_valid_client(int client) { return (client >= 1 && client <= MaxClients && IsClientConnected(client) && IsClientInGame(client) && !IsClientSourceTV(client)); }
  6. raczej powinno działać losowyvip.sp losowyvip.smx dropbomb.sp dropbomb.smx
  7. #include <sourcemod> #include <sdktools> bool g_Msg[MAXPLAYERS + 1] = {true, ...}; char Toggler[256]; public OnPluginStart() { RegConsoleCmd("sm_menubroni", bronie); } public Action bronie(int client, int args) { Menu gMenu = new Menu(gMenu_Handler); gMenu.SetTitle("Wybierz broń!"); gMenu.AddItem("1", "BROŃ - AK-47"); gMenu.AddItem("2", "BROŃ - NEGEV"); Format(Toggler, sizeof(Toggler), "%s Wiadomości przy wybieraniu broni", (g_Msg[client] ? "[ON]" : "[OFF]")); gMenu.AddItem("3", Toggler); gMenu.Display(client, MENU_TIME_FOREVER); return Plugin_Handled; } int gMenu_Handler(Menu menu, MenuAction action, int client, int pos) { switch(action) { case MenuAction_Select: { switch(pos) { case 0: { GivePlayerItem(client, "weapon_ak47"); if (g_Msg[client]) PrintToChat(client, " \x0B [BRONIE] \x04 ★\x02Twoja broń to \x01 AK-47\x04★"); // wybierajac opcje nr3 chcialbym aby ta wiadomosc nie wyswietlala sie, lub jesli juz byly wylaczona to zeby sie wyswietlala } case 1: { GivePlayerItem(client, "weapon_negev"); if (g_Msg[client]) PrintToChat(client, " \x0B [BRONIE] \x04 ★\x02Twoja broń to \x01 NEGEV\x04★"); // wybierajac opcje nr3 chcialbym aby ta wiadomosc nie wyswietlala sie, lub jesli juz byly wylaczona to zeby sie wyswietlala } case 2: { PrintToChat(client, "\x03 Wiadomości zostały: %s.", (g_Msg[client] ? "wyłączone" : "włączone")); g_Msg[client] = !g_Msg[client]; FakeClientCommandEx(client, "sm_menubroni"); } } } case MenuAction_End: delete menu; } return 0; }
  8. #include <sourcemod> #include <sdktools> #define TAG " \x0F[STEAMID]\x01" #define FORMAT "%s %s - %s" public OnPluginStart() { RegConsoleCmd("sm_steamid", GetSteamID); LoadTranslations("common.phrases"); } public Action GetSteamID(int client, int args) { char arg[MAX_TARGET_LENGTH], ClientName[MAX_NAME_LENGTH], ClientSteamId[32]; GetCmdArg(1, arg, sizeof(arg)); int target = FindTarget(client, arg); if (target == -1) { return Plugin_Handled; } GetClientName(target, ClientName, sizeof(ClientName)); GetClientAuthId(target, AuthId_Steam2, ClientSteamId, sizeof(ClientSteamId)); PrintToChat(client, FORMAT, TAG, ClientName, ClientSteamId); return Plugin_Handled; }
  9. Nie wiem czy o to ci chodziło, tutaj możesz adminów dodawać do pliku .ini admins_list.ini admins_list.sp
  10. PrintHintText("Za dużo jest terrorystów!"); zmien na PrintHintText(client, "Za dużo jest terrorystów!");
  11. #include <sourcemod> #include <cstrike> public OnPluginStart() { AddCommandListener(CommandChangeTeam, "jointeam"); AddCommandListener(CommandChangeTeam, "changeteam"); } public Action CommandChangeTeam(int client, const char[] command, int argc) { char arg[32]; GetCmdArg(1, arg, sizeof(arg)); if (StringToInt(arg) == CS_TEAM_T) { int PlayersCT = GetClientsOfTeam(CS_TEAM_CT); int PlayersTT = GetClientsOfTeam(CS_TEAM_T); if ((PlayersTT / PlayersCT) > 0.25) { PrintHintText("Za dużo jest terrorystów!"); return Plugin_Handled; } } return Plugin_Continue; } stock bool IsValidClient(int client) { return (client >= 1 && client <= MaxClients && IsClientConnected(client) && IsClientInGame(client) && !IsClientSourceTV(client)); } stock int GetClientsOfTeam(int team) { int b = 0; for (int i = 1; i <= MaxClients; i++) { if(IsValidClient(i) && IsPlayerAlive(i) && GetClientTeam(i) == team) b++; } return b; } powinno zadziałać lecz nie testowałem bo nie mam jak
×
×
  • Dodaj nową pozycję...