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

Arcanos

Użytkownik
  • Postów

    42
  • Dołączył

  • Ostatnia wizyta

  • Wygrane w rankingu

    1

Ostatnia wygrana Arcanos w dniu 9 Października 2017

Użytkownicy przyznają Arcanos punkty reputacji!

Ostatnie wizyty

Blok z ostatnimi odwiedzającymi dany profil jest wyłączony i nie jest wyświetlany użytkownikom.

Osiągnięcia Arcanos

Nowicjusz

Nowicjusz (1/14)

2

Reputacja

  1. Bardzo Dziękuję, działa idealnie. Można zamknąć.
  2. Arcanos

    Losowy VIP by Hanys

    Bo pewnie masz ustawioną inną flagę do vipa. Powyżej losowy vip jest pod flagę o, pewnie masz pod inną, dlatego musisz sobie tylko zmienić flagę i powinno działać. Tak jest skonfigurowany daje flagę o i pomija w losowaniu wszystkich, właśnie z flagą o.
  3. Arcanos

    Losowy VIP by Hanys

    No daje przecież :P AddUserFlags(winner, Admin_Custom1);
  4. Arcanos

    Losowy VIP by Hanys

    #include <sourcemod> public Plugin:myinfo = { name = "LosowyVip", author = "Hanys", description = "Plugin losuje losowa osobe ktora otrzyma flage", version = "1.0", url = "http://hanys.dispark.pl" } new Handle:Random_round; new Handle:Random_player; new Rounds = 0; public OnPluginStart() { CreateConVar("sm_randomvip", "1.0", "Losowy VIP", FCVAR_PLUGIN|FCVAR_SPONLY|FCVAR_REPLICATED|FCVAR_NOTIFY|FCVAR_DONTRECORD); Random_round = CreateConVar("random_round", "0", "W ktorej rundzie ma losowac losowego vip'a (Uwaga: Rozgrzewka liczona jest jako 1 runda!) 0:Losowy vip wylaczony", FCVAR_NOTIFY); Random_player = CreateConVar("random_player", "0", "Ile osob wymaganych jest do wylosowania losowego vip'a", FCVAR_NOTIFY); AutoExecConfig(true, "sm_vip_random"); HookEvent("round_start", Event_RoundStart); HookEvent("cs_win_panel_match", RestartRound); } public Event_RoundStart(Handle:event, const String:name[], bool:dontBroadcast) { new winner = GetRandomPlayer(3); new g_random_round = GetConVarInt(Random_round); Rounds = Rounds + 1; if (Rounds == g_random_round) { if (winner == -1) { PrintToChatAll("\x04[\x04VIP\x01] \x06Na serwerze znajduje sie za malo graczy do wylosowania losowego VIP'a\x01"); } AddUserFlags(winner, Admin_Custom1); PrintToChatAll("[\x04VIP\x01] \x06Trwa losowanie VIP'a...\x01"); PrintToChatAll("[\x04VIP\x01] \x06-----\x01"); PrintToChatAll("[\x04VIP\x01] \x06-----\x01"); PrintToChatAll("[\x04VIP\x01] \x06-----\x01"); PrintToChatAll("[\x04VIP\x01] \x06Losowym VIP'em zostaje \x02%N\x01\x06! Gratulujemy!\x01", winner); } } public Action:RestartRound(Handle:event, const String:name[], bool:dontBroadcast) { Rounds = 0; } stock GetRandomPlayer(team) { new g_random_player = GetConVarInt(Random_player); new clients[MaxClients + 1], clientCount; for (new i = 1; i <= MaxClients; i++) if (IsClientInGame(i) && !IsFakeClient(i) && !GetAdminFlag(GetUserAdmin(i), Admin_Custom1)) clients[clientCount++] = i; if (clientCount <= g_random_player) return -1; return clients[GetRandomInt(0, clientCount - 1)]; } Edytowany pod Flage "o".
  5. Arcanos

    Pplugin xBenio

    Dzieki :) Jest jeden problem w rundach pistoletowych vip może kupić hełm Jeśli można prosić o poprawienie kodu i dodanie warunku, aby blokowało kupno hełmu dla vipa w rundach pistoletowych, tak jak u Autora pluginu xBenio. A i jeszcze, po zmianie drużyn vip dostaje hełm i kevlar #include <sourcemod> #include <cstrike> #include <sdktools> #include <scp> #pragma semicolon 1 #pragma newdecls required public Plugin myinfo = { name = "[CS:GO] VIP", author = "xBonio & Avgariat", description = "Automatycznie wygenerowany VIP na ArenaSkilla.pl", version = "1.0", url = "http://arenaskilla.pl" }; Handle WelcomeHUD; char tag[64] = "[VIP]"; public void OnPluginStart() { HookEvent("bomb_planted", EventBombPlanted); HookEvent("bomb_defused", EventBombDefused); HookEvent("player_spawn", PlayerSpawn); HookEvent("player_death", PlayerDeath); WelcomeHUD = CreateHudSynchronizer(); } int offsetHe; int offsetFlash; int offsetSmoke; int offsetHealth; public void OnMapStart() { int entindex; entindex = CreateEntityByName("weapon_hegrenade"); DispatchSpawn(entindex); offsetHe = GetEntProp(entindex, Prop_Send, "m_iPrimaryAmmoType"); AcceptEntityInput(entindex, "Kill"); entindex = CreateEntityByName("weapon_flashbang"); DispatchSpawn(entindex); offsetFlash = GetEntProp(entindex, Prop_Send, "m_iPrimaryAmmoType"); AcceptEntityInput(entindex, "Kill"); entindex = CreateEntityByName("weapon_smokegrenade"); DispatchSpawn(entindex); offsetSmoke = GetEntProp(entindex, Prop_Send, "m_iPrimaryAmmoType"); AcceptEntityInput(entindex, "Kill"); entindex = CreateEntityByName("weapon_healthshot"); DispatchSpawn(entindex); offsetHealth = GetEntProp(entindex, Prop_Send, "m_iPrimaryAmmoType"); AcceptEntityInput(entindex, "Kill"); } public Action PlayerSpawn(Event event, const char[] name, bool dontBroadcast) { int client = GetClientOfUserId(GetEventInt(event, "userid")); if(!IsPlayerVIP(client)) return; SetEntProp(client, Prop_Send, "m_ArmorValue", 100); if(GetTeamScore(CS_TEAM_CT) + GetTeamScore(CS_TEAM_T) != 0) SetEntProp(client, Prop_Send, "m_bHasHelmet", 1); SetEntityHealth(client, 100); CS_SetClientClanTag(client, tag); if(GetClientTeam(client) == CS_TEAM_CT) if(GetEntProp(client, Prop_Send, "m_bHasDefuser") == 0) GivePlayerItem(client, "item_defuser"); for(int x = 0; x < 1; x++) if(GetEntProp(client, Prop_Send, "m_iAmmo", _, offsetHe) < 1) GivePlayerItem(client, "weapon_hegrenade"); for(int x = 0; x < 1; x++) if(GetEntProp(client, Prop_Send, "m_iAmmo", _, offsetFlash) < 1) GivePlayerItem(client, "weapon_flashbang"); for(int x = 0; x < 1; x++) if(GetEntProp(client, Prop_Send, "m_iAmmo", _, offsetSmoke) < 1) GivePlayerItem(client, "weapon_smokegrenade"); for(int x = 0; x < 1; x++) if(GetEntProp(client, Prop_Send, "m_iAmmo", _, offsetHealth) < 1) GivePlayerItem(client, "weapon_healthshot"); } public Action PlayerDeath(Handle event, const char[] name, bool dontBroadcast) { int attacker = GetClientOfUserId(GetEventInt(event, "attacker")); if(!IsValidPlayer(attacker) || !IsPlayerVIP(attacker)) return; int health = GetClientHealth(attacker); SetEntityHealth(attacker, health+5); int money = GetEntProp(attacker, Prop_Send, "m_iAccount"); SetEntProp(attacker, Prop_Send, "m_iAccount", money+500); bool headshot = GetEventBool(event, "headshot", false); if(headshot) { health = GetClientHealth(attacker); SetEntityHealth(attacker, health+10); money = GetEntProp(attacker, Prop_Send, "m_iAccount"); SetEntProp(attacker, Prop_Send, "m_iAccount", money+800); } if(GetClientHealth(attacker) > 100) SetEntityHealth(attacker, 100); } public Action EventBombPlanted(Event event, const char[] name, bool dontBroadcast) { int client = GetClientOfUserId(GetEventInt(event, "userid")); int money = GetEntProp(client, Prop_Send, "m_iAccount"); if(IsPlayerVIP(client)) SetEntProp(client, Prop_Send, "m_iAccount", money+1000); } public Action EventBombDefused(Event event, const char[] name, bool dontBroadcast) { int client = GetClientOfUserId(GetEventInt(event, "userid")); int money = GetEntProp(client, Prop_Send, "m_iAccount"); if(IsPlayerVIP(client)) SetEntProp(client, Prop_Send, "m_iAccount", money+1000); } public Action OnPlayerRunCmd(int client, int &buttons, int &impulse, float[3] vel, float[3] angles, int &weapon) { if(!IsValidPlayer(client) || !IsPlayerAlive(client)) return; if(!IsPlayerVIP(client)) return; static int g_fLastButtons[MAXPLAYERS+1], g_fLastFlags[MAXPLAYERS+1], g_iJumps[MAXPLAYERS+1], fCurFlags, fCurButtons; fCurFlags = GetEntityFlags(client); fCurButtons = GetClientButtons(client); if (g_fLastFlags[client] & FL_ONGROUND && !(fCurFlags & FL_ONGROUND) && !(g_fLastButtons[client] & IN_JUMP) && fCurButtons & IN_JUMP) g_iJumps[client]++; else if(fCurFlags & FL_ONGROUND) g_iJumps[client] = 0; else if(!(g_fLastButtons[client] & IN_JUMP) && fCurButtons & IN_JUMP && g_iJumps[client] <= 1) { g_iJumps[client]++; float vVel[3]; GetEntPropVector(client, Prop_Data, "m_vecVelocity", vVel); vVel[2] = 250.0; TeleportEntity(client, NULL_VECTOR, NULL_VECTOR, vVel); } g_fLastFlags[client] = fCurFlags; g_fLastButtons[client] = fCurButtons; } public Action OnChatMessage(int &client, Handle recipients, char[] name, char[] message) { if(!IsPlayerVIP(client)) return Plugin_Continue; Format(name, MAXLENGTH_NAME, " \x06%s \x03%s\x01", tag, name); return Plugin_Changed; } public void OnClientPostAdminCheck(int client) { if(IsPlayerVIP(client)) { char text[100]; Format(text, sizeof(text), "%s %N \n", tag, client); Format(text, sizeof(text), "%s Wbija na serwer!", text); SetHudTextParams(-1.0, 0.125, 7.0, 45, 209, 0, 255, 0, 0.25, 1.5, 0.5); for(int i = 1; i <= MaxClients; i++) if(IsValidPlayer(i)) ShowSyncHudText(i, WelcomeHUD, text); PrintToChatAll(" \x06%s \x03%N\x01 Wbija na serwer!\x01", tag, client); } } stock bool IsValidPlayer(int client) { if(client >= 1 && client <= MaxClients && IsClientInGame(client) && !IsFakeClient(client) && !IsClientSourceTV(client)) return true; return false; } stock bool IsPlayerVIP(int client) { if(GetUserFlagBits(client) & ADMFLAG_CUSTOM1) return true; return false; } Bardzo proszę o pomoc i z góry dziękuje :) vip_88.sp
  6. Arcanos

    Pplugin xBenio

    Znalazłem ciekawego vipa napisanego przez xBonio ale chciałbym was prosić o przerobienie go, jeśli ktoś ma czas i chęci. Bardzo bardzo proszę, pomóżcie :) Vip posiada: Tag [VIP] w Tabeli Więcej HP na Darmowa kamizelka/Hełm Darmowe kombinerki dla CT Darmowe granaty: Smoke/Flash/HE/Molotov/Incendiary Dodatkowe pieniądze przy starcie rundy Dodatkowe HP za fraga/HeadShot Grawitacja Szybkość biegu Usuwanie granatów Ustawienie maksymalnej ilości HP posiadanej przez VIP'a Uleczenia pod 'E' (apteczki) Blokada hełmu na rundach pistoletowych A co chciałbym zmienić: Dodać menu broni w 3 rundzie(NIe koniecznie) Dodać normalna apteczkę(medishot) Usunąć Uleczenia pod 'E' (apteczki) Flagę o Dodać dodatkowy skos(doublejump) Podam kod i sp... #include <sourcemod> #include <sdktools> #include <cstrike> #pragma semicolon 1 #pragma newdecls required Handle HP, Gravity, Speedy, Smokegrenade, Flashbang, Hegrenade, Molotov, Remove_grenade, Armorvalue, Bhashelmet, HelmetPistolRound, Defuser, Moneystart, Headshot_hp, Kill_hp, Tagtable, MaxHP, Uleczenia, Uleczenie, Leczenie_HP, Reklama, TagTable_Timers, MoneyOnStart_Timers, HelmetPistolRound_Timers; bool oldbuttons[65]; int g_iaGrenadeOffsets[] = {15, 17, 16, 14, 18, 17}, uleczenie[MAXPLAYERS+1], Rundy; public void OnPluginStart() { HP = CreateConVar("vip_hp_start", "100", "Ilosc HP na start rundy.", FCVAR_NOTIFY); Gravity = CreateConVar("vip_gravity", "1.0", "Grawitacja (1.0 - standardowa)."); Speedy = CreateConVar("vip_speed", "1.0", "Szybkosc biegania (1.0 - standardowo)."); Smokegrenade = CreateConVar("vip_grenade_smokegrenade", "0", "Smoke na start rundy.", FCVAR_NONE, true, 0.0, true, 1.0); Flashbang = CreateConVar("vip_grenade_flashbang", "0", "Flash na start rundy (0-2).)", FCVAR_NOTIFY, true, 0.0, true, 2.0); Hegrenade = CreateConVar("vip_grenade_hegrenade", "0", "Granat na start rundy.", FCVAR_NONE, true, 0.0, true, 1.0); Molotov = CreateConVar("vip_grenade_molotov", "0", "Molotov dla tt lub Incendiary dla ct na start rundy.",FCVAR_NONE, true, 0.0, true, 1.0); Remove_grenade = CreateConVar("vip_grenade_remove", "0", "Na początku rundy usuwa wszystkie granaty.", FCVAR_NONE, true, 0.0, true, 1.0); Armorvalue = CreateConVar("vip_armorvalue", "0", "Kamizelka na start rundy.", FCVAR_NONE, true, 0.0, true, 1.0); Bhashelmet = CreateConVar("vip_bhashelmet", "0", "Kask na start rundy.", FCVAR_NONE, true, 0.0, true, 1.0); HelmetPistolRound = CreateConVar("vip_helmet", "0", "Kask w rundach pistoletowych. '1-wyłączony w pistolkach, 0-włączony w pistolkach'", FCVAR_NONE, true, 0.0, true, 1.0); Defuser = CreateConVar("vip_defuser", "0", "Zestaw do rozbrajania dla CT na start rundy.", FCVAR_NONE, true, 0.0, true, 1.0); Moneystart = CreateConVar("vip_money_start", "0", "Ilosc $ na start rundy.", FCVAR_NOTIFY); Headshot_hp = CreateConVar("vip_headshot_hp", "0", "Ilosc HP za Headshot.", FCVAR_NOTIFY); Kill_hp = CreateConVar("vip_kill_hp", "0", "Ilosc HP za frag.a", FCVAR_NOTIFY); Tagtable = CreateConVar("vip_tag_table", "0", "Tag VIP w tabeli.", FCVAR_NONE, true, 0.0, true, 1.0); MaxHP = CreateConVar("vip_hp_max", "110", "Max hp VIP'a.", FCVAR_NOTIFY); Uleczenia = CreateConVar("vip_uleczenia", "0", "Uleczenia client'a pod 'E'", FCVAR_NOTIFY, true, 0.0, true, 1.0); Uleczenie = CreateConVar("vip_ilosc_uleczen", "2", "Ilość uleczeń VIP'a.", FCVAR_NOTIFY); Leczenie_HP = CreateConVar("vip_hp_uleczenie", "10", "Ilość HP po ile ma leczyć.", FCVAR_NOTIFY); Reklama = CreateConVar("vip_reklama", "1", "Czy ma być włączona reklama kto zrobił VIP'a co 2min? Za włączoną dziekuje :)", FCVAR_NOTIFY, true, 0.0, true, 1.0); AutoExecConfig(true, "xVIP"); HookEvent("player_spawn", Spawn); HookEvent("player_death", PlayerDeath); HookEvent("round_start", RoundStart); HookEvent("cs_win_panel_match", RestartRound); CreateTimer(120.0, ReklamaAction, _, TIMER_REPEAT); } public Action RoundStart(Event event, const char[] name, bool dontBroadcast) { Rundy = Rundy + 1; TagTable_Timers = CreateTimer(1.5, TagTables, _, TIMER_FLAG_NO_MAPCHANGE); MoneyOnStart_Timers = CreateTimer(1.0, MoneyOnSpawn, _, TIMER_FLAG_NO_MAPCHANGE); HelmetPistolRound_Timers = CreateTimer(0.5, HelmetPistolRounds, _, TIMER_FLAG_NO_MAPCHANGE); } public Action RestartRound(Event event, const char[] name, bool dontBroadcast) { Rundy = 0; } public Action Spawn(Event event, const char[] name, bool dontBroadcast) { int client = GetClientOfUserId(GetEventInt(event, "userid")), team = GetClientTeam(client), g_HP = GetConVarInt(HP), g_Flashbang = GetConVarInt(Flashbang), i_uleczen = GetConVarInt(Uleczenie); if(client > 0 && IsPlayerAlive(client) && IsPlayerGenericAdmin(client)) { SetEntityHealth(client, g_HP); SetEntityGravity(client, GetConVarFloat(Gravity)); SetEntPropFloat(client, Prop_Send, "m_flLaggedMovementValue", GetConVarFloat(Speedy)); if(GetConVarBool(Remove_grenade)) StripNades(client); if(GetConVarBool(Smokegrenade)) GivePlayerItem(client, "weapon_smokegrenade"); if(GetConVarBool(Hegrenade)) GivePlayerItem(client, "weapon_hegrenade"); if(GetConVarBool(Molotov) && team == CS_TEAM_T) GivePlayerItem(client, "weapon_molotov"); if(GetConVarBool(Molotov) && team == CS_TEAM_CT) GivePlayerItem(client, "weapon_incgrenade"); if(GetConVarBool(Armorvalue)) SetEntProp(client, Prop_Send, "m_ArmorValue", 100); if(GetConVarBool(Flashbang)) { for (int i = 1; i <= g_Flashbang; i++) GivePlayerItem(client, "weapon_flashbang"); } if(team == CS_TEAM_CT) { if(GetConVarBool(Defuser) && GetEntProp(client, Prop_Send, "m_bHasDefuser") == 0) GivePlayerItem(client, "item_defuser"); //kombinerki } uleczenie[client] = i_uleczen; } } public Action PlayerDeath(Event event, const char[] name, bool dontBroadcast) { int attacker = GetClientOfUserId(GetEventInt(event, "attacker")), health = GetClientHealth(attacker), g_headshot_hp = GetConVarInt(Headshot_hp), g_kill_hp = GetConVarInt(Kill_hp), max_hp = GetConVarInt(MaxHP); bool headshot = GetEventBool(event, "headshot"); if (IsPlayerGenericAdmin(attacker)) { if(headshot) { if(health >= max_hp - g_headshot_hp) { SetEntityHealth(attacker, max_hp); } else { SetEntityHealth(attacker, health + g_headshot_hp); } } else { if(health >= max_hp - g_kill_hp) { SetEntityHealth(attacker, max_hp); } else { SetEntityHealth(attacker, health + g_kill_hp); } } } } public Action TagTables(Handle timer) { for(int client = 1; client <= MaxClients; client++) { if(IsValidClient(client, true) && IsPlayerGenericAdmin(client) && GetConVarInt(Tagtable) == 1) { CS_SetClientClanTag(client, "[VIP]"); KillTimer(TagTable_Timers); } } } public Action MoneyOnSpawn(Handle timer) { for(int client = 1; client <= MaxClients; client++) { if(IsValidClient(client, true) && IsPlayerGenericAdmin(client)) { int money = GetEntProp(client, Prop_Send, "m_iAccount"), g_moneystart = GetConVarInt(Moneystart); SetEntProp(client, Prop_Send, "m_iAccount", money + g_moneystart); KillTimer(MoneyOnStart_Timers); } } } public Action HelmetPistolRounds(Handle timer) { for(int client = 1; client <= MaxClients; client++) { if(IsValidClient(client, true) && IsPlayerGenericAdmin(client)) { if(GetConVarInt(HelmetPistolRound) == 1) { if(Rundy == 2 || Rundy == 17) { if(GetConVarBool(Bhashelmet)) SetEntProp(client, Prop_Send, "m_bHasHelmet", 0); } else { if(GetConVarBool(Bhashelmet)) SetEntProp(client, Prop_Send, "m_bHasHelmet", 1); } } else { if(GetConVarBool(Bhashelmet)) SetEntProp(client, Prop_Send, "m_bHasHelmet", 1); } KillTimer(HelmetPistolRound_Timers); } } } public Action OnPlayerRunCmd(int client, int &buttons, int &impulse, float[3] vel, float[3] angles, int &weapon) { int max_hp = GetConVarInt(MaxHP), plus_hp = GetConVarInt(Leczenie_HP), health = GetEntProp(client, Prop_Send, "m_iHealth"), plus_hp2 = max_hp - GetClientHealth(client); if(client > 0 && IsPlayerGenericAdmin(client) && IsValidClient(client, true) && GetConVarInt(Uleczenia) == 1) { if(!oldbuttons[client] && buttons & IN_USE) { if(uleczenie[client] >= 1) { if(GetConVarInt(HP) > 0) { if(GetClientHealth(client) == max_hp) { PrintToChat(client,"[\x06VIP\x01] Nie mozesz sie uleczyc bo masz \x06%d\x07HP\x01, liczba uleczen: \x06%d\x01!", health, uleczenie[client]); } else if(GetClientHealth(client) >= max_hp - plus_hp) { SetEntityHealth(client, max_hp); --uleczenie[client]; PrintToChat(client,"[\x06VIP\x01] Brawo, zostales uleczony o \x06%d\x07HP\x01, zostalo Ci \x06%d\x01 uleczenie!", plus_hp2, uleczenie[client]); } else { SetEntityHealth(client, health + plus_hp); --uleczenie[client]; PrintToChat(client,"[\x06VIP\x01] Brawo, zostales uleczony o \x06%d\x07HP\x01, zostalo Ci \x06%d\x01 uleczenie!", plus_hp, uleczenie[client]); } } } else { PrintToChat(client,"[\x06VIP\x01] Przykro mi, ale masz \x06%d\x01 uleczen!", uleczenie[client]); } oldbuttons[client] = true; } else if(oldbuttons[client] && !(buttons & IN_USE)) { oldbuttons[client] = false; } } return Plugin_Continue; } public Action CS_OnBuyCommand(int client, const char[] item) { if(GetConVarInt(HelmetPistolRound) == 1 && IsPlayerGenericAdmin(client)) { if(Rundy == 2 || Rundy == 17) { if(StrEqual(item,"assaultsuit")) { PrintToChat(client, "[\x06VIP\x01] Helm zostal zablokowany na rundach pistoletowych!"); return Plugin_Handled; } } } return Plugin_Continue; } public Action ReklamaAction(Handle timer) { if(GetConVarInt(Reklama) == 1) { PrintToChatAll("[\x06VIP\x01] Zostal stworzony przez \x04Hanys'a\x01, edytowany przez \x07xBonio\x01 [\x0BArenaSkilla.pl\x01]"); } } stock void StripNades(int client) { while(RemoveWeaponBySlot(client, 3)){} for(int i = 0; i < 6; i++) SetEntProp(client, Prop_Send, "m_iAmmo", 0, _, g_iaGrenadeOffsets); } stock bool RemoveWeaponBySlot(int client, int iSlot) { int iEntity = GetPlayerWeaponSlot(client, iSlot); if(IsValidEdict(iEntity)) { RemovePlayerItem(client, iEntity); AcceptEntityInput(iEntity, "Kill"); return true; } return false; } stock void CheckCloseHandle(Handle handle) { if (handle != INVALID_HANDLE) { CloseHandle(handle); handle = INVALID_HANDLE; } } stock bool IsPlayerGenericAdmin(int client) { if (!CheckCommandAccess(client, "sm_vip", 0, true) && !CheckCommandAccess(client, "arenaskilla", ADMFLAG_ROOT, true)) return false; { return true; } } stock bool IsValidClient(int client, bool alive = false) { if(client >= 1 && client <= MaxClients && IsClientConnected(client) && IsClientInGame(client) && (alive == false || IsPlayerAlive(client))) { return true; } return false; } public Plugin myinfo = { name = "xVIP", author = "xBonio", description = "Plugin z VIP'em (Autor Hanys, edycja xBonio)", version = "1.4.1", url = "http://arenaskilla.pl" }; Jeśli ktoś się zna, bardzo proszę o pomoc :) xVIP.sp
  7. Pierwszy sprawdzony Również działa. Bardzo dziękuje wszystkim za pomoc i checi... Mam jeszcze jedna prośbę związanym z vipem, bo już nie chce tworzyć nowego tematu i robić spam. Znalazłem ciekawego vipa napisanego przez xBonio ale chciałbym was prosić o przerobienie go, jeśli ktoś ma czas i chęci. Bardzo bardzo proszę, pomóżcie :) Vip posiada: Tag [VIP] w Tabeli Więcej HP na Darmowa kamizelka/Hełm Darmowe kombinerki dla CT Darmowe granaty: Smoke/Flash/HE/Molotov/Incendiary Dodatkowe pieniądze przy starcie rundy Dodatkowe HP za fraga/HeadShot Grawitacja Szybkość biegu Usuwanie granatów Ustawienie maksymalnej ilości HP posiadanej przez VIP'a Uleczenia pod 'E' (apteczki) Blokada hełmu na rundach pistoletowych A co chciałbym zmienić: Dodać menu broni w 3 rundzie, może jakiś warunek, aby przy zmianie drużyn/stron nie można było wybierać broni. Dodać normalna apteczkę(medishot) Usunąć Uleczenia pod 'E' (apteczki) Flagę o Dodać dodatkowy skos(doublejump) Podam kod i sp... #include <sourcemod> #include <sdktools> #include <cstrike> #pragma semicolon 1 #pragma newdecls required Handle HP, Gravity, Speedy, Smokegrenade, Flashbang, Hegrenade, Molotov, Remove_grenade, Armorvalue, Bhashelmet, HelmetPistolRound, Defuser, Moneystart, Headshot_hp, Kill_hp, Tagtable, MaxHP, Uleczenia, Uleczenie, Leczenie_HP, Reklama, TagTable_Timers, MoneyOnStart_Timers, HelmetPistolRound_Timers; bool oldbuttons[65]; int g_iaGrenadeOffsets[] = {15, 17, 16, 14, 18, 17}, uleczenie[MAXPLAYERS+1], Rundy; public void OnPluginStart() { HP = CreateConVar("vip_hp_start", "100", "Ilosc HP na start rundy.", FCVAR_NOTIFY); Gravity = CreateConVar("vip_gravity", "1.0", "Grawitacja (1.0 - standardowa)."); Speedy = CreateConVar("vip_speed", "1.0", "Szybkosc biegania (1.0 - standardowo)."); Smokegrenade = CreateConVar("vip_grenade_smokegrenade", "0", "Smoke na start rundy.", FCVAR_NONE, true, 0.0, true, 1.0); Flashbang = CreateConVar("vip_grenade_flashbang", "0", "Flash na start rundy (0-2).)", FCVAR_NOTIFY, true, 0.0, true, 2.0); Hegrenade = CreateConVar("vip_grenade_hegrenade", "0", "Granat na start rundy.", FCVAR_NONE, true, 0.0, true, 1.0); Molotov = CreateConVar("vip_grenade_molotov", "0", "Molotov dla tt lub Incendiary dla ct na start rundy.",FCVAR_NONE, true, 0.0, true, 1.0); Remove_grenade = CreateConVar("vip_grenade_remove", "0", "Na początku rundy usuwa wszystkie granaty.", FCVAR_NONE, true, 0.0, true, 1.0); Armorvalue = CreateConVar("vip_armorvalue", "0", "Kamizelka na start rundy.", FCVAR_NONE, true, 0.0, true, 1.0); Bhashelmet = CreateConVar("vip_bhashelmet", "0", "Kask na start rundy.", FCVAR_NONE, true, 0.0, true, 1.0); HelmetPistolRound = CreateConVar("vip_helmet", "0", "Kask w rundach pistoletowych. '1-wyłączony w pistolkach, 0-włączony w pistolkach'", FCVAR_NONE, true, 0.0, true, 1.0); Defuser = CreateConVar("vip_defuser", "0", "Zestaw do rozbrajania dla CT na start rundy.", FCVAR_NONE, true, 0.0, true, 1.0); Moneystart = CreateConVar("vip_money_start", "0", "Ilosc $ na start rundy.", FCVAR_NOTIFY); Headshot_hp = CreateConVar("vip_headshot_hp", "0", "Ilosc HP za Headshot.", FCVAR_NOTIFY); Kill_hp = CreateConVar("vip_kill_hp", "0", "Ilosc HP za frag.a", FCVAR_NOTIFY); Tagtable = CreateConVar("vip_tag_table", "0", "Tag VIP w tabeli.", FCVAR_NONE, true, 0.0, true, 1.0); MaxHP = CreateConVar("vip_hp_max", "110", "Max hp VIP'a.", FCVAR_NOTIFY); Uleczenia = CreateConVar("vip_uleczenia", "0", "Uleczenia client'a pod 'E'", FCVAR_NOTIFY, true, 0.0, true, 1.0); Uleczenie = CreateConVar("vip_ilosc_uleczen", "2", "Ilość uleczeń VIP'a.", FCVAR_NOTIFY); Leczenie_HP = CreateConVar("vip_hp_uleczenie", "10", "Ilość HP po ile ma leczyć.", FCVAR_NOTIFY); Reklama = CreateConVar("vip_reklama", "1", "Czy ma być włączona reklama kto zrobił VIP'a co 2min? Za włączoną dziekuje :)", FCVAR_NOTIFY, true, 0.0, true, 1.0); AutoExecConfig(true, "xVIP"); HookEvent("player_spawn", Spawn); HookEvent("player_death", PlayerDeath); HookEvent("round_start", RoundStart); HookEvent("cs_win_panel_match", RestartRound); CreateTimer(120.0, ReklamaAction, _, TIMER_REPEAT); } public Action RoundStart(Event event, const char[] name, bool dontBroadcast) { Rundy = Rundy + 1; TagTable_Timers = CreateTimer(1.5, TagTables, _, TIMER_FLAG_NO_MAPCHANGE); MoneyOnStart_Timers = CreateTimer(1.0, MoneyOnSpawn, _, TIMER_FLAG_NO_MAPCHANGE); HelmetPistolRound_Timers = CreateTimer(0.5, HelmetPistolRounds, _, TIMER_FLAG_NO_MAPCHANGE); } public Action RestartRound(Event event, const char[] name, bool dontBroadcast) { Rundy = 0; } public Action Spawn(Event event, const char[] name, bool dontBroadcast) { int client = GetClientOfUserId(GetEventInt(event, "userid")), team = GetClientTeam(client), g_HP = GetConVarInt(HP), g_Flashbang = GetConVarInt(Flashbang), i_uleczen = GetConVarInt(Uleczenie); if(client > 0 && IsPlayerAlive(client) && IsPlayerGenericAdmin(client)) { SetEntityHealth(client, g_HP); SetEntityGravity(client, GetConVarFloat(Gravity)); SetEntPropFloat(client, Prop_Send, "m_flLaggedMovementValue", GetConVarFloat(Speedy)); if(GetConVarBool(Remove_grenade)) StripNades(client); if(GetConVarBool(Smokegrenade)) GivePlayerItem(client, "weapon_smokegrenade"); if(GetConVarBool(Hegrenade)) GivePlayerItem(client, "weapon_hegrenade"); if(GetConVarBool(Molotov) && team == CS_TEAM_T) GivePlayerItem(client, "weapon_molotov"); if(GetConVarBool(Molotov) && team == CS_TEAM_CT) GivePlayerItem(client, "weapon_incgrenade"); if(GetConVarBool(Armorvalue)) SetEntProp(client, Prop_Send, "m_ArmorValue", 100); if(GetConVarBool(Flashbang)) { for (int i = 1; i <= g_Flashbang; i++) GivePlayerItem(client, "weapon_flashbang"); } if(team == CS_TEAM_CT) { if(GetConVarBool(Defuser) && GetEntProp(client, Prop_Send, "m_bHasDefuser") == 0) GivePlayerItem(client, "item_defuser"); //kombinerki } uleczenie[client] = i_uleczen; } } public Action PlayerDeath(Event event, const char[] name, bool dontBroadcast) { int attacker = GetClientOfUserId(GetEventInt(event, "attacker")), health = GetClientHealth(attacker), g_headshot_hp = GetConVarInt(Headshot_hp), g_kill_hp = GetConVarInt(Kill_hp), max_hp = GetConVarInt(MaxHP); bool headshot = GetEventBool(event, "headshot"); if (IsPlayerGenericAdmin(attacker)) { if(headshot) { if(health >= max_hp - g_headshot_hp) { SetEntityHealth(attacker, max_hp); } else { SetEntityHealth(attacker, health + g_headshot_hp); } } else { if(health >= max_hp - g_kill_hp) { SetEntityHealth(attacker, max_hp); } else { SetEntityHealth(attacker, health + g_kill_hp); } } } } public Action TagTables(Handle timer) { for(int client = 1; client <= MaxClients; client++) { if(IsValidClient(client, true) && IsPlayerGenericAdmin(client) && GetConVarInt(Tagtable) == 1) { CS_SetClientClanTag(client, "[VIP]"); KillTimer(TagTable_Timers); } } } public Action MoneyOnSpawn(Handle timer) { for(int client = 1; client <= MaxClients; client++) { if(IsValidClient(client, true) && IsPlayerGenericAdmin(client)) { int money = GetEntProp(client, Prop_Send, "m_iAccount"), g_moneystart = GetConVarInt(Moneystart); SetEntProp(client, Prop_Send, "m_iAccount", money + g_moneystart); KillTimer(MoneyOnStart_Timers); } } } public Action HelmetPistolRounds(Handle timer) { for(int client = 1; client <= MaxClients; client++) { if(IsValidClient(client, true) && IsPlayerGenericAdmin(client)) { if(GetConVarInt(HelmetPistolRound) == 1) { if(Rundy == 2 || Rundy == 17) { if(GetConVarBool(Bhashelmet)) SetEntProp(client, Prop_Send, "m_bHasHelmet", 0); } else { if(GetConVarBool(Bhashelmet)) SetEntProp(client, Prop_Send, "m_bHasHelmet", 1); } } else { if(GetConVarBool(Bhashelmet)) SetEntProp(client, Prop_Send, "m_bHasHelmet", 1); } KillTimer(HelmetPistolRound_Timers); } } } public Action OnPlayerRunCmd(int client, int &buttons, int &impulse, float[3] vel, float[3] angles, int &weapon) { int max_hp = GetConVarInt(MaxHP), plus_hp = GetConVarInt(Leczenie_HP), health = GetEntProp(client, Prop_Send, "m_iHealth"), plus_hp2 = max_hp - GetClientHealth(client); if(client > 0 && IsPlayerGenericAdmin(client) && IsValidClient(client, true) && GetConVarInt(Uleczenia) == 1) { if(!oldbuttons[client] && buttons & IN_USE) { if(uleczenie[client] >= 1) { if(GetConVarInt(HP) > 0) { if(GetClientHealth(client) == max_hp) { PrintToChat(client,"[\x06VIP\x01] Nie mozesz sie uleczyc bo masz \x06%d\x07HP\x01, liczba uleczen: \x06%d\x01!", health, uleczenie[client]); } else if(GetClientHealth(client) >= max_hp - plus_hp) { SetEntityHealth(client, max_hp); --uleczenie[client]; PrintToChat(client,"[\x06VIP\x01] Brawo, zostales uleczony o \x06%d\x07HP\x01, zostalo Ci \x06%d\x01 uleczenie!", plus_hp2, uleczenie[client]); } else { SetEntityHealth(client, health + plus_hp); --uleczenie[client]; PrintToChat(client,"[\x06VIP\x01] Brawo, zostales uleczony o \x06%d\x07HP\x01, zostalo Ci \x06%d\x01 uleczenie!", plus_hp, uleczenie[client]); } } } else { PrintToChat(client,"[\x06VIP\x01] Przykro mi, ale masz \x06%d\x01 uleczen!", uleczenie[client]); } oldbuttons[client] = true; } else if(oldbuttons[client] && !(buttons & IN_USE)) { oldbuttons[client] = false; } } return Plugin_Continue; } public Action CS_OnBuyCommand(int client, const char[] item) { if(GetConVarInt(HelmetPistolRound) == 1 && IsPlayerGenericAdmin(client)) { if(Rundy == 2 || Rundy == 17) { if(StrEqual(item,"assaultsuit")) { PrintToChat(client, "[\x06VIP\x01] Helm zostal zablokowany na rundach pistoletowych!"); return Plugin_Handled; } } } return Plugin_Continue; } public Action ReklamaAction(Handle timer) { if(GetConVarInt(Reklama) == 1) { PrintToChatAll("[\x06VIP\x01] Zostal stworzony przez \x04Hanys'a\x01, edytowany przez \x07xBonio\x01 [\x0BArenaSkilla.pl\x01]"); } } stock void StripNades(int client) { while(RemoveWeaponBySlot(client, 3)){} for(int i = 0; i < 6; i++) SetEntProp(client, Prop_Send, "m_iAmmo", 0, _, g_iaGrenadeOffsets); } stock bool RemoveWeaponBySlot(int client, int iSlot) { int iEntity = GetPlayerWeaponSlot(client, iSlot); if(IsValidEdict(iEntity)) { RemovePlayerItem(client, iEntity); AcceptEntityInput(iEntity, "Kill"); return true; } return false; } stock void CheckCloseHandle(Handle handle) { if (handle != INVALID_HANDLE) { CloseHandle(handle); handle = INVALID_HANDLE; } } stock bool IsPlayerGenericAdmin(int client) { if (!CheckCommandAccess(client, "sm_vip", 0, true) && !CheckCommandAccess(client, "arenaskilla", ADMFLAG_ROOT, true)) return false; { return true; } } stock bool IsValidClient(int client, bool alive = false) { if(client >= 1 && client <= MaxClients && IsClientConnected(client) && IsClientInGame(client) && (alive == false || IsPlayerAlive(client))) { return true; } return false; } public Plugin myinfo = { name = "xVIP", author = "xBonio", description = "Plugin z VIP'em (Autor Hanys, edycja xBonio)", version = "1.4.1", url = "http://arenaskilla.pl" }; Jeśli ktoś się zna, bardzo proszę o pomoc :) xVIP.sp
  8. Fajnie, oszczędzisz mi sprawdzania i napiszesz który?? :d
  9. Ale te pluginy, co napisali powyżej dają tylko flagę taką, jaką ma Vip. HP, czy tagu Ci nie da, jak nie masz ustawionego w pluginie vip, tak myślę.
  10. Dzięki panowie :) Jutro popołudniu sprawdzę oba i napiszę. Jak ktoś sprawdzi szybciej, proszę o wpis :)
  11. U mnie tez nie działa. :( Ja mam taki pomysł, a można zrobić plugin, aby dawało np flagę a wszystkim od godziny 22-8? Chyba łatwiej niż pisać cały plugin?
  12. Ja ustawiłem na 22 poczekam i sprawdzę :D
  13. Dzięki Wielkie. Tego pierwszego Pana, coś nie działa niestety. Mimo to dziękuje za chęci.
  14. Miałbym tylko jeszcze prosić o dopisanie Tag [Vip] ? Jeśli jest taka możliwość?
×
×
  • Dodaj nową pozycję...