OPINION / LLORO por el nuevo orden de las armas

Iniciado por elriolilla, Agosto 20, 2015, 06:26:47 PM

Tema anterior - Siguiente tema

elriolilla

Hola a todos.... quiero ser el primero en expresar formalmente mi lloro en este foro por el nuevo orden de aparicion de las armas en el gungame.

Ahora , a lo manco que soy , hay que sumarle que ya parto de salida con la pistola americana... o lo que es lo mismo....cuando mato al primero con este arma tan dificultosa para mi los demas ya van por 10 muertes jajajaja.

En definitiva... me gustaba mas el orden antiguo con las automaticas primero y si no lo cambiais me enfado y no respiro.

PD.: Montilla es demasiado mayor para aceptar el cambio... por vuestra culpa le van a tener que subir la medicación en el centro de día.
a pico y pala !!!

ShUmAkEr


Linguini

Buenas noches a todos, como elriorilla tampoco me gusta el nuevo orden de cambio de armas. Si el objetivo era eliminar a los "pros", no ha sido una opcion mucho feliz, desde el cambio he visto diferencias muy grandes en los scores.
Es sólo mi opinión, pienso que no soy tan manco como elriorilla pero me gusta mas la outra orden.

Abrazos y paladas a todos de lo Português más conecido en lo servidor de Jarabe de Pala.

Srtrucho

La verdad es dificil la puta pistolita....
Por otra parte linguini.... ayer te kickee, y la proxima que me insultes en tu idioma o en el mio, solo por haberte matado, será la ultima vez que juegues aquí.

Linguini

Cita de: Srtrucho en Agosto 21, 2015, 10:05:48 AM
La verdad es dificil la puta pistolita....
Por otra parte linguini.... ayer te kickee, y la proxima que me insultes en tu idioma o en el mio, solo por haberte matado, será la ultima vez que juegues aquí.


Não te preocupes Srtrucho, se te vir no servidor, não vou jogar, prefiro ir-me embora. Não me mereces tal respeito.
Para administrador, fazeres o que fazes sempre que estou lá a jogar, ao desrespeitares o meu país, com a foto que tão carinhosamente colocas sempre que me vês, definitivamente não mereces o meu respeito por ti.

PS - Todos ofendem uns aos outros, mas eu sou kickado por ser Português, está certo... É uma justiça do quero, posso e mando. Não tenho paciência para crianças, já tenho uma para criar em casa.

PS2 - A todos los demás, discúlpeme he escrito en portugués, pero hay personas que no merecen mis esfuerzos.



Srtrucho

La foto es por una sola persona portuguesa que juega en el servidor, no por todos. No entiendo por que te atribuyes que la foto es por ti, cuando esa foto la pongo desde antes que tu existieras en el servidor.
Ya que tu no tienes respeto por mi, yo tendré menos por ti. Y por lo que veo no tienes excusa de tus insultos y has malgastado este momento para disculparte, ya que no te he hecho nada y tu a mi si,  te digo lo que vamos a hacer... te vas a llevar mi primer baneo permanente hasta que te disculpes,  asi te ahorras el mirar si estoy dentro o no antes de jugar.
Un saludo y hasta que tu quieras.

Linguini

Cita de: Srtrucho en Agosto 21, 2015, 08:36:00 PM
La foto es por una sola persona portuguesa que juega en el servidor, no por todos. No entiendo por que te atribuyes que la foto es por ti, cuando esa foto la pongo desde antes que tu existieras en el servidor.
Ya que tu no tienes respeto por mi, yo tendré menos por ti. Y por lo que veo no tienes excusa de tus insultos y has malgastado este momento para disculparte, ya que no te he hecho nada y tu a mi si,  te digo lo que vamos a hacer... te vas a llevar mi primer baneo permanente hasta que te disculpes,  asi te ahorras el mirar si estoy dentro o no antes de jugar.
Un saludo y hasta que tu quieras.

Como queiras, agora com a tua resposta ainda mais tenho a certeza que a tua atitude é QUERO, POSSO e MANDO sem sombra de dúvida. Já há uns tempos te tinha pedido (ainda não tinhas o JdP no nick) para não colocares essa foto, porque a mim e a todos os outros portugueses que estavamos a jogar na altura essa imagem ofende, na altura mandaste-me dar uma volta, mas já não te deves recordar... É uma pena sabes.
Para a situação do kick, propus-te um acordo de cavalheiros, mas tu tiraste logo da espada e baneas-me totalmente, atitude QUERO, POSSO e MANDO sem dúvida. 
És administrador no servidor, como tal, devias dar o EXEMPLO em todos os aspetos, não é só na conversação, mas sim também nas imagens que colocas, não concordas?
Se te ofendi verbalmente, estiveste bem em kickar-me, agora este ban é justo diz-me realmente?

Un saludo a todos.

PS - Pido a los moderadores para transferir este mensaje a el lugar correcto (quejas e sugerencias) por favor.

Jones Montilla

Retomando el tema original de este Tema (valga la rebuznancia) yo lloro y pataleo por el nuevo orden de armas y, de camino, aprovecho para reclamar públicamente el mapa de bazoca en la piscina.
Hay una relación amor/odio hacia este mapa que lo hace muy interesante y la gente lo echa de menos.

PD.: Riolilla, en el geriátrico no hacen más que preguntar por ti y por Armanluqui. ;D ;D ;D

Srtrucho

Me pediste que no use la foto en tu presencia y te explique porque... no lo vuelvo a explicar. de verdad eres tan patriota o es solo para evitar el que insultas en tu idioma cada vez que te matan?
Solo veo quejarte de la foto y no das explicaciones de  tus "coletillas" cuando te matan...
Se acabó el tema... si quieres jugar ya sabes lo que tienes que hacer.

Srtrucho

monti....
deja unos dias el orden así... solo estamos prbando la mejor manera.
Te prometo que daremos con el orden que más nos guste a todos.
Que le pasa al mapa? ese tema es mio y de pulga y lo desconozco.

mascotafumeta

me encanta ese nuevo cambio de armas es una de las mejores ideas que han tenido....

PULGA

Xumi pon ya el mapa a bazoca cojones y si no enseñame y lo pongo yo

ShUmAkEr

#12
Vale:

Te hace falta reescribir el codigo del plugin gungame.smx. Este plugin ya esta compilado asi que o lo decompilas y lo modificas o como opcion mas facil usas los archivos ya decompilados en formato script dentro de la carpeta script del servidor. Estos archivos ya decomplidos tienen .sp como extension. Los archivos a modificar el codigo son:

gungame.sp


// VERSION 3.3
// splitted into more SP files!
// removed stupid complicated CVar sm_gungame_punishment_down! now controlled through sm_gungame_punishment!
// reworked punishment with 2 new options. ( 4 = Give Spade & Give Health, 5 = Give Spade & Give Health & Level loss)
// the Health comes from the Cvar "sm_gungame_spadeknifehealth"
// the "no weapon" bug should be fixed. as workaround
// i check now 2 seconds after spawning if you have a weapon. if you have nothing, you got a spade.
//
// added Database function (MYSQL) to store Gungame Winner - you must setup your sourcemod database.cfg to your values!
// this is only functional if you have a MYSQL Server running!!
// if you do it, dont forget to enable it: sm_gungame_database_winner "1" !!
// added Top10 website chat command! "!ggtop" cvar: sm_gungame_database_web


#pragma semicolon 1
#include <sourcemod>
#include <sdktools>
#include <sdkhooks>
#include <dodhooks>
#define ALLIES 2
#define AXIS 3
#define PLUGIN_VERSION "3.3"

static const String:g_szGrenadeTypes[][] = {"grenade_frag_us","grenade_frag_ger"};
static const String:g_szObjectives[][] = {"dod_bomb_target","dod_capture_area"};
static const String:g_szTeamWalls[][] = {"func_team_wall","func_teamblocker"};

public Plugin:myinfo = {
name        = "DoD:S GunGame",
author      = "Darkranger (orig. by Tsunami), Feuersturm, Andersso and others",
description = "DoD:S GunGame for SourceMod",
version     = PLUGIN_VERSION,
url         = "http://dodsplugins.com"
}

#include "gungame\database.sp"
#include "gungame\init.sp"
#include "gungame\pluginstart.sp"
//#include "gungame\gamedesc.sp" // works only with sdkhooks 2.1hg147 and lower !!!
#include "gungame\eventshutdown.sp"
#include "gungame\loadconfig.sp"
#include "gungame\mapend.sp"
#include "gungame\no_weapon_check.sp"


public OnClientPutInServer(client)
{
    SDKHook(client, SDKHook_OnTakeDamage, OnTakeDamage);
    CreateTimer(30.0, Announcegghelp, client);
    CreateTimer(35.0, Announceggtop10, client);
}

public Action:Announcegghelp(Handle:timer, any:client)
{
if(IsClientInGame(client))
PrintToChat(client, "%s%t", g_sPrefix, "gg help");
}

