HLFX.Ru Forum (https://hlfx.ru/forum/index.php)
- Half-Life SDK (https://hlfx.ru/forum/forumdisplay.php?forumid=8)
-- Kill Points (https://hlfx.ru/forum/showthread.php?threadid=2981)
Отправлено MisterDeath 03-09-2011 в 00:41:
Kill Points
Wrong? could fix please...
Sorry bad english
C++ Source Code:
1 | void CScientist::Killed(entvars_t *pAttacker, int iGib) |
4 | CTalkMonster::Killed( pAttacker, iGib ); |
7 | int score = pev->frags += 1; |
9 | MESSAGE_BEGIN( MSG_ALL, gmsgScoreInfo ); |
10 | WRITE_BYTE( pAttacker->edict() ); |

scientist.cpp
E:\Halflife\TESTEANDO MOD!!!\neew mod\HLSDK\Single-Player Source\dlls\scientist.cpp(889) : error C2039: 'edict' : is not a member of 'entvars_s'
..\engine\progdefs.h(59) : see declaration of 'entvars_s'
Error executing cl.exe.__________________
hl 4 ever
Отправлено XaeroX 03-09-2011 в 03:28:
Цитата:
MisterDeath писал:
WRITE_BYTE( pAttacker->edict() );
WRITE_BYTE( ENT(pAttacker) );
Отправлено Дядя Миша 03-09-2011 в 08:39:
Цитата:
XaeroX писал:
WRITE_BYTE( ENT(pAttacker) );
No!
This is only works for players and edicts smaller than 255.
You need to rewrite message on the client too, change WRITE_BYTE on the WRITE_ENTITY.__________________
My Projects: download page
F.A.Q по XashNT
Блог разработчика в телеграме
Цитата:
C:\DOCUME~1\C4C5~1\LOCALS~1\Temp\a33328if(72) : see declaration of 'size_t'
Отправлено XaeroX 03-09-2011 в 08:45:
А блин, там надо ентиндекс слать же вроде?
Тогда ENTINTEX( pAttacker )
Отправлено Дядя Миша 03-09-2011 в 08:53:
XaeroX I do not understand, write it in English 
__________________
My Projects: download page
F.A.Q по XashNT
Блог разработчика в телеграме
Цитата:
C:\DOCUME~1\C4C5~1\LOCALS~1\Temp\a33328if(72) : see declaration of 'size_t'
Отправлено XaeroX 03-09-2011 в 09:01:
Дядя Миша
http://translate.google.ru/
Отправлено MisterDeath 03-09-2011 в 13:20:
XaeroX
This not works!!! found errors !!!

__________________
hl 4 ever
Отправлено XaeroX 03-09-2011 в 14:18:
MisterDeath
Where is the compile log?
Отправлено MisterDeath 03-09-2011 в 14:59:
XaeroX
C++ Source Code:
1 | MESSAGE_BEGIN( MSG_ALL, gmsgScoreInfo ); |
2 | WRITE_BYTE( ENT(pAttacker) ); |
--------------------Configuration: hl - Win32 Profile--------------------
Compiling...
scientist.cpp
E:\Halflife\TESTEANDO MOD!!!\neew mod\HLSDK\Single-Player Source\dlls\scientist.cpp(889) : error C2664: 'void (int)' : cannot convert parameter 1 from 'struct edict_s *' to 'int'
This conversion requires a reinterpret_cast, a C-style cast or function-style cast
Error executing cl.exe.
hl.dll - 1 error(s), 0 warning(s)

__________________
hl 4 ever
Отправлено XaeroX 03-09-2011 в 15:11:
MisterDeath
I did correct myself in the next post:
Цитата:
XaeroX писал:
ENTINTEX( pAttacker )
Отправлено MisterDeath 03-09-2011 в 15:30:
XaeroX
C++ Source Code:
1 | MESSAGE_BEGIN( MSG_ALL, gmsgScoreInfo ); |
2 | WRITE_BYTE( ENTINDEX( pAttacker ) ); |
--------------------Configuration: hl - Win32 Profile--------------------
Compiling...
scientist.cpp
E:\Halflife\TESTEANDO MOD!!!\neew mod\HLSDK\Single-Player Source\dlls\scientist.cpp(889) : error C2664: 'ENTINDEX' : cannot convert parameter 1 from 'struct entvars_s *' to 'struct edict_s *'
Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
Error executing cl.exe.
hl.dll - 1 error(s), 0 warning(s)__________________
hl 4 ever
Отправлено Дядя Миша 03-09-2011 в 16:14:
C++ Source Code:
1 | MESSAGE_BEGIN( MSG_ALL, gmsgScoreInfo ); |
2 | WRITE_BYTE( ENTINDEX( ENT( pAttacker ))); |
__________________
My Projects: download page
F.A.Q по XashNT
Блог разработчика в телеграме
Цитата:
C:\DOCUME~1\C4C5~1\LOCALS~1\Temp\a33328if(72) : see declaration of 'size_t'
Отправлено MisterDeath 03-09-2011 в 17:16:
Дядя Миша
Thanks, this code now works! 
__________________
hl 4 ever
Отправлено XaeroX 03-09-2011 в 19:44:
А чоита в халфе ентиндекс не конвертит ентварсы? 
Отправлено MisterDeath 03-09-2011 в 20:10:
XaeroX
Sorry... Not speak russian ( Bad Idiom Translater )
__________________
hl 4 ever