Вот я пытался сделать этот тутор, но все попытки четны http://www.hl-lab.ru/?s=hl-lab&l=ru...&o=readarticles
Я конечно не уверен, но мне кажется, что этот тутор не доделанный
Там не сказано, как сделать так, чтоб появился значек гранаты так где всё оружие .
F:\SDK\Microsoft_Visual\code_src\dlls\sgrenade.cpp(229) : error C2664: 'UTIL_SetOrigin' : cannot convert parameter 1 from 'struct entvars_s *' to 'class CBaseEntity *'
5
Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
6
Error executing cl.exe.
7
8
sgrenade.obj - 1 error(s), 0 warning(s)
Сам тутор
C++ Source Code:
1
Smoke Grenade - In this tutorial, I will show you how to create a simple smoke grenade, and how to be able to put them in maps. If there are any problems let me know and I will try and fix it for you. * Fixed * There was a error in the code, one leter was supposed to be capital but wasn’t so it caused some problems and I forgot to tell to create a txt file for the weapon to be shown in the hud correctly… soryy
2
3
First, create a new file called sgrenade.cpp and add it to your project.
4
Not really much too explain, its just a copy of the normal grenade and modified so it doesn't explode, but instead release smoke
5
Select the Following code as paste it into that file:
The Grenade will be in slot 0 (where the crowbar is) which you can change below
12
Smoke Grenade Made By Craten Toby
13
*/
14
15
#include"extdll.h"
16
#include"util.h"
17
#include"cbase.h"
18
#include"monsters.h"
19
#include"weapons.h"
20
#include"nodes.h"
21
#include"player.h"
22
23
#define WEAPON_SMOKEGRENADE 16
24
#define SMOKETIME 8 // 8 seconds for smoke
25
26
#define SMOKE_SLOTNUMBER 0 // The slot it is in ( 0 is crowbar area, 1 is pistol area, etc… )
27
#define SMOKE_POSITION 3 // Position Is what column the weapon is in, for example - in slot 1, the pistol is position 1, the magnum is 2, and so forth. Try not to put the same position number as another weapon, or it might cause problems.
Now this is just the grenade, now we have to make it so you can place them in maps.
359
360
In your mod's root directory, create a file called "DATA.FGD"if you don't already have a .fgd file. If you are just putting this into normal halflife make the same file but put it into the halflife/valve/ folder.
In WorldCraft under game configurations in the options menu, include the DATA.FGD file or the file you put the PointClass in, and you will be able to place smoke grenades on your map.
379
380
381
382
Ok One More thing that I forgot, we need to create a file called "weapon_smokegrenade.txt" and place it in your mod's sprite directory.
Now this made the sprite of the smoke grenade a grenade when you pick it from the hud.
408
409
410
411
You should be all set now, just compile and run it, feel free to modify it.
412
413
Happy Coding!!
414
- Craten Toby
__________________
Kiss my ass if you don't like my Ford!
------------------------------------------ Game Area51 Update 1
First Person Shooter Released Jul 24, 2017
The game is a 3d shooter with the elements of the quest.
__________________
Kiss my ass if you don't like my Ford!
------------------------------------------ Game Area51 Update 1
First Person Shooter Released Jul 24, 2017
The game is a 3d shooter with the elements of the quest.
Приверил на обычной хл - работает, но я бы ''это'' дымовой гранатой не назвал бы В кс в 100 раз лучше
Как сделать, что б на кс хоть немного было похоже ?
__________________
Kiss my ass if you don't like my Ford!
------------------------------------------ Game Area51 Update 1
First Person Shooter Released Jul 24, 2017
The game is a 3d shooter with the elements of the quest.
Только вместо pev->origin задавать другие координаты, юнитов на 8 или 12 во все четыре стороны от ориджина. Ну и размер дыма уменьшить. Поэкспериментируй, должно неплохо получиться, я раньше так делал.
__________________
Kiss my ass if you don't like my Ford!
------------------------------------------ Game Area51 Update 1
First Person Shooter Released Jul 24, 2017
The game is a 3d shooter with the elements of the quest.
XaeroX
Да, я знаю что он не автор ну может знает, малоли
__________________
Kiss my ass if you don't like my Ford!
------------------------------------------ Game Area51 Update 1
First Person Shooter Released Jul 24, 2017
The game is a 3d shooter with the elements of the quest.
Дядя Миша писал: А в кс ЕМНИП серый туман заливает весь уровень
Нет. Там много-много спрайтов. Это хорошо видно, если включить опцию d_spriteskip (или как-то так, при этом альфа-блендинга нет на спрайтах. Многие это юзают как чит)
XaeroX надо полагать в КС - обычные темпэнтити, как вариант можно заюзать код бузеровского дождя для достижения лучшего эффекта.
Ну или авроры из спирита.
Дядя Миша писал: XaeroX надо полагать в КС - обычные темпэнтити, как вариант можно заюзать код бузеровского дождя для достижения лучшего эффекта.
Ну или авроры из спирита.
Знать бы как это сделать ( для обычной хл )
__________________
Kiss my ass if you don't like my Ford!
------------------------------------------ Game Area51 Update 1
First Person Shooter Released Jul 24, 2017
The game is a 3d shooter with the elements of the quest.