public Action:Announceggtop10(Handle:timer, any:client)
{
if (GetConVarFloat(g_database_winner) == 1)
{
if(IsClientInGame(client))
PrintToChat(client, "%s%t", g_sPrefix, "gg top10");
}
}


public OnMapStart()
{
g_hNextMap    = FindConVar("sm_nextmap");
g_ggWinner = -1;
LoadConfig();
votebeforeendvar = 0;
PrecacheSound(FlagSnd, true);
g_iBeamSprite = PrecacheModel("materials/sprites/laser.vmt");
g_offset1rapid = FindSendPropOffs("CBaseCombatWeapon", "m_flNextPrimaryAttack");
g_offset2rapid = FindSendPropOffs("CBaseCombatWeapon", "m_iClip1");

}

public OnRoundStart()
{
RemoveFlagSound();
}

public OnConfigsExecuted()
{
LoadConfig2();
}

public OnClientDisconnect(client)
{
KillSpawnProtTimer(client);
SDKUnhook(client, SDKHook_OnTakeDamage, OnTakeDamage);
}

public OnGameFrame()
{
if (g_bEnabled && g_ggWinner == -1)
{
for (new i    = 1, iAmmo, iAmount; i <= MaxClients; i++)
{
if (IsClientInGame(i) && IsPlayerAlive(i) && !StrEqual(g_sWeapon[g_iLevel[i]], "frag_ger") && !StrEqual(g_sWeapon[g_iLevel[i]], "frag_us"))
{
if(!StrEqual(g_sWeapon[g_iLevel[i]], "spade") && !StrEqual(g_sWeapon[g_iLevel[i]], "amerknife"))
{
iAmmo     = g_iAmmo[GetLevel(i)], iAmount = g_iAmount[i];
if (iAmmo > g_iOffset && GetEntData(i, iAmmo) <= iAmount)
{
SetEntData(i, iAmmo, iAmount * 2, _, true);
}
}
else
{
SetEntPropFloat(i, Prop_Send, "m_flStamina", 80.0);
SetEntPropFloat(i, Prop_Data, "m_flLaggedMovementValue", GetConVarFloat(g_runspeed));
if ((g_bDoubleJump) && IsClientInGame(i) && IsPlayerAlive(i))
{
DoubleJump(i);
}
}
}
}
}
// GIVE CLIENTs SPEED after WIN
if (g_ggWinner != -1)
{
for(new client = 1; client <= MaxClients; client++)
{
if(IsClientInGame(client) && IsPlayerAlive(client))
{
SetEntPropFloat(client, Prop_Send, "m_flStamina", 80.0);
SetEntPropFloat(client, Prop_Data, "m_flLaggedMovementValue", GetConVarFloat(g_runspeed2));
if ((g_bDoubleJump) && IsClientInGame(client) && IsPlayerAlive(client))
{
DoubleJump(client);
}
}
if((GetConVarInt(g_SpecLockGG) == 1) && IsClientInGame(client))
{
new team = GetClientTeam(client);
if(team == 1) //1=SPEC 2=US 3=WEHRMACHT
{
EmitSoundToClient(client, "common/weapon_denyselect.wav");
PrintCenterText(client, "SPECTATOR IS LOCKED");
PrintToChat(client, "SPECTATOR IS LOCKED");
new team1;
new team2;
for (new i = 1; i < GetMaxClients(); i++)
{
if(IsClientInGame(i))
{
if(GetClientTeam(i) == 2)
team1++;
else if(GetClientTeam(i) == 3)
team2++;
}
}
if (team1 <= team2)
{
FakeClientCommandEx(client, "jointeam 2");
CreateTimer(0.1, randomjoinclass, client);
}
if (team2 < team1)
{
FakeClientCommandEx(client, "jointeam 3");
CreateTimer(0.1, randomjoinclass, client);
}
}
}
}
}
}

public Action:Event_PlayerSpawn(Handle:event, const String:name[], bool:dontBroadcast)
{
if (g_bEnabled)
{
new iClient = GetClientOfUserId(GetEventInt(event, "userid"));
if (GetClientTeam(iClient) > 1)
{
CreateTimer(2.0, NoWeaponCheck, iClient);
if ((GetConVarInt(g_gungame_custom_on) == 1) && IsClientConnected(iClient))
{
decl String:customtext1[256];
GetConVarString(g_gungame_customtext1, customtext1, sizeof(customtext1));
PrintCenterText(iClient, "%s", customtext1);
PrintToChat(iClient, "%s >> %s", g_sPrefix, customtext1);
}
if ((GetConVarInt(g_gungame_custom_on) == 2) && IsClientConnected(iClient))
{
decl String:customtext2[256];
GetConVarString(g_gungame_customtext2, customtext2, sizeof(customtext2));
PrintCenterText(iClient, "%s", customtext2);
PrintToChat(iClient, "%s >> %s", g_sPrefix, customtext2);
}
GetClientAbsOrigin(iClient, g_fPosition[iClient]);
for (new i = 0, s; i < 5; i++)
{
if ((s = GetPlayerWeaponSlot(iClient, i)) != -1)
{
RemoveWeapon(iClient, s);
}
}
if(g_ggWinner != -1)
{
GivePlayerItem(iClient, "weapon_spade");
return;
}
new iLevel        = g_iLevel[iClient];
g_iWeapon[iClient] = -1;
PrintToChat(iClient, "%s%t", g_sPrefix, "Level", 4, iLevel, 1, 4, g_sWeapon[iLevel]);
if(IsClientInGame(iClient))
{
GiveWeapon(iClient);
}
if (GetConVarBool(g_hSpades) && !StrEqual(g_sWeapon[iLevel], "amerknife") && !StrEqual(g_sWeapon[iLevel], "spade"))
{
GivePlayerItem(iClient, "weapon_spade");
}
}
}
}

public Action:OnPlayerSpawn(Handle:event, const String:name[], bool:dontBroadcast)
{
new client = GetClientOfUserId(GetEventInt(event, "userid"));
if(GetConVarInt(SpawnProtectOn) == 1 && IsPlayerValid(client))
{
KillSpawnProtTimer(client);
IsProtected[client] = true;
SetEntProp(client, Prop_Data, "m_takedamage", 0, 1);
if(GetConVarInt(SpawnProtectMsg) == 1)
{
CreateTimer(0.1, DisplayMsgOn, client, TIMER_FLAG_NO_MAPCHANGE);
}
new team = GetClientTeam(client);
if(team == ALLIES)
{
SetEntityRenderColor(client, 0, 255, 0, 255);
SpawnProtectTimer[client] = CreateTimer(GetConVarFloat(SpawnProtectTime), SpawnProtectOff, client, TIMER_FLAG_NO_MAPCHANGE);
}
else if(team == AXIS)
{
SetEntityRenderColor(client, 255, 0, 0, 255);
SpawnProtectTimer[client] = CreateTimer(GetConVarFloat(SpawnProtectTime), SpawnProtectOff, client, TIMER_FLAG_NO_MAPCHANGE);
}
return Plugin_Continue;
}
return Plugin_Continue;
}

