- Joined
- Dec 31, 2013
- Messages
- 26
- Reaction score
- 1
Hi, how can I integrate who killed whom into the server? I want everyone to be able to see it in the bottom right corner of the game screen.
this->SendString128(STRING_128_USER_NOTICE, STRMSG_061107_0000, SendArenaCharacterName);
const char* killer = (i_pAttackUser && i_pAttackUser->GetCharacter() && i_pAttackUser->GetCharacter()->CharacterName) // Emir, global kill message 2022
? i_pAttackUser->GetCharacter()->CharacterName : "Unknown";
const char* victim = (this->GetCharacter() && this->GetCharacter()->CharacterName)
? this->GetCharacter()->CharacterName : "Unknown";
char buf[128];
_snprintf_s(buf, sizeof(buf), _TRUNCATE, "\\m[%s]\\m \\ykilled\\y \\c[%s]\\c", killer, victim);
ms_pFieldIOCP->SendString128ToAllClients(
STRING_128_USER_NOTICE,
buf,
FALSE, // for global message must FALSE
INFLUENCE_TYPE_ALL_MASK
);
i get the identifier error when I add this (i_pAttackUser)FieldIOCPSocket2.cpp between 19753.line
Code:const char* killer = (i_pAttackUser && i_pAttackUser->GetCharacter() && i_pAttackUser->GetCharacter()->CharacterName) // Emir, global kill message 2022 ? i_pAttackUser->GetCharacter()->CharacterName : "Unknown"; const char* victim = (this->GetCharacter() && this->GetCharacter()->CharacterName) ? this->GetCharacter()->CharacterName : "Unknown"; char buf[128]; _snprintf_s(buf, sizeof(buf), _TRUNCATE, "\\m[%s]\\m \\ykilled\\y \\c[%s]\\c", killer, victim); ms_pFieldIOCP->SendString128ToAllClients( STRING_128_USER_NOTICE, buf, FALSE, // for global message must FALSE INFLUENCE_TYPE_ALL_MASK );
Cheers!
Whats your source code ? 4.3 4.6 or 3.5?i get the identifier error when I add this (i_pAttackUser)
4.6Kaynak kodunuz nedir? 4.3, 4.6 veya 3.5 mi?