Category:Pt-br/GoldSrc Programming: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
m (Nesciuse moved page Category:GoldSrc Programming/pt-br to Category:Pt-br/GoldSrc Programming: -Language prefixes)
m (Multipage removal)
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
{{LanguageBar}}
{{back|Half-Life SDK}}
__NOTOC__
__NOTOC__
{{category header|background-color=#E0E0E0|border-color=lightgray}}
{{category header|background-color=#E0E0E0|border-color=lightgray}}
Line 68: Line 70:


== Abstract coding ==
== Abstract coding ==
* [[Trigger_PlayerFreeze]]
* {{L|Trigger_PlayerFreeze}}
* [[Paranoia Subtitles]]
* {{L|Paranoia Subtitles}}


== Miscellaneous ==
== Miscellaneous ==


== Plugins ==
== Plugins ==
*[[Metamod]]
*{{L|Metamod}}
:*[[AMX Mod]]{{deprecated}}
:*{{L|AMX Mod}}{{deprecated}}
::*[[AMX Mod X]]
::*{{L|AMX Mod X}}
:*[[Sharp Mod]]
:*{{L|Sharp Mod}}


== Reference ==
== Reference ==


== Weapons ==
== Weapons ==
* [[weapon_flamethrower]]
* {{L|weapon_flamethrower}}


{{category newcolumn|rowspan=99|width=50%|background-color=#F7F7F7|border-color=lightgray}}
{{category newcolumn|rowspan=99|width=50%|background-color=#F7F7F7|border-color=lightgray}}


== Artificial Intelligence ==
== Artificial Intelligence ==
* [[Making scientists always follow]]
* {{L|Making scientists always follow}}


== Networking ==
== Networking ==
Line 94: Line 96:


== Rendering ==
== Rendering ==
* [[Sparks]]
* {{L|Sparks}}
* [[Water Splash]]
* {{L|Water Splash}}


== User interface ==
== User interface ==
* [[Changing HUD Colors]]
* {{L|Changing HUD Colors}}


== External libraries ==
== External libraries ==
Line 110: Line 112:


== Game movement and camera ==
== Game movement and camera ==
* [[Quake strafing]]
* {{L|Quake strafing}}
* [[DoD bobing]]
* {{L|DoD bobing}}




== External Links ==
== External Links ==
* [[Programming Sites]] - sites about programming, including tutorials & articles.
* {{L|Programming Sites}} - sites about programming, including tutorials & articles.
{{category end}}__NOTOC__
{{ACategory|GoldSrc Modding}}

Latest revision as of 13:39, 12 July 2024

English (en)Português (pt)Português do Brasil (pt-br)Русский (ru)Translate (Translate)
Half-Life SDK

Começando

Primeiro: Baixe o sdk do Half-life 1 em: https://github.com/twhl-community/halflife-updated, essa é melhor opção porque tem como usar visual studio 2022 Segundo: Abra a pasta extráida "halflife-updated-master/projects/vs2019/" e abra o arquivo projects.sln

Antes de compilar vamos fazer algumas modificações

Abra em gerenciador de soluções hldll, depois sources Files, então dlls. Aperte botão direito do mouse em dlls, Adicione um novo item

Código

Inclua nessa ordem esses headers, ou se não dará errors:

  1. include <extdll.h>
  2. include <util.h>
  3. include <cbase.h>

Crie uma classe de o seu nome e declare em público: class CtriggerHealth : public CBaseEntity { public: void Use(CBaseEntity * pActivator, CBaseEntity * pCaller, USE_TYPE use_Type, float value); };

use é um método para declarar que alguem a ativou pActivator, e pchamador para chamar a função

crie uma função:

void CtriggerHealth::Use(CBaseEntity* pActivator, CBaseEntity* pCaller, USE_TYPE use_Type, float value) { if (pActivator->IsPlayer()) { pActivator->pev->health = pev->health; } }

o if é pra ver se o ativador é o jogador já o -> é próximo argumento

no meio da classe e função adicione LINK_ENTITY_TO_CLASS(trigger_health, CtriggerHealth);

isso serve para dar um nome a classe que esse nome será usado no editor de léveis

resultado final:

  1. include <extdll.h>
  2. include <util.h>
  3. include <cbase.h>

class CtriggerHealth : public CBaseEntity { public: void Use(CBaseEntity * pActivator, CBaseEntity * pCaller, USE_TYPE use_Type, float value); };

LINK_ENTITY_TO_CLASS(trigger_health, CtriggerHealth);

void CtriggerHealth::Use(CBaseEntity* pActivator, CBaseEntity* pCaller, USE_TYPE use_Type, float value) { if (pActivator->IsPlayer()) { pActivator->pev->health = pev->health; } }

Common techniques

Abstract coding

Miscellaneous

Plugins

Reference

Weapons

Artificial Intelligence

Networking

Rendering

User interface

External libraries

Changing genres

Multiplayer

Game movement and camera


External Links

This category currently contains no pages or media.