public Action:Event_PlayerDeath(Handle:event, const String:name[], bool:dontBroadcast)
{
if (g_bEnabled && g_ggWinner == -1)
{
decl Float:fPosition[3], String:sWeapon[16];
new iAttackerID = GetEventInt(event, "attacker"),
iClientID   = GetEventInt(event, "userid"),
iAttacker   = GetClientOfUserId(iAttackerID),
iClient     = GetClientOfUserId(iClientID);
GetClientAbsOrigin(iClient, fPosition);
GetEventString(event, "weapon", sWeapon, sizeof(sWeapon));

if (IsValidEntity(g_iWeapon[iClient]))
{
RemoveWeapon(iClient, g_iWeapon[iClient]);
}
if (iAttacker == 0 || iAttacker == iClient)
{
if (g_iLevel[iClient] > 1)
{
g_iLevel[iClient]--;
PrintToChatAll("%s%t", g_sPrefix, "Suicide", 4, iClient, 1);
LogEvent("gg_leveldown",    iClientID);

if (!StrEqual(g_sSoundLevelDown,    ""))
{
EmitSoundToClient(iClient, g_sSoundLevelDown);
}
}
}
else if ((GetClientTeam(iAttacker) == GetClientTeam(iClient)) && (GetConVarInt(g_gungame_punishment) == 1))
{
if (IsClientInGame(iAttacker) && IsPlayerAlive(iAttacker))
{
if (g_iLevel[iAttacker] > 1)
{
g_iLevel[iAttacker]--;
PrintToChatAll("%s%t", g_sPrefix, "Team Kill", 4, iAttacker, 1);
LogEvent("gg_leveldown", iAttackerID);
if (!StrEqual(g_sSoundLevelDown,    ""))
{
EmitSoundToClient(iAttacker, g_sSoundLevelDown);
}
CreateTimer(0.1, Timer_Give, iAttacker);
}
}
}
else if ((GetClientTeam(iAttacker) == GetClientTeam(iClient)) && (GetConVarInt(g_gungame_punishment) == 2 || (GetConVarInt(g_gungame_punishment) == 4)))
{
if (IsClientInGame(iAttacker) && IsPlayerAlive(iAttacker))
{
CreateTimer(0.1, Spade_Loss, iAttacker);
}
}
else if ((GetClientTeam(iAttacker) == GetClientTeam(iClient)) && (GetConVarInt(g_gungame_punishment) == 3 || (GetConVarInt(g_gungame_punishment) == 5)))
{
if (IsClientInGame(iAttacker) && IsPlayerAlive(iAttacker))
{
g_iLevel[iAttacker]--;
PrintToChatAll("%s%t", g_sPrefix, "Team Kill", 4, iAttacker, 1);
LogEvent("gg_leveldown", iAttackerID);
if (!StrEqual(g_sSoundLevelDown,    ""))
{
EmitSoundToClient(iAttacker, g_sSoundLevelDown);
}
CreateTimer(0.1, Spade_Loss, iAttacker);
}
}
else if (GetClientTeam(iAttacker) != GetClientTeam(iClient) && (StrEqual(sWeapon, g_sWeapon[GetLevel(iAttacker)]) || StrEqual(sWeapon, "spade")))
{
if (fPosition[0] == g_fPosition[iClient][0] && fPosition[1] == g_fPosition[iClient][1])
{
PrintHintText(iAttacker, "%t", "AFK", iClient);
}
else if (g_iLevel[iAttacker]++ < g_iLevels)
{
if (GetConVarBool(g_hSpades)   && GetConVarBool(g_hSpadePro) &&
StrEqual(sWeapon, "spade") && g_iLevel[iClient] > 1)
{
g_iLevel[iClient]--;
PrintToChatAll("%s%t", g_sPrefix, "Steal", 4, iAttacker, 1, 4, iClient, 1);
LogEvent("gg_levelsteal", iAttackerID);
LogEvent("gg_leveldown",  iClientID);

if (!StrEqual(g_sSoundLevelSteal, ""))
{
EmitSoundToClient(iAttacker, g_sSoundLevelSteal);
}
if (!StrEqual(g_sSoundLevelDown,  ""))
{
EmitSoundToClient(iClient,   g_sSoundLevelDown);
}
// SOUND LAST LEVEL
if (g_iLevel[iAttacker] == g_iLevels)
{
EmitSoundToClient(iAttacker, g_sSoundLevelLast);
PrintToChatAll("%s \x06%N \x04%t", g_sPrefix, iAttacker, "lastlevel");
if (GetConVarFloat(g_lastlevelcenterinfo) == 1)
{
PrintCenterTextAll("%s %N %t", g_sPrefix, iAttacker, "lastlevel");
}
}
}
else
{
LogEvent("gg_levelup",    iAttackerID);

if (!StrEqual(g_sSoundLevelUp,    ""))
{
EmitSoundToClient(iAttacker, g_sSoundLevelUp);
}

// SOUND LAST LEVEL
if (g_iLevel[iAttacker] == g_iLevels)
{
EmitSoundToClient(iAttacker, g_sSoundLevelLast);
PrintToChatAll("%s \x06%N \x04%t", g_sPrefix, iAttacker, "lastlevel");
if (GetConVarFloat(g_lastlevelcenterinfo) == 1)
{
PrintCenterTextAll("%s %N %t", g_sPrefix, iAttacker, "lastlevel");
}
}
// VOTE x LEVELS BEFORE LAST LEVEL
if ((g_iLevel[iAttacker] == (g_iLevels - ((GetConVarInt(g_votebeforeendlevel) -1)))) && (votebeforeendvar == 0) && (GetConVarFloat(g_votebeforeend) == 1))
{
ServerCommand("sm_mapvote_dontchange 0");
ServerCommand("sm_mapvote_extend 0");
ServerCommand("sm_mapvote_endvote 0");
// NEW VOTE
decl String:Runvote[256];
GetConVarString(g_runvote, Runvote, sizeof(Runvote));
ServerCommand("%s", Runvote);
votebeforeendvar = 2;
if (GetConVarFloat(g_votesoundfile) == 1)
{
EmitSoundToAll(g_sSoundvote);
}
}
}

new iLeader  = GetLeader(), iLevel = g_iLevel[iAttacker];
if (IsPlayerAlive(iAttacker))
{
PrintToChat(iAttacker,   "%s%t", g_sPrefix, "Weapon",     4, g_sWeapon[iLevel]);
}
if (iLeader == iAttacker)
{
PrintToChatAll("%s%t", g_sPrefix, "Leader", 4, iAttacker, 1, 4, iLevel, 1);
}
else
{
new iLead  = g_iLevel[iLeader] - iLevel;
if (iLead  > 0)
{
PrintToChat(iAttacker, "%s%t", g_sPrefix, "Difference", 4, iLead, 1, iLead == 1 ? "" : "s");
}
}

if (GetConVarBool(g_hTurbo))
{
//UP 1 LEVEL
CreateTimer(0.1, Timer_Give, iAttacker);
}
else
{
new Handle:hGive = CreateMenu(MenuHandler_Give);
SetMenuTitle(hGive, "You have leveled up!");
SetMenuExitButton(hGive, true);
AddMenuItem(hGive, "", "Press 1 to get your next weapon.");
DisplayMenu(hGive, iAttacker, MENU_TIME_FOREVER);
}
}
else
{
if(g_ggWinner == -1)
{
g_ggWinner = iAttacker;
if (GetConVarFloat(g_runvoteenable) == 0)
{
decl String:sNextMap[32];
GetConVarString(g_hNextMap, sNextMap, sizeof(sNextMap));
PrintToChatAll("%s%t", g_sPrefix, "Win", 4, iAttacker, 1, 4, sNextMap);
}
if (GetConVarFloat(g_database_winner) == 1)
{
new ggWinner = iAttacker;
UpdateWinner(ggWinner);
}
Call_StartForward(RoundEndSound);
Call_Finish();
Call_StartForward(RoundEndOverlay);
Call_Finish();
Show_ggWinner(iAttacker);
LogEvent("gg_win", iAttackerID);
if (GetConVarFloat(g_runvoteenable) == 1)
{
ServerCommand("sm_mapvote_dontchange 0");
ServerCommand("sm_mapvote_extend 0");
ServerCommand("sm_mapvote_endvote 0");
CreateTimer(GetConVarFloat(g_bonustimevote), Timer_EndGame);
if (GetConVarFloat(g_votesoundfile) == 1)
{
EmitSoundToAll(g_sSoundvote);
}
}
if (GetConVarFloat(g_runvoteenable) == 0)
{
CreateTimer(GetConVarFloat(g_bonustime), Timer_EndGame);
}
if (!StrEqual(g_sSoundWin, ""))
{
EmitSoundToAll(g_sSoundWin);
}
decl String:Runcommand[256];
GetConVarString(g_runcommand, Runcommand, sizeof(Runcommand));
ServerCommand("%s", Runcommand);
if (GetConVarFloat(g_runvoteenable) == 1)
{
CreateTimer(10.0, Timer_MapVote);
}
// REMOVE CLIENT WEAPONS
for(new client = 1; client <= MaxClients; client++)
{
if(IsClientInGame(client) && IsPlayerAlive(client))
{
for (new i = 0, s; i < 5; i++)
{
if ((s = GetPlayerWeaponSlot(client, i)) != -1)
{
RemoveWeapon(client, s);
}
}
GivePlayerItem(client, "weapon_spade");
}
}
}
}
}
}
}

public Action:OnTakeDamage(victim, &attacker, &inflictor, &Float:damage, &damagetype)
{
if(g_bEnabled && g_ggWinner != -1 && GetConVarInt(g_bonustimekill) == 0)
{
damage *= 0.0;
return Plugin_Changed;
}
return Plugin_Continue;
}

public OnClientPostAdminCheck(client)
{
IsProtected[client] = false;
if (g_bEnabled && g_ggWinner == -1 && !StrEqual(g_sSoundJoin, ""))
{
EmitSoundToClient(client, g_sSoundJoin);
}
new iClients  = GetTeamClientCount(2) + GetTeamClientCount(3), iLevel = 0;
if (GetConVarBool(g_hHandicap) && iClients > 0)
{
for (new i  = 1; i <= MaxClients; i++)
{
if (IsClientInGame(i) && GetClientTeam(i) > 1)
{
iLevel += GetLevel(i);
}
}
g_iLevel[client] = iLevel / iClients;
}
else
{
g_iLevel[client] = 1;
}
g_iWeapon[client]  = -1;
}

public ConVarChange_Enabled(Handle:convar, const String:oldValue[], const String:newValue[])
{
g_bEnabled  = StrEqual(newValue, "1");

ServerCommand("mp_clan_restartround 1");

decl iLevel[MAXPLAYERS + 1] = {1, ...};
g_iLevel                    = iLevel;
}

