Home » Renegade Discussions » Mod Forum » Headshot message for Server.
() 1 Vote
Re: Headshot message for Server. [message #439855 is a reply to message #439848] |
Sun, 21 November 2010 15:52 |
crysis992
Messages: 314 Registered: June 2008
Karma:
|
Recruit |
|
|
Okay Ive tested the kill strikes with more players and it seems that they are bugged.
If someone make a doulbe kill, and he get killed the message comes.
Sometimes the message appear 4-8 times.
Thats what I´ve done:
gmscripts.cpp
//******************************************************************************
//************************* PLAYER RELATED SCRIPTS *****************************
//******************************************************************************
//This script is attached to all players.
void MDB_SSGM_Player::Created(GameObject *obj) {
if (Settings->ForceTeam != -1) {
if (Commands->Get_Player_Type(obj) != Settings->ForceTeam) {
Change_Team(obj,Settings->ForceTeam);
return;
}
}
const char *Nick = Get_Player_Name(obj);
if (strstr(Nick,";")) { //Breaks gamelog. Crashes if done in the player join hook.
Console_Input(StrFormat("kick %d",Get_Player_ID(obj)).c_str());
delete[] Nick;
return;
}
delete[] Nick;
if (Settings->GameMode != 1) {
Commands->Set_Is_Visible(obj,false);
}
Commands->Attach_Script(obj,"MDB_SSGM_Taunt_Key","Taunt1,h_a_a0a0_l12");
Commands->Attach_Script(obj,"MDB_SSGM_Taunt_Key","Taunt2,H_A_a0a0_L22");
Commands->Attach_Script(obj,"MDB_SSGM_Taunt_Key","Taunt3,H_A_a0a0_L23");
Commands->Attach_Script(obj,"MDB_SSGM_Taunt_Key","Taunt4,H_A_a0a0_L24");
Commands->Attach_Script(obj,"MDB_SSGM_Taunt_Key","Taunt5,H_A_a0a0_L25");
Commands->Attach_Script(obj,"MDB_SSGM_Taunt_Key","Taunt6,H_A_a0a0_L58");
Commands->Attach_Script(obj,"MDB_SSGM_Taunt_Key","Taunt7,H_A_cresentkick");
Commands->Attach_Script(obj,"MDB_SSGM_Taunt_Key","Taunt8,H_A_sidekick");
Commands->Attach_Script(obj,"MDB_SSGM_Taunt_Key","Taunt9,H_A_punchcombo");
Commands->Attach_Script(obj,"MDB_SSGM_WriteLog_Key","VoteYes,!vote yes,0");
Commands->Attach_Script(obj,"MDB_SSGM_WriteLog_Key","VoteNo,!vote no,0");
if (Settings->GameMode == 2) {
Commands->Attach_Script(obj,"MDB_SSGM_ChatCommand_Key","VehBind,!captures,1");
Commands->Attach_Script(obj,"MDB_SSGM_ChatCommand_Key","VehBL,!flaginfo,1");
}
[COLOR=red] if (Settings->GameMode == 3) {
Commands->Attach_Script(obj,"z_player","");
}[/COLOR]
.
.
.
gmscripts.h
//******************************************************************************
//************************* PLAYER RELATED SCRIPTS *****************************
//******************************************************************************
//This script is attached to all players.
class MDB_SSGM_Player : public ScriptImpClass {
void Created(GameObject *obj);
void Destroyed(GameObject *obj);
void z_Player(GameObject *obj);
void Killed(GameObject *obj, GameObject *shooter);
void Timer_Expired(GameObject *obj, int number);
void MDB_SSGM_Player::Custom(GameObject *obj, int message, int param, GameObject *sender);
Vector3 SpawnPos;
int AfkDetect;
bool WasKilled;
};
c_kills.cpp
#include "scripts.h"
#include "engine.h"
#include "gmmain.h"
#include "cry_kills.h"
#include "gmgamelog.h"
#include "date.h"
#include <stdarg.h>
#ifdef WIN32
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
#include <ddeml.h>
#endif
#include <fstream>
#include <iostream>
#include <sstream>
#include <time.h>
#include <algorithm>
#include <map>
void z_Player::Created(GameObject *obj)
{
kills = 0;
}
void z_Player::Custom(GameObject *obj, int message, int param, GameObject *sender)
{
if (kills == 2)
{
Commands->Create_2D_WAV_Sound("double_kill.wav");
Console_Input(StrFormat("msg %s made a double kill (2)", Get_Player_Name(obj)).c_str());
}
else if (kills == 3)
{
Commands->Create_2D_WAV_Sound("triplekill.mp3");
Commands->Create_2D_WAV_Sound("triplekill.wav");
Console_Input(StrFormat("msg %s made a Tripple. (3)", Get_Player_Name(obj)).c_str());
}
else if (kills == 4)
{
Commands->Create_2D_WAV_Sound("multikill.wav");
Console_Input(StrFormat("msg %s made a Multikill (4)", Get_Player_Name(obj)).c_str());
}
else if (kills == 6)
{
Commands->Create_2D_WAV_Sound("Monsterkill_F.wav");
Console_Input(StrFormat("msg %s made a M-M-M-M-Monster Kill!!! (6)", Get_Player_Name(obj)).c_str());
}
else if (kills == 8)
{
Commands->Create_2D_WAV_Sound("rampage.wav");
Console_Input(StrFormat("msg Oh my GOD! %s is on a rampage (7)", Get_Player_Name(obj)).c_str());
}
else if (kills == 9)
{
char msg[250];
Commands->Create_2D_WAV_Sound("unstoppable.wav");
Console_Input(StrFormat("msg %s is unstoppable!!", Get_Player_Name(obj)).c_str());
}
else if (kills == 13)
{
char msg2[250];
Console_Input(StrFormat("msg [Info]: %s is on a killingspree (3)", Get_Player_Name(obj)).c_str());
Commands->Create_2D_WAV_Sound("monsterkill.wav");
Send_Message(255,255,255,msg2);
}
else if (kills == 15)
{
Commands->Create_2D_WAV_Sound("godlike.mp3");
Console_Input(StrFormat("msg %s is godlike...", Get_Player_Name(obj)).c_str());
}
}
void z_Player::Register_Auto_Save_Variables()
{
Auto_Save_Variable(1,4,&kills);
}
ScriptRegistrant<z_Player> z_Player_Registrant("z_Player","");
cry_kills.h
class z_Player : public ScriptImpClass {
void Created(GameObject *obj);
void Custom(GameObject *obj, int message, int param, GameObject *sender);
void Register_Auto_Save_Variables();
int kills;
};
So i dont know why its not working correctly or whats the problem
Some IRC Logs:
[ 23:49:44] 15|><>7 [Cry]BoT 15<><| 7[Message] Host: [INFO] Renegadeskins.Net Sniper server for HoH Clan
[ 23:49:48] 15|><>7 [Cry]BoT 15<><| 7[Message] [THS]-Jure made a double kill (2)
[ 23:49:51] 15|><>7 [Cry]BoT 15<><| 7[Message] [THS]-Jure made a Tripple. (3)
[ 23:49:51] 15|><>7 [Cry]BoT 15<><| 07[Kill] 04[THS]-Jure killed [THS]-Maxim with Sniper Rifle.
[ 23:49:51] 15|><>7 [Cry]BoT 15<><| 04[THS]-Jure killed [THS]-Maxim (Nod Blackhand Sniper/Sniper Rifle 04vs GDI Havoc04)
[ 23:50:06] 15|><>7 [Cry]BoT 15<><| 7[Message] [THS]-Jure made a Tripple. (3)
---------------------------
[ 23:48:04] 15|><>7 [Cry]BoT 15<><| 04Finalchapter killed [THS]-Maxim (Nod Blackhand Sniper/Sniper Rifle 04vs GDI Deadeye04)
[ 23:48:11] 15|><>7 [Cry]BoT 15<><| 7[Message] Finalchapter made a double kill (2)
[ 23:48:12] 15|><>7 [Cry]BoT 15<><| 7[Message] Finalchapter made a double kill (2)
[ 23:48:13] 15|><>7 [Cry]BoT 15<><| 7[Message] Finalchapter made a double kill (2)
[ 23:48:18] 15|><>7 [Cry]BoT 15<><| 7[Message] Finalchapter made a double kill (2)
|
|
|
|
|
Headshot message for Server.
|
|
|
Re: Headshot message for Server.
By: Omar007 on Sun, 21 November 2010 15:22
|
|
|
Re: Headshot message for Server.
|
|
|
Re: Headshot message for Server.
By: reborn on Mon, 22 November 2010 01:26
|
|
|
Re: Headshot message for Server.
|
|
|
Re: Headshot message for Server.
By: jnz on Mon, 22 November 2010 11:10
|
|
|
Re: Headshot message for Server.
|
|
|
Re: Headshot message for Server.
By: reborn on Tue, 23 November 2010 01:13
|
|
|
Re: Headshot message for Server.
By: reborn on Tue, 23 November 2010 14:41
|
|
|
Re: Headshot message for Server.
|
|
|
Re: Headshot message for Server.
By: reborn on Tue, 23 November 2010 15:38
|
|
|
Re: Headshot message for Server.
|
|
|
Re: Headshot message for Server.
|
|
|
Re: Headshot message for Server.
|
|
|
Re: Headshot message for Server.
By: reborn on Tue, 23 November 2010 23:32
|
|
|
Re: Headshot message for Server.
|
|
|
Re: Headshot message for Server.
By: Sir Kane on Thu, 25 November 2010 18:47
|
|
|
Re: Headshot message for Server.
By: reborn on Thu, 25 November 2010 23:34
|
|
|
Re: Headshot message for Server.
|
|
|
Re: Headshot message for Server.
By: reborn on Fri, 26 November 2010 07:29
|
|
|
Re: Headshot message for Server.
|
|
|
Re: Headshot message for Server.
By: reborn on Mon, 29 November 2010 14:03
|
|
|
Re: Headshot message for Server.
|
|
|
Re: Headshot message for Server.
By: reborn on Mon, 29 November 2010 14:57
|
Goto Forum:
Current Time: Sun Jan 12 07:06:02 MST 2025
Total time taken to generate the page: 0.01133 seconds
|