public MenuHandler_Give(Handle:menu, MenuAction:action, param1, param2)
{
if (action == MenuAction_End)
{
CloseHandle(menu);
}
else if (action == MenuAction_Select)
{
GiveWeapon(param1);
}
}

public Action:Command_Drop(client, args)
{
return g_bEnabled ? Plugin_Handled : Plugin_Continue;
}


public Action:Timer_MapVote(Handle:timer)
{
decl String:Runvote[256];
GetConVarString(g_runvote, Runvote, sizeof(Runvote));
ServerCommand("%s", Runvote);
}

public Action:Show_ggWinner(ggWinner)
{
new Handle:ggWinnerMenu = INVALID_HANDLE;
ggWinnerMenu = CreatePanel();
decl String:menutitle[256];
Format(menutitle, sizeof(menutitle), "DoD GunGame");
SetPanelTitle(ggWinnerMenu, menutitle);
DrawPanelItem(ggWinnerMenu, "", ITEMDRAW_SPACER);
decl String:Winner[256];
Format(Winner, sizeof(Winner), "%t %N", "win1phrase", ggWinner);
DrawPanelText(ggWinnerMenu, Winner);
DrawPanelItem(ggWinnerMenu, "", ITEMDRAW_SPACER);
if (GetConVarFloat(g_runvoteenable) == 0)
{
decl String:sNextMap[32];
GetConVarString(g_hNextMap, sNextMap, sizeof(sNextMap));
decl String:NextMap[256];
Format(NextMap, sizeof(NextMap), "%t %s", "win2phrase", sNextMap);
DrawPanelText(ggWinnerMenu, NextMap);
DrawPanelItem(ggWinnerMenu, "", ITEMDRAW_SPACER);
}
SetPanelCurrentKey(ggWinnerMenu, 10);
DrawPanelItem(ggWinnerMenu, "Close", ITEMDRAW_CONTROL);
for(new i = 1; i <= MaxClients; i++)
{
if(IsClientConnected(i) && IsClientInGame(i))
{
SendPanelToClient(ggWinnerMenu, i, Handle_ggWinnerMenu, 14);
}
}
if((GetConVarInt(g_TeamWallRemoveGameEnd) == 1) && (GetConVarInt(g_TeamWallRemoveGame) == 0))
{
new entity = -1;
for (new i = 0; i < sizeof(g_szTeamWalls); i++)
{
while ((entity = FindEntityByClassname(entity, g_szTeamWalls[i])) != -1)
{
AcceptEntityInput(entity, "Kill");
}
}
}
}

public Handle_ggWinnerMenu(Handle:TeamStatsMenu, MenuAction:action, client, itemNum)
{
}


public Action:Event_RoundStart(Handle:event, const String:name[], bool:dontBroadcast)
{
new entity = -1;
if (GetConVarInt(g_CPdisable) == 1)
{
SetNumControlPoints(0);
for (new i = 0; i < sizeof(g_szObjectives); i++)
{
while ((entity = FindEntityByClassname(entity, g_szObjectives[i])) != -1)
{
AcceptEntityInput(entity, "Kill");
}
}
entity = -1;
while ((entity = FindEntityByClassname(entity, "dod_control_point")) != -1)
{
AcceptEntityInput(entity, "HideModel");
}
}
if (GetConVarInt(g_TeamWallRemoveGame) == 1)
{
entity = -1;
for (new i = 0; i < sizeof(g_szTeamWalls); i++)
{
while ((entity = FindEntityByClassname(entity, g_szTeamWalls[i])) != -1)
{
AcceptEntityInput(entity, "Kill");
}
}
}
}

public Action:Timer_EndGame(Handle:timer)
{
new iGameEnd  = FindEntityByClassname(-1, "game_end");
if (iGameEnd == -1 && (iGameEnd = CreateEntityByName("game_end")) == -1)
{
LogError("Unable to create entity \"game_end\"!");
}
else
{
AcceptEntityInput(iGameEnd, "EndGame");
}
}

public Action:Timer_Give(Handle:timer,  any:client)
{
if(IsClientInGame(client) && IsPlayerAlive(client))
{
GiveWeapon(client);
}
}

public Action:Spade_Loss(Handle:timer,  any:client)
{
if(IsClientInGame(client) && IsPlayerAlive(client))
{
for (new i = 0, s; i < 5; i++)
{
if ((s = GetPlayerWeaponSlot(client, i)) != -1)
{
RemoveWeapon(client, s);
}
}
PrintToChatAll("%s \x06%N \x04%t", g_sPrefix, client, "Team Kill Spade");
GivePlayerItem(client, "weapon_spade");
if ((GetConVarInt(g_gungame_punishment) == 4) || (GetConVarInt(g_gungame_punishment) == 5))
{
SetEntityHealth(client, GetConVarInt(g_spadeknifehealth));
PrintToChat(client, "PUNISHMENT HEALTH");
}
}
}

GiveWeapon(iClient)
{
decl iWeapon, String:sWeapon[24];
new iLevel = g_iOldLevel[iClient] = g_iLevel[iClient];
Format(sWeapon, sizeof(sWeapon), "weapon_%s", g_sWeapon[iLevel]);

if (IsValidEntity(g_iWeapon[iClient]))
{
RemoveWeapon(iClient, g_iWeapon[iClient]);
}
if (GetConVarBool(g_hSpades) && (iWeapon = GetPlayerWeaponSlot(iClient, 2)) != -1 && (StrEqual(g_sWeapon[iLevel], "amerknife") ||  StrEqual(g_sWeapon[iLevel], "spade")))
{
RemoveWeapon(iClient, iWeapon);
}
g_iWeapon[iClient] = GivePlayerItem(iClient, sWeapon);
if(StrEqual(g_sWeapon[iLevel], "frag_ger") || StrEqual(g_sWeapon[iLevel], "frag_us"))
{
SetEntData(iClient, g_iAmmo[iLevel], GetConVarInt(g_nades), _, true);
PrintHintText(iClient, "%t", "grenades", GetConVarInt(g_nades));
PrintToChat(iClient, "%s%t", g_sPrefix, "grenades", GetConVarInt(g_nades));
}
else if(StrEqual(g_sWeapon[iLevel], "spade") || StrEqual(g_sWeapon[iLevel], "amerknife"))
{
SetEntityHealth(iClient, GetConVarInt(g_spadeknifehealth));
PrintToChat(iClient, "%s%t", g_sPrefix, "spadeknifehealth2", GetConVarInt(g_spadeknifehealth));
}
else
{
if ((g_iAmount[iClient] = GetEntData(g_iWeapon[iClient], g_iClip)) < 1)
{
g_iAmount[iClient]    = 1;
}
if (g_iAmmo[iLevel]     > 0)
{
SetEntData(iClient, g_iAmmo[iLevel], g_iAmount[iClient] * 2, _, true);
}
}
}

GetLeader()
{
new iLeader = 0;
for (new i  = 1; i <= MaxClients; i++)
{
if (IsClientInGame(i) && g_iLevel[i] > g_iLevel[iLeader])
{
iLeader = i;
}
}

return iLeader;
}

GetLevel(iClient)
{
if (GetConVarBool(g_hTurbo))
{
return g_iLevel[iClient];
}
else
{
return g_iOldLevel[iClient];
}
}


LogEvent(const String:sName[], iUserID)
{
decl String:sAuth[32];
new iClient = GetClientOfUserId(iUserID);
decl String:sTeam[32];
if(GetClientTeam(iClient) == 2)
{
Format(sTeam, sizeof(sTeam), "Allies");
}
else
{
Format(sTeam, sizeof(sTeam), "Axis");
}
GetClientAuthString(iClient, sAuth, sizeof(sAuth));
LogToGame("\"%N<%d><%s><%s>\" triggered \"%s\"", iClient, iUserID, sAuth, sTeam, sName);
}

RemoveWeapon(iClient, iWeapon)
{
CreateTimer(3.0, NoWeaponCheck_remove, iClient);
if (IsValidEdict(iWeapon))
{
RemovePlayerItem(iClient, iWeapon);
RemoveEdict(iWeapon);
}
}


public Action:randomjoinclass(Handle:timer, any:client)
{
if (IsClientInGame(client))
{
FakeClientCommand(client, "cls_random");
ShowVGUIPanel(client, "class_ger", INVALID_HANDLE, false);
ShowVGUIPanel(client, "class_us", INVALID_HANDLE, false);
}
}

public Action:OnEnterPlayerState(client, &playerState)
{
if((GetConVarInt(g_TeamLockGG) == 1) && (playerState == PlayerState_PickingClass))
{
CreateTimer(0.1, Timer_SetClass, GetClientUserId(client), TIMER_FLAG_NO_MAPCHANGE);

playerState = PlayerState_ObserverMode;

return Plugin_Changed;
}

return Plugin_Continue;
}

public Action:Timer_SetClass(Handle:timer, any:client)
{
if ((client = GetClientOfUserId(client)) != 0)
{
SetDesiredPlayerClass(client, PlayerClass_Random);
}
}

public OnEntityCreated(iEntity, const String:szEntityName[])
{
if(GetConVarInt(g_NadeLaserEffect) == 1)
{
for (new i = 0; i < sizeof(g_szGrenadeTypes); i++)
{
if (StrEqual(szEntityName, g_szGrenadeTypes[i]))
{
SDKHook(iEntity, SDKHook_Spawn, OnEntitySpawn);
break;
}
}
}
}

public OnEntitySpawn(iEntity)
{
if(GetConVarInt(g_NadeLaserEffect) == 1)
{
new client = GetEntPropEnt(iEntity, Prop_Send, "m_hOwnerEntity");
new team = GetClientTeam(client);
if((team == ALLIES) && (IsClientInGame(client)))
{
TE_SetupBeamFollow(iEntity, g_iBeamSprite, -1, 1.0, 10.0, 10.0, 5, greencolor);
TE_SendToAll();
}
else
{
TE_SetupBeamFollow(iEntity, g_iBeamSprite, -1, 1.0, 10.0, 10.0, 5, redcolor);
TE_SendToAll();
}
}
}

public Event_DodStatsWeaponAttack(Handle:event, const String:name[], bool:dontBroadcast)
{
if (GetConVarInt(g_gungame_rapidfirepistol) == 1)
{
new weapon = GetEventInt(event, "weapon");
new client = GetClientOfUserId(GetEventInt(event, "attacker"));
new weaponindex;
switch (weapon)
{
case 3, 4:
{
weaponindex = GetPlayerWeaponSlot(client, 1);
}
}
if (weaponindex != -1)
{
SetEntData(weaponindex, g_offset1rapid, 1000, 4, true);
SetEntData(weaponindex, g_offset2rapid, 2, 4, true);
}
}

if (GetConVarInt(g_gungame_rapidfirebazooka) == 1)
{
new weapon = GetEventInt(event, "weapon");
new client = GetClientOfUserId(GetEventInt(event, "attacker"));
new weaponindex;
switch (weapon)
{
case 17, 18:
{
weaponindex = GetPlayerWeaponSlot(client, 0);
}
}
if (weaponindex != -1)
{
new Float:curTime = GetGameTime();
SetEntData(weaponindex, g_offset1rapid, curTime + (GetConVarFloat(g_gungame_rapidfirebazdelay)), 4, true);
SetEntData(weaponindex, g_offset2rapid, 2, 4, true);
}
}

if(GetConVarInt(g_bazookashakeeffect) == 1)
{
new weaponid = GetEventInt(event, "weapon");
new client;
client = GetClientOfUserId(GetEventInt(event, "attacker"));
if ((weaponid == 17 || weaponid == 18) && (IsClientInGame(client)))
{
Shake(client, GetConVarFloat(g_bazookashakeeffect_amp), GetConVarFloat(g_bazookashakeeffect_dur));
}
}
}

public Action:DisplayMsgOn(Handle:timer, any:client)
{
if(IsPlayerValid(client))
{
PrintToChat(client, "%s%t", g_sPrefix, "spawnpromessageon");
}
return Plugin_Handled;
}

public Action:SpawnProtectOff(Handle:timer, any:client)
{
SpawnProtectTimer[client] = INVALID_HANDLE;
if(IsPlayerValid(client))
{
IsProtected[client] = false;
SetEntProp(client, Prop_Data, "m_takedamage", 2, 1);
SetEntityRenderColor(client);
if(GetConVarInt(SpawnProtectMsg) == 1)
{
PrintToChat(client, "%s%t", g_sPrefix, "spawnpromessageoff");
}
return Plugin_Handled;
}
return Plugin_Handled;
}

KillSpawnProtTimer(client)
{
IsProtected[client] = false;
if(SpawnProtectTimer[client] != INVALID_HANDLE)
{
CloseHandle(SpawnProtectTimer[client]);
}
SpawnProtectTimer[client] = INVALID_HANDLE;
}

bool:IsPlayerValid(client)
{
if(IsClientInGame(client) && IsPlayerAlive(client) && GetClientTeam(client) > 1)
{
return true;
}
return false;
}


stock Shake(client, Float:flAmplitude, Float:flDuration)
{
new Handle:hBf = StartMessageOne("Shake", client);
if(hBf != INVALID_HANDLE)
{
BfWriteByte(hBf, 0);
BfWriteFloat(hBf, flAmplitude);
BfWriteFloat(hBf, 1.0);
BfWriteFloat(hBf, flDuration);
EndMessage();
}
}

RemoveFlagSound()
{
if (GetConVarInt(g_CPdisable) == 1)
{
static soundOffset;
new entity = -1;
while ((entity = FindEntityByClassname(entity, "ambient_generic")) != -1)
{
if (!soundOffset && (soundOffset = FindDataMapOffs(entity, "m_iszSound")) == -1)
{
LogError("Error: Unable to find datamap offset: \"m_iszSound\"!");
return;
}
decl String:sound[64];
GetEntDataString(entity, soundOffset, sound, sizeof(sound));
if (StrEqual(sound, FlagSnd))
{
AcceptEntityInput(entity, "Kill");
}
}
}
}

public Action:HookFlagSound(String:sample[PLATFORM_MAX_PATH], &entity, &Float:volume, &level, &pitch, Float:pos[3], &flags, &Float:delay)
{
if(StrEqual(sample, FlagSnd))
{
return Plugin_Stop;
}
return Plugin_Continue;
}

stock DoubleJump(const any:client)
{
new fCurFlags = GetEntityFlags(client), fCurButtons = GetClientButtons(client);
if (g_fLastFlags[client] & FL_ONGROUND)
{
if (!(fCurFlags & FL_ONGROUND) && !(g_fLastButtons[client] & IN_JUMP) && fCurButtons & IN_JUMP)
{
OriginalJump(client);
}
}
else if (fCurFlags & FL_ONGROUND)
{
Landed(client);
}
else if (!(g_fLastButtons[client] & IN_JUMP) && fCurButtons & IN_JUMP)
{
ReJump(client);
}
g_fLastFlags[client] = fCurFlags;
g_fLastButtons[client] = fCurButtons;
}

stock OriginalJump(const any:client)
{
g_iJumps[client]++;
}

stock Landed(const any:client)
{
g_iJumps[client] = 0;
}

stock ReJump(const any:client)
{
if ( 1 <= g_iJumps[client] <= g_iJumpMax)
{
g_iJumps[client]++;
decl Float:vVel[3];
GetEntPropVector(client, Prop_Data, "m_vecVelocity", vVel);
vVel[2] = g_flBoost;
TeleportEntity(client, NULL_VECTOR, NULL_VECTOR, vVel);
}
}

public convar_ChangeBoost(Handle:convar, const String:oldVal[], const String:newVal[])
{
g_flBoost = StringToFloat(newVal);
}

public convar_ChangeEnable(Handle:convar, const String:oldVal[], const String:newVal[])
{
if (StringToInt(newVal) >= 1)
{
g_bDoubleJump = true;
}
else
{
g_bDoubleJump = false;
}
}

public convar_ChangeMax(Handle:convar, const String:oldVal[], const String:newVal[])
{
g_iJumpMax = StringToInt(newVal);
}

public Action:ShowGGHelp(client, args)
{
new String:URLtoWebsite[256];
GetConVarString(g_ShowGGHelp, URLtoWebsite, sizeof(URLtoWebsite));
ShowMOTDPanel(client, "GunGame Help Page", URLtoWebsite, MOTDPANEL_TYPE_URL);
}

public Action:ShowGGtop10(client, args)
{
if (GetConVarFloat(g_database_winner) == 1)
{
new String:URLtotopsite[256];
GetConVarString(g_database_website, URLtotopsite, sizeof(URLtotopsite));
ShowMOTDPanel(client, "GunGame Help Page", URLtotopsite, MOTDPANEL_TYPE_URL);
}
}

public OnPluginEnd()
{

}


loadconfig.sp


LoadConfig()
{
decl String:sPath[PLATFORM_MAX_PATH];
new Handle:hConfig          = CreateKeyValues("GunGame");
BuildPath(Path_SM, sPath, sizeof(sPath), "configs/gungame_sound.txt");
if (FileExists(sPath))
{
FileToKeyValues(hConfig, sPath);
KvRewind(hConfig);
KvJumpToKey(hConfig, "Sounds");
KvGetString(hConfig, "LevelUp",    g_sSoundLevelUp,    PLATFORM_MAX_PATH);
KvGetString(hConfig, "LevelDown",  g_sSoundLevelDown,  PLATFORM_MAX_PATH);
KvGetString(hConfig, "LevelSteal", g_sSoundLevelSteal, PLATFORM_MAX_PATH);
KvGetString(hConfig, "LevelLast", g_sSoundLevelLast,   PLATFORM_MAX_PATH);
KvGetString(hConfig, "vote",        g_sSoundvote,      PLATFORM_MAX_PATH);
KvGetString(hConfig, "hunteryou",        g_sSoundHunterYou,      PLATFORM_MAX_PATH);
KvGetString(hConfig, "hunterhere",        g_sSoundHunterHere,      PLATFORM_MAX_PATH);
KvGetString(hConfig, "termyou",        g_sSoundTermYou,      PLATFORM_MAX_PATH);
KvGetString(hConfig, "termhere",        g_sSoundTermHere,      PLATFORM_MAX_PATH);

if (!StrEqual(g_sSoundLevelUp,    ""))
{
LoadSound(g_sSoundLevelUp);
}
if (!StrEqual(g_sSoundLevelDown,  ""))
{
LoadSound(g_sSoundLevelDown);
}
if (!StrEqual(g_sSoundLevelSteal, ""))
{
LoadSound(g_sSoundLevelSteal);
}
if (!StrEqual(g_sSoundLevelLast, ""))
{
LoadSound(g_sSoundLevelLast);
}
if (!StrEqual(g_sSoundvote,        ""))
{
LoadSound(g_sSoundvote);
}
if (!StrEqual(g_sSoundHunterYou,        ""))
{
LoadSound(g_sSoundHunterYou);
}
if (!StrEqual(g_sSoundHunterHere,        ""))
{
LoadSound(g_sSoundHunterHere);
}
if (!StrEqual(g_sSoundTermYou,        ""))
{
LoadSound(g_sSoundTermYou);
}
if (!StrEqual(g_sSoundTermHere,        ""))
{
LoadSound(g_sSoundTermHere);
}
}
else
{
SetFailState("File Not Found: %s", sPath);
}
CloseHandle(hConfig);
}

LoadConfig2()
{
decl String:sLevel[4], String:sPath[PLATFORM_MAX_PATH], String:sWeapon[16],
String:sWeapons[22][16] = {"colt", "p38", "c96", "garand", "k98", "k98_scoped", "m1carbine", "spring", "thompson", "mp40", "mp44", "bar", "30cal", "mg42", "bazooka", "pschreck", "frag_us", "frag_ger", "smoke_us", "smoke_ger", "riflegren_us", "riflegren_ger"};

new  iLevel = 1,
iOffsets[22] = { 4, 8, 12, 16, 20, 20, 24, 28, 32, 32, 32, 36, 40, 44, 48, 48, 52, 56, 68, 72, 84, 88},
Handle:hConfig          = CreateKeyValues("GunGame");
if (GetConVarInt(g_gungame_custom_on) == 0)
{
BuildPath(Path_SM, sPath, sizeof(sPath), "configs/gungame.txt");
}
if (GetConVarInt(g_gungame_custom_on) == 1)
{
BuildPath(Path_SM, sPath, sizeof(sPath), "configs/gungame_spade.txt");
}
if (GetConVarInt(g_gungame_custom_on) == 2)
{
BuildPath(Path_SM, sPath, sizeof(sPath), "configs/gungame_custom.txt");
}
if (FileExists(sPath))
{
for (new i = 0; i < sizeof(g_sWeapon); i++)
{
g_iAmmo[i]   = g_iOffset;
g_sWeapon[i] = "";
}
FileToKeyValues(hConfig, sPath);
KvJumpToKey(hConfig, "Levels");
KvGetString(hConfig, "1", sWeapon, sizeof(sWeapon));

while (!StrEqual(sWeapon, ""))
{
g_sWeapon[iLevel] = sWeapon;

IntToString(++iLevel, sLevel, sizeof(sLevel));
KvGetString(hConfig,  sLevel, sWeapon, sizeof(sWeapon));
}
KvRewind(hConfig);
g_iLevels  = --iLevel;
for (new i = 1, j; i <= g_iLevels; i++)
{
for (j   = 0; j < sizeof(sWeapons); j++)
{
if (StrEqual(g_sWeapon[i], sWeapons[j]))
{
g_iAmmo[i] += iOffsets[j];
break;
}
}
}
}
else
{
SetFailState("File Not Found: %s", sPath);
}
CloseHandle(hConfig);
}

LoadSound(const String:sFile[])
{
decl String:sPath[PLATFORM_MAX_PATH];
Format(sPath, sizeof(sPath), "sound/%s", sFile);
PrecacheSound(sFile, true);
AddFileToDownloadsTable(sPath);
// OVERLAY
for(new i = 0; i < 2; i++)
{
AddFileToDownloadsTable(ggOverlayFile[i]);
if(!IsModelPrecached(ggOverlayFile[i]))
{
PrecacheModel(ggOverlayFile[i], true);
}
}
for(new i = 0; i < 2; i++)
{
AddFileToDownloadsTable(ggOverlayFile_lost[i]);
if(!IsModelPrecached(ggOverlayFile_lost[i]))
{
PrecacheModel(ggOverlayFile_lost[i], true);
}
}
for(new i = 0; i < 2; i++)
{
AddFileToDownloadsTable(ggOverlayFile_lostteamkill[i]);
if(!IsModelPrecached(ggOverlayFile_lostteamkill[i]))
{
PrecacheModel(ggOverlayFile_lostteamkill[i], true);
}
}
for(new i = 0; i < 2; i++)
{
AddFileToDownloadsTable(ggOverlayFile_lostteamkillspade[i]);
if(!IsModelPrecached(ggOverlayFile_lostteamkillspade[i]))
{
PrecacheModel(ggOverlayFile_lostteamkillspade[i], true);
}
}
for(new i = 0; i < 2; i++)
{
AddFileToDownloadsTable(ggOverlayFile_lostsuicide[i]);
if(!IsModelPrecached(ggOverlayFile_lostsuicide[i]))
{
PrecacheModel(ggOverlayFile_lostsuicide[i], true);
}
}
for(new i = 0; i < 2; i++)
{
AddFileToDownloadsTable(ggOverlayFile_teamkill_spade[i]);
if(!IsModelPrecached(ggOverlayFile_teamkill_spade[i]))
{
PrecacheModel(ggOverlayFile_teamkill_spade[i], true);
}
}
for(new i = 0; i < 2; i++)
{
AddFileToDownloadsTable(ggOverlayFile_LevelUp[i]);
if(!IsModelPrecached(ggOverlayFile_LevelUp[i]))
{
PrecacheModel(ggOverlayFile_LevelUp[i], true);
}
}
for(new i = 0; i < 2; i++)
{
AddFileToDownloadsTable(ggOverlayFile_LevelSteal[i]);
if(!IsModelPrecached(ggOverlayFile_LevelSteal[i]))
{
PrecacheModel(ggOverlayFile_LevelSteal[i], true);
}
}
// SUPERMAN
AddFileToDownloadsTable("models/player/baronettes/superman.dx80.vtx");
AddFileToDownloadsTable("models/player/baronettes/superman.dx90.vtx");
AddFileToDownloadsTable("models/player/baronettes/superman.mdl");
AddFileToDownloadsTable("models/player/baronettes/superman.phy");
AddFileToDownloadsTable("models/player/baronettes/superman.sw.vtx");
AddFileToDownloadsTable("models/player/baronettes/superman.vvd");
AddFileToDownloadsTable("materials/models/player/baronettes/superman_suit.vmt");
AddFileToDownloadsTable("materials/models/player/baronettes/superman_suit.vtf");
AddFileToDownloadsTable("materials/models/player/baronettes/superman_suit_n.vtf");
PrecacheModel(SUPERMAN_MDL , true);

// HUNTER
AddFileToDownloadsTable("models/player/monster/hunter/hunter.dx80.vtx");
AddFileToDownloadsTable("models/player/monster/hunter/hunter.dx90.vtx");
AddFileToDownloadsTable("models/player/monster/hunter/hunter.mdl");
AddFileToDownloadsTable("models/player/monster/hunter/hunter.phy");
AddFileToDownloadsTable("models/player/monster/hunter/hunter.sw.vtx");
AddFileToDownloadsTable("models/player/monster/hunter/hunter.vvd");
AddFileToDownloadsTable("materials/models/player/monster/hunter/hunter.vmt");
AddFileToDownloadsTable("materials/models/player/monster/hunter/hunter.vtf");
AddFileToDownloadsTable("materials/models/player/monster/hunter/hunter_n.vtf");
PrecacheModel(HUNTER_MDL , true);

// TERMINATOR
AddFileToDownloadsTable("models/player/monster/terminator/terminator.dx80.vtx");
AddFileToDownloadsTable("models/player/monster/terminator/terminator.dx90.vtx");
AddFileToDownloadsTable("models/player/monster/terminator/terminator.mdl");
AddFileToDownloadsTable("models/player/monster/terminator/terminator.phy");
AddFileToDownloadsTable("models/player/monster/terminator/terminator.sw.vtx");
AddFileToDownloadsTable("models/player/monster/terminator/terminator.vvd");
AddFileToDownloadsTable("materials/models/player/monster/terminator/tbody.vmt");
AddFileToDownloadsTable("materials/models/player/monster/terminator/tbody.vtf");
AddFileToDownloadsTable("materials/models/player/monster/terminator/tbody_n.vtf");
AddFileToDownloadsTable("materials/models/player/monster/terminator/thead.vmt");
AddFileToDownloadsTable("materials/models/player/monster/terminator/thead.vtf");
AddFileToDownloadsTable("materials/models/player/monster/terminator/thead_n.vtf");
PrecacheModel(TERMINATOR_MDL , true);
}


pluginstart.sp


public OnPluginStart()
{
CreateConVar("sm_gungame_version", PLUGIN_VERSION, "DoD:S GunGame for SourceMod", FCVAR_PLUGIN | FCVAR_REPLICATED | FCVAR_NOTIFY | FCVAR_DONTRECORD);
g_hEnabled  = CreateConVar("sm_gungame_enabled",  "1", "Enable(1)/disable(0) DoD:S GunGame", FCVAR_PLUGIN);
g_hHandicap = CreateConVar("sm_gungame_handicap", "0", "Enable(1)/disable(0) Handicap mode (gives players the average level of all other players when they join)", FCVAR_PLUGIN);
g_bonustime    = CreateConVar("sm_gungame_bonustime",    "15", "Length of Bonusround", FCVAR_PLUGIN, true, 10.0, true, 60.0);
g_bonustimekill    = CreateConVar("sm_gungame_bonustimekill",    "1", "Enable/Disable Kills during bonusround", FCVAR_PLUGIN);
g_nades    = CreateConVar("sm_gungame_maxnades",    "10", "How many frag grenades that are allowed", FCVAR_PLUGIN, true, 1.0, true, 99.0);
g_runspeedspade = CreateConVar("sm_gungame_spadespeed",    "0", "Enable(1) permanent Speed when holding the Spade", FCVAR_PLUGIN);
g_runspeedspadespeed = CreateConVar("sm_gungame_spadespeed_var",    "1.0", "Speed when SpadeSpeed is enabled", FCVAR_PLUGIN, true, 0.8, true, 1.4);
g_runspeed    = CreateConVar("sm_gungame_meleespeed",    "1.2", "Speed for spade/knife level for permanent run", FCVAR_PLUGIN, true, 0.7, true, 3.0);
g_runspeed2    = CreateConVar("sm_gungame_roundendspeed",    "1.2", "Speed of player when the round has ended", FCVAR_PLUGIN, true, 0.5, true, 3.0);
g_runcommand    = CreateConVar("sm_gungame_roundend_runcommand",    "sm_fireworks_start", "Command executed on gameEnd", FCVAR_PLUGIN, true, 0.0, true, 1.0);
g_spadeknifehealth = CreateConVar("sm_gungame_spadeknifehealth", "120", "Health on Spade/Knife Level", FCVAR_PLUGIN, true, 100.0, true, 160.0);
g_runvote    = CreateConVar("sm_gungame_vote_runcommand",    "sm_mapvote", "Vote Map Command executed on gameEnd", FCVAR_PLUGIN, true, 0.0, true, 1.0);
g_runvoteenable    = CreateConVar("sm_gungame_votegame_end",    "0", "Enable/disable Vote Command on GameEnd", FCVAR_PLUGIN);
g_bonustimevote   = CreateConVar("sm_gungame_votegame_end_bonustime",    "45", "Length of Bonusround when GameEnd Vote is enabled", FCVAR_PLUGIN, true, 25.0, true, 60.0);
g_votebeforeend    = CreateConVar("sm_gungame_votebeforeend",    "1", "Enable/disable Vote X weapons before last level", FCVAR_PLUGIN);
g_votebeforeendlevel    = CreateConVar("sm_gungame_votebeforeend_levels",    "4", "Vote how many weapons before last level", FCVAR_PLUGIN, true, 1.0, true, 7.0);
g_votesoundfile    = CreateConVar("sm_gungame_votesoundfile",    "1", "Enable/disable Vote Sound when Vote starts", FCVAR_PLUGIN);
g_lastlevelcenterinfo    = CreateConVar("sm_gungame_lastlevelcenterinfo",    "1", "Enable/disable Prints a message on screen center when a player reaches last level", FCVAR_PLUGIN);
g_SpecLockGG    = CreateConVar("sm_gungame_speclock",    "1", "Enable/disable Spectator locked during Bonusround", FCVAR_PLUGIN);
g_TeamLockGG    = CreateConVar("sm_gungame_teamlock",    "1", "Enable/disable autojoin class when selected a Team", FCVAR_PLUGIN);
g_CPdisable = CreateConVar("sm_gungame_cpdisable",   "1", "Enable(0)/Disable(1) Control Point Icons, Flags and FlagSound", FCVAR_PLUGIN);
g_NadeLaserEffect = CreateConVar("sm_gungame_nadelasereffect",   "1", "Enable/disable Laser effect on Nades", FCVAR_PLUGIN);
SpawnProtectOn = CreateConVar("sm_gungame_spawnprotect", "1", " Enable/disable protecting players after spawning", FCVAR_PLUGIN);
SpawnProtectTime = CreateConVar("sm_gungame_spawnprotect_time", "3", "Time in seconds to prevent players from taking damage after spawning.", FCVAR_PLUGIN, true, 2.0, true, 10.0);
SpawnProtectMsg = CreateConVar("sm_gungame_spawnprotect_message", "1", "Enable/disable displaying SpawnProt messages", FCVAR_PLUGIN);
g_TeamWallRemoveGame = CreateConVar("sm_gungame_teamwallremove_game", "0", "Enable/disable removing func_team_walls during Game", FCVAR_PLUGIN);
g_TeamWallRemoveGameEnd = CreateConVar("sm_gungame_teamwallremove_gameend", "1", "Enable/disable removing func_team_walls during Bonusround", FCVAR_PLUGIN);
g_bazookashakeeffect = CreateConVar("sm_gungame_bazooka_shake_effect", "1", "Enable/disable the Bazooka shake effect", FCVAR_PLUGIN);
g_bazookashakeeffect_amp = CreateConVar("sm_gungame_bazooka_shake_effect_amp", "8.0", "Amplitude for the Bazooka shake effect", FCVAR_PLUGIN, true, 5.0, true, 30.0);
g_bazookashakeeffect_dur = CreateConVar("sm_gungame_bazooka_shake_effect_dur", "1.0", "Duration for the Bazooka shake effect", FCVAR_PLUGIN, true, 1.0, true, 4.0);
g_gungame_custom_on = CreateConVar("sm_gungame_custom", "0", "!! YOU MUST DELETE THESE CONVAR FROM THE CONFIG FILE !! ", FCVAR_PLUGIN | FCVAR_DONTRECORD);
g_gungame_customtext1 = CreateConVar("sm_gungame_custom_text1", "SPADE ONLY VERSION ENABLED", "set the text you want to print on centerscreen on custom weaponlist 1", FCVAR_PLUGIN);
g_gungame_customtext2 = CreateConVar("sm_gungame_custom_text2", "CUSTOM WEAPON LIST LOADED", "set the text you want to print on centerscreen on custom weaponlist 2", FCVAR_PLUGIN);
g_gungame_rapidfirebazooka = CreateConVar("sm_gungame_rapidfirebazooka", "1", "disable(0) / enable(1) Rapid Fire with the Rocket Launchers", FCVAR_PLUGIN);
g_gungame_rapidfirebazdelay = CreateConVar("sm_gungame_rapidfirebazooka_delay", "3", "Time between the shots of the Rocket Launchers", FCVAR_PLUGIN, true, 1.0, true, 15.0);
g_gungame_rapidfirepistol = CreateConVar("sm_gungame_rapidfirepistol", "1", "disable(0) / enable(1) Rapid Fire with the P38/Colt", FCVAR_PLUGIN);
g_cvJumpEnable = CreateConVar("sm_gungame_doublejump_enabled", "1", "disable(0) / enable(1) double-jumping on Spade/Knife",FCVAR_PLUGIN);
g_cvJumpBoost = CreateConVar("sm_gungame_doublejump_boost", "280.0", "The amount of vertical boost to apply to double jumps",FCVAR_PLUGIN, true, 260.0, true, 350.0);
g_cvJumpMax = CreateConVar("sm_gungame_doublejump_max", "1", "The maximum number of re-jumps allowed while already jumping",FCVAR_PLUGIN, true, 1.0, true, 5.0);
g_gungame_punishment = CreateConVar("sm_gungame_punishment",  "4", "Type of team kill punishment. (0 = Disabled, 1 = Level loss, 2 = Give spade, 3 = Give Spade & Level loss, 4 = Give Spade & Give Health, 5 = Give Spade & Give Health & Level loss)", FCVAR_PLUGIN);
g_ShowGGHelp = CreateConVar("sm_gungame_helpurl", "http://your-website-here/gghelp.html", "URL to the GG Help html file", FCVAR_PLUGIN);
g_gungame_winjoinsound = CreateConVar("sm_gungame_sounds",  "3", "Enable Join and Win Sounds. (0 = Disabled, 1 = Enable Joinsounds, 2 = Enable Winsounds, 3 = Enable Joinsounds & Winsounds)", FCVAR_PLUGIN);
g_overlaytime = CreateConVar("sm_gungame_endoverlay_time",  "15", "Time in Seconds for Round End Overlay - must be lower then Bonusroundtime", FCVAR_PLUGIN, true, 0.0, true, 60.0);
g_overlaytyp = CreateConVar("sm_gungame_endoverlay_typ",  "1", "Typ of RoundEnd Overlay: 0 = Disabled, 1 = Black/White screen, 2 = overlay Image", FCVAR_PLUGIN);
g_superman = CreateConVar("sm_gungame_model_superman",  "1", "disable(0) / enable(1) Superman Model for Winner", FCVAR_PLUGIN);
g_hunter = CreateConVar("sm_gungame_model_hunter",  "1", "disable(0) / enable(1) Hunter 2 times random in Game", FCVAR_PLUGIN);
g_terminator = CreateConVar("sm_gungame_model_terminator",  "1", "disable(0) / enable(1) Terminator 1 time random in Game", FCVAR_PLUGIN);
g_terminatorlaseraimcvar = CreateConVar("sm_gungame_model_terminator_laseraim",  "1", "disable(0) / enable(1) Terminator Laser Aim", FCVAR_PLUGIN);
g_hunter_health = CreateConVar("sm_gungame_modelhunter_health",  "200", "Health for Hunter", FCVAR_PLUGIN, true, 150.0, true, 300.0);
g_terminator_health = CreateConVar("sm_gungame_modelterminator_health",  "300", "Health for Terminator", FCVAR_PLUGIN, true, 150.0, true, 900.0);
g_database_winner = CreateConVar("sm_gungame_database_winner", "0", "Disable(0)/Enable(1) storing GG Winner into SQL Database - you must setup your sourcemod database.cfg!!", FCVAR_PLUGIN);
g_database_website = CreateConVar("sm_gungame_database_web", "http://your-website-here/gghelp.html", "URL to the GG TOP 10 Page", FCVAR_PLUGIN);
g_healthONlevelupvar = CreateConVar("sm_gungame_health_on_levelup_var", "5", "how much Health a player gets when leveling up(only when he is lower then 100 minus this variable) 0 = OFF ", FCVAR_PLUGIN, true, 5.0, true, 50.0);


HookEventEx("player_spawn", OnPlayerSpawn, EventHookMode_Post);
g_iClip     = FindSendPropInfo("CBaseCombatWeapon", "m_iClip1");
g_iOffset   = FindSendPropInfo("CDODPlayer",       "m_iAmmo");
HookConVarChange(g_hEnabled, ConVarChange_Enabled);
HookEvent("dod_round_start", Event_RoundStart);
HookEvent("player_death",    Event_PlayerDeath);
HookEvent("player_spawn",    Event_PlayerSpawn);
HookEvent("dod_stats_weapon_attack", Event_DodStatsWeaponAttack);
HookEvent("player_team",     Event_PlayerTeam, EventHookMode_Post);
RegConsoleCmd("drop", Command_Drop, "Block weapons from being dropped in DoD:S GunGame.");
RegConsoleCmd("gghelp", ShowGGHelp);
RegConsoleCmd("ggtop", ShowGGtop10);
AutoExecConfig(true, "dod_gungame_config_full", "dod_gungame_config");
LoadTranslations("dod_gungame.phrases");
AddAmbientSoundHook(AmbientSHook:HookFlagSound);
HookConVarChange(g_cvJumpBoost, convar_ChangeBoost);
HookConVarChange(g_cvJumpEnable, convar_ChangeEnable);
HookConVarChange(g_cvJumpMax, convar_ChangeMax);
g_bDoubleJump = GetConVarBool(g_cvJumpEnable);
g_flBoost = GetConVarFloat(g_cvJumpBoost);
g_iJumpMax = GetConVarInt(g_cvJumpMax);
soundfilesjoin = CreateArray(PLATFORM_MAX_PATH+1);
soundfileswin = CreateArray(PLATFORM_MAX_PATH+1);
}


Te he dejado copiado el codigo por si no encuentras los archivos que te digo y prefieres copiarlos a archivos de texto y luego renombrarlos a .sp

Ya solo queda crear las variables para el modo bazooka en el codigo de cada archivo y compilarlos creando asi un nuevo archivo gungame.smx que sera el nuevo plugin. Una vez compilado y creado ese archivo, lo copias y sobreescribes el archivo existente en el servidor. Ojo, si esta mal compilado o mal programado el plugin, el server no funcionará. Asi que te recomiendo que crees un servidor local para hacer las pruebas antes de subir los archivos al servidor.

Para compilar los archivos necesitaras un compilador. En el mismo directorio de los scripts tienes uno. Se llama compile.sh. Es un compilador basado en linux asi que tendras que tener linux instalado para poder ejecutarlo. Puedes crearte un sistema linux con una maquina virtual. VMware funciona muy bien. Instalarte un sistema operativo Linux en una particion del disco duro, no te lo recomiendo. Tambien puedes buscar un compilador de scripts sp que funcione en windows pero ya ahi no se decirte, tendras que buscar en google y tener suerte de que sea compatible 100% a la hora de compilar, si no el archivo gungame.smx que te creará será erroneo. Hay compiladores que funcionan online pero en este caso no sirve ya que hay que compilar tomando codigos de distintos archivos y los compiladores online solo compilan un solo archivo. En esta parte del codigo del archivo gungame.sp es donde dice todos los archivos que usará al compilar (las cadenas que usan #include):


#pragma semicolon 1
#include <sourcemod>
#include <sdktools>
#include <sdkhooks>
#include <dodhooks>
#define ALLIES 2
#define AXIS 3
#define PLUGIN_VERSION "3.3"

static const String:g_szGrenadeTypes[][] = {"grenade_frag_us","grenade_frag_ger"};
static const String:g_szObjectives[][] = {"dod_bomb_target","dod_capture_area"};
static const String:g_szTeamWalls[][] = {"func_team_wall","func_teamblocker"};

public Plugin:myinfo = {
name        = "DoD:S GunGame",
author      = "Darkranger (orig. by Tsunami), Feuersturm, Andersso and others",
description = "DoD:S GunGame for SourceMod",
version     = PLUGIN_VERSION,
url         = "http://dodsplugins.com"
}

#include "gungame\database.sp"
#include "gungame\init.sp"
#include "gungame\pluginstart.sp"
//#include "gungame\gamedesc.sp" // works only with sdkhooks 2.1hg147 and lower !!!
#include "gungame\eventshutdown.sp"
#include "gungame\loadconfig.sp"
#include "gungame\mapend.sp"
#include "gungame\no_weapon_check.sp"


Las variables para crear el modo bazooka tienes que deducirlas del codigo existente. No me preguntes como se hace porque ni yo mismo lo se. Hay que analizar el codigo y deducirlo. La otra vez que lo hice yo, el codigo del gungame era la version 4.3 y este codigo de gungame esta en la version 5.9 asi que la estructura del codigo ha cambiado.

Puedes investigar mas en las webs:

https://forums.alliedmods.net/
http://www.sourcemod.net/

Si tienes dudas puedes preguntar en esos foros a ver si alguien te responde. Eso si, todo en ingles, por lo que te sera de gran utilidad esta otra web:

https://translate.google.es/

Bueno, pues ya sabes como se hace el modo bazooka sin sacrificar el modo de solo a pala o el modo sniper. Suerte y al lío.

mascotafumeta

por cierto para cuando estara el comando !rates activo para los no admins???'

ya que lo pregunte antes de verano y se me dijo que se estaba viendo para ponerlo


un saludo

ShUmAkEr

No se va a poner porque ya para eso esta el HLstatsX.

Comandos disponibles Ingame:

• hlx_menu = HLstatsX Ingame Menu
• rank [skill, points, place (to all)] = Current position
• kpd [kdratio, kdeath (to all)] = Total player statistics
• session [session_data (to all)] = Current session statistics
• next = Players ahead in the ranking.
• hlx_auto clear|start|end|kill command = Auto-Command on specific event (on death, roundstart, roundend)
• hlx_display 0|1 = Enable or disable displaying console events.
• hlx_chat 0|1 = Enable or disable the displaying of global chat events (if enabled).
• load = Statistics from all servers
• status = Current server status
• servers = List of all participating servers
• top20 [top5, top10] = Top-Players
• clans = Clan ranking
• cheaters = Banned players from Valve-Anti-Cheat
• statsme = Statistic summary
• weapons [weapon] = Weapons usage
• accuracy = Weapons accuracy
• targets [target] = Targets hit positions
• kills [kill, player_kills] = Kill statistics (5 or more kills)
• actions [action] = Server actions summary
• help [cmd, cmds, commands] = Help screen