Don't compling....
PHP Code:
#include <sourcemod>
#include <sdktools>
#include <sdktools_sound>
#include <sdkhooks>
#include <cstrike>
#include <hosties>
#include <lastrequest>
#include <emitsoundany>
#include <smartjaildoors>
#include <hosties>
#include <franug_jb>
#include <simon>
new bool:FD[MAXPLAYERS+1];
int g_FreezeTime[MAXPLAYERS+1] = { 0, ... };
new Handle:sm_hosties_lr = INVALID_HANDLE
new bool:g_bCommandUsedDay[MAXPLAYERS+1];
new bool:g_bCommandUsedDayU[MAXPLAYERS+1];
new bool:g_bCommandUsedDayG[MAXPLAYERS+1];
new bool:g_bCommandUsedDayZom[MAXPLAYERS+1];
new bool:g_bCommandUsedExt[MAXPLAYERS+1];
new bool:g_bCommandUsedBox[MAXPLAYERS+1];
new bool:g_bCommandUsedStopB[MAXPLAYERS+1];
new bool:g_bCommandUsedBCount[MAXPLAYERS+1];
bool istheresimon = false;
bool issimon[MAXPLAYERS + 1] = false;
new Rounds;
new TimerCount;
new Handle:g_cVar_mnotes = INVALID_HANDLE;
new Handle:g_fward_onBecome = INVALID_HANDLE;
new Handle:g_fward_onRemove = INVALID_HANDLE;
new Handle:g_fward_onGive = INVALID_HANDLE;
public Plugin myinfo = {
name = "!Simon",
author = "fita",
description = "Simon Plugin",
version = "1.0",
url = ""
};
public void OnPluginStart()
{
RegConsoleCmd("sm_simon", Command_capitan, "Devii Simon.");
RegConsoleCmd("sm_leavesimon", Command_LeaveSimon, "Renunti la simon.");
RegConsoleCmd("sm_simonmenu", Command_SimonMenu, "Simon Menu");
RegConsoleCmd("sm_menu", Command_SimonMenu, "Simon Menu");
RegConsoleCmd("sm_box", Command_box, "BOX")
RegConsoleCmd("sm_stopbox", Command_stopbox, "STOPBOX")
RegConsoleCmd("sm_open", Command_open, "Open Cells")
RegConsoleCmd("sm_close", Command_close, "Close Cells")
HookEvent("round_start", round_start);
HookEvent("player_death", playerDeath);
HookEvent("player_spawn", player_spawn);
RegAdminCmd("sm_givesimon", Command_GiveSimon, ADMFLAG_BAN);
RegAdminCmd("sm_givefd", Command_GiveFreeday, ADMFLAG_BAN);
g_fward_onGive = CreateGlobalForward("warden_OnWardenGived", ET_Ignore, Param_Cell);
}
public APLRes:AskPluginLoad2(Handle:myself, bool:late, String:error[], err_max)
{
CreateNative("JB_GiveFD", Native_DarFD);
CreateNative("JB_GetFD", Native_ObtenerFD);
RegPluginLibrary("simon");
CreateNative("Simon_IsSimon", Native_IsSimon);
return APLRes_Success;
}
public int Native_IsSimon(Handle plugin, int numParams)
{
int client = GetNativeCell(1);
if(!IsClientInGame(client) || !IsPlayerAlive(client))
{
return ThrowNativeError(23, "[JailBreak]Client %d is not in the game or not alive.", client)
}
if(issimon[client])
return true;
else
return false;
}
public OnMapStart()
{
AddFileToDownloadsTable("sound/misc/boxding.mp3");
PrecacheSoundAny("misc/boxding.mp3");
AddFileToDownloadsTable("sound/misc/ding.mp3");
PrecacheSoundAny("misc/ding.mp3");
AddFileToDownloadsTable("sound/misc/rebelfk.mp3");
PrecacheSoundAny("misc/rebelfk.mp3");
AddFileToDownloadsTable("sound/misc/rebeldead.mp3");
PrecacheSoundAny("misc/rebeldead.mp3");
Rounds = 0;
}
public OnAvailableLR(Announced)
{
ServerCommand("mp_teammates_are_enemies 0");
ServerCommand("sm_godjb1337 @ct 0");
ServerCommand("sm_mortal1337 @ct");
}
public Action:Round_End(Handle:event, const String:name[], bool:dB)
{
ServerCommand("mp_teammates_are_enemies 0");
ServerCommand("sm_godjb1337 @ct 0");
ServerCommand("sm_mortal1337 @ct");
ServerCommand("sm_cvar sm_hosties_lr 1");
}
public Action round_start(Handle event , const String:name[] , bool dontBroadcast)
{
int client = GetClientOfUserId(GetEventInt(event, "userid"));
ServerCommand("sm_cvar sm_hosties_lr 1");
new tcount = GetTeamClientCount(CS_TEAM_T);
ServerCommand("mp_teammates_are_enemies 0");
ServerCommand("sm_godjb1337 @ct 0");
ServerCommand("sm_mortal1337 @ct");
for (int i = 1; i<=MaxClients; i++)
{
g_bCommandUsedBCount[i] = true;
g_bCommandUsedDayU[i] = false;
g_bCommandUsedDayG[i] = false;
g_bCommandUsedDayZom[i] = false;
g_bCommandUsedExt[i] = false;
if (tcount <= 4)
{
g_bCommandUsedBCount[i] = false;
}
if(Rounds != 3)
{
Rounds++
}
if (Rounds == 3)
{
g_bCommandUsedDay[i] = false;
Rounds = 0;
}
if(issimon[i] && istheresimon)
{
issimon[i] = false;
istheresimon = false;
CS_SetClientClanTag(i, "");
ServerCommand("sm plugins reload togsclantags");
}
}
// Format(RondaActual, sizeof(RondaActual), "none");
for (new i = 1; i < MaxClients; i++)
if(IsClientInGame(i))
{
FD[i] = false;
}
for (int i = 1; i<=MaxClients; i++)
{
if(IsClientInGame(i) && GetClientTeam(i) == 2) // Sets the T Team model
{
SDKUnhook(i, SDKHook_WeaponEquip, OnWeaponEquip);
PrecacheModel("models/player/custom_player/kuristaja/jailbreak/prisoner3/prisoner3.mdl");
SetEntityModel(i, "models/player/custom_player/kuristaja/jailbreak/prisoner3/prisoner3.mdl");
}
if(IsClientInGame(i) && GetClientTeam(i) == 3) // Sets the CT Team model
{
PrecacheModel("models/player/custom_player/kuristaja/jailbreak/guard3/guard3.mdl");
SetEntityModel(i, "models/player/custom_player/kuristaja/jailbreak/guard3/guard3.mdl");
}
}
}
public Action player_spawn(Handle event , const String:name[] , bool dontBroadcast)
{
int client = GetClientOfUserId(GetEventInt(event, "userid"));
if(IsClientInGame(client) && GetClientTeam(client) == 3 && issimon[client]) // Sets the Simon Team model
{
PrecacheModel("models/player/custom_player/kuristaja/slickman/slickman.mdl");
SetEntityModel(client, "models/player/custom_player/kuristaja/slickman/slickman.mdl");
CS_SetClientClanTag(client, "★ Simon ★");
}
else if(IsClientInGame(client) && GetClientTeam(client) == 3 && issimon[client]) // Sets the Simon Team model
{
PrecacheModel("models/player/custom_player/kuristaja/slickman/slickman.mdl");
SetEntityModel(client, "models/player/custom_player/kuristaja/slickman/slickman.mdl");
CS_SetClientClanTag(client, "★ Simon ★");
}
}
for (int i = 1; i<=MaxClients; i++)
{
if(IsClientInGame(i) && GetClientTeam(i) == 2) // Sets the T Team model
{
PrecacheModel("models/player/custom_player/kuristaja/jailbreak/prisoner3/prisoner3.mdl");
SetEntityModel(i, "models/player/custom_player/kuristaja/jailbreak/prisoner3/prisoner3.mdl");
}
}
for (int i = 1; i<=MaxClients; i++)
{
if(IsClientInGame(i) && GetClientTeam(i) == 2) // Sets the T Team model
{
if(g_bCommandUsedDayZom[i])
{
PrecacheModel("models/player/jbgosniperhero/zombie.mdl");
SetEntityModel(i, "models/player/jbgosniperhero/zombie.mdl");
SetEntityHealth(i, 4000);
}
}
}
}
public Action:Command_SimonMenu(client, args)
{
if(issimon[client])
{
Handle menu = CreateMenu(simonmenu, MENU_ACTIONS_ALL);
SetMenuTitle(menu, "Simon Menu");
AddMenuItem(menu, "opencell", "Open Cell Doors");
AddMenuItem(menu, "daysmenu", "Days Menu");
AddMenuItem(menu, "deliversimon", "Deliver Simon");
AddMenuItem(menu, "reviveplayer", "Revive a player");
AddMenuItem(menu, "fdplayer", "Freeday a player");
AddMenuItem(menu, "ding", "Ding");
AddMenuItem(menu, "spwnball", "Spawn Ball");
AddMenuItem(menu, "extendround", "Extend Round");
DisplayMenu(menu, client, MENU_TIME_FOREVER);
}
else
{
PrintToChat(client, "★ \x04[Jailbreak] Nu esti simon pentru simon menu !");
}
}
public int simonmenu(Menu menu, MenuAction action, int param1, int param2)
{
switch (action)
{
case MenuAction_Select:
{
//param1 is client, param2 is item
new String:item[64];
GetMenuItem(menu, param2, item, sizeof(item));
if (!issimon[param1] && !istheresimon && GetClientTeam(param1) == 2 && GetClientTeam(param1) == 1)
{
CloseHandle(menu);
}
else
{
if (StrEqual(item, "opencell"))
{
SJD_OpenDoors();
}
if (StrEqual(item, "daysmenu"))
{
if ((g_bCommandUsedDay[param1]))
{
PrintToChat(param1, "★ \x04[Jailbreak] Nu mai poti da un day decat peste 3 runde !");
}
else
{
DaysMenu(param1);
}
}
if (StrEqual(item, "deliversimon"))
{
DeliverSimon(param1);
}
else if (StrEqual(item, "reviveplayer"))
{
RevivePlayer(param1);
}
else if (StrEqual(item, "fdplayer"))
{
FDOne(param1);
}
else if (StrEqual(item, "ding"))
{
EmitSoundToAllAny("misc/ding.mp3");
}
else if (StrEqual(item, "spwnball"))
{
ClientCommand(param1, "sm_ball1337jb");
}
else if (StrEqual(item, "extendround"))
{
if (!g_bCommandUsedExt[param1])
{
ExtendRound(param1);
}
else
{
PrintToChat(param1, "★ \x04[Jailbreak] Nu mai poti da extend decat runda viitoare !");
}
}
}
}
//}
case MenuAction_End:
{
//param1 is MenuEnd reason, if canceled param2 is MenuCancel reason
CloseHandle(menu);
}
case MenuAction_DisplayItem:
{
//param1 is client, param2 is item
new String:item[64];
GetMenuItem(menu, param2, item, sizeof(item));
//if (StrEqual(item, "namecolor"))
//{
// new String:translation[128];
// Format(translation, sizeof(translation), "%T", "namecolor", param1);
// return RedrawMenuItem(translation);
//}
}
}
return 0;
}
public Action Command_open(client,args)
{
if(issimon[client] && GetClientTeam(client) == 3 && IsPlayerAlive(client))
{
SJD_OpenDoors();
}
else
{
ReplyToCommand(client, "★ \x04[Jailbreak] \x01Nu esti simon ca sa deschizi/inchizi celulele !");
}
return Plugin_Handled;
}
public Action Command_close(client,args)
{
if(issimon[client] && GetClientTeam(client) == 3 && !IsPlayerAlive(client))
{
SJD_CloseDoors();
}
else
{
ReplyToCommand(client, "★ \x04[Jailbreak] \x01Nu esti simon ca sa deschizi/inchizi celulele !");
}
return Plugin_Handled;
}
public Action Command_capitan(client,args)
{
if(istheresimon && !issimon[client])
{
ReplyToCommand(client, "★ \x04[Jailbreak] \x01Exista deja un simon!");
return Plugin_Handled;
}
if(issimon[client])
{
ReplyToCommand(client, "★ \x04[Jailbreak] \x01Esti deja simon !");
return Plugin_Handled;
}
else
{
if(!issimon[client] && !istheresimon && GetClientTeam(client) == 3 && IsPlayerAlive(client))
{
ClientCommand(client, "sm_simonmenu")
PrecacheModel("models/player/custom_player/kuristaja/slickman/slickman.mdl");
SetEntityModel(client, "models/player/custom_player/kuristaja/slickman/slickman.mdl");
ReplyToCommand(client, "★ \x04[Jailbreak] \x01Esti noul simon !");
PrintToChatAll("★ \x04[Jailbreak] \x02%N \x01este noul simon!", client);
CS_SetClientClanTag(client, "★ Simon ★");
issimon[client] = true;
istheresimon = true;
}
else
{
ReplyToCommand(client, "★ \x04[Jailbreak] Nu esti ct sau viu !");
}
}
return Plugin_Handled;
}
public Action Command_LeaveSimon(client, args)
{
if(issimon[client]) // The client is actually the current warden so lets proceed
{
PrintToChatAll("★ \x04[Jailbreak] \x01Simonul \x02%N \x01a demisionat!", client);
PrintCenterTextAll("Simonul %N a demisionat!", client);
PrintHintTextToAll("Simonul %N a demisionat!", client);
CS_SetClientClanTag(client, "");
ServerCommand("sm plugins reload togsclantags");
issimon[client] = false; // Open for a new warden
istheresimon = false;
PrecacheModel("models/player/custom_player/kuristaja/jailbreak/guard3/guard3.mdl");
SetEntityModel(client, "models/player/custom_player/kuristaja/jailbreak/guard3/guard3.mdl"); // Lets remove the awesome color
}
else // Fake dude!
{
PrintToChat(client, " \x04[Jailbreak] \x01Nu esti simon ca sa renunti la el.");
}
}
public Action:Command_box(client, args)
{
if(issimon[client] && IsPlayerAlive(client) && GetClientTeam(client) == 3)
{
if(!g_bCommandUsedBCount[client])
{
if(!g_bCommandUsedBox[client] && !g_bCommandUsedDayU[client])
{
g_bCommandUsedBox[client] = true;
ServerCommand("mp_teammates_are_enemies 1");
ServerCommand("sm_godjb1337 @ct 1");
EmitSoundToAllAny("misc/boxding.mp3");
for (int i = 1; i<=MaxClients; i++)
{
if(IsClientInGame(i) && GetClientTeam(i) == 2 && IsPlayerAlive(i)) // Sets the T Team model
{
SetEntityHealth(i, 100);
}
}
}
else
{
PrintToChat(client, "★ \x04[Jailbreak] Box in progres.");
}
}
else
{
PrintToChat(client ,"★ \x04[Jailbreak] Prea multi prizonieri !");
}
}
else
{
ReplyToCommand(client ,"★ \x04[Jailbreak] Nu esti simon, sau viu !");
}
return Plugin_Handled;
}
public Action:Command_stopbox(client, args)
{
if(issimon[client] && IsPlayerAlive(client) && GetClientTeam(client) == 3)
{
if(g_bCommandUsedBox[client])
{
g_bCommandUsedBox[client] = false;
ServerCommand("mp_teammates_are_enemies 0");
ServerCommand("sm_godjb1337 @ct 0");
ServerCommand("sm_mortal1337 @ct");
}
else
{
PrintToChat(client, "★ \x04[Jailbreak] Nici un box in progres.");
}
}
else
{
ReplyToCommand(client ,"★ \x04[Jailbreak] Nu esti simon, sau viu !");
}
return Plugin_Handled;
}
public Action:playerDeath(Handle:event, const String:name[], bool:dontBroadcast)
{
int client = GetClientOfUserId(GetEventInt(event, "userid")); // Get the dead clients id
new tcount = GetTeamClientCount(CS_TEAM_T);
if (tcount != 4)
{
tcount--
}
for (int i = 1; i<=MaxClients; i++)
{
g_bCommandUsedBox[i] = false;
if (tcount <= 4)
{
g_bCommandUsedBCount[i] = false;
}
}
if(issimon[client]) // Aww damn , he is the warden
{
PrintToChatAll("★ \x04[Jailbreak] \x01Simonul \x02%N \x01a murit.", client);
PrintCenterTextAll("Simonul %N a murit.", client);
PrintHintTextToAll("Simonul %N a murit.", client);
CS_SetClientClanTag(client, "");
ServerCommand("sm plugins reload togsclantags");
PrecacheModel("models/player/custom_player/kuristaja/jailbreak/guard3/guard3.mdl");
SetEntityModel(client, "models/player/custom_player/kuristaja/jailbreak/guard3/guard3.mdl"); // Lets give him the standard color back
issimon[client] = false; // Lets open for a new warden
istheresimon = false;
}
if(IsClientInGame(client) && GetClientTeam(client) == CS_TEAM_T && !g_bCommandUsedDayU && !g_bCommandUsedDayG) // Sets the T Team model
{
ServerCommand("mp_teammates_are_enemies 0");
ServerCommand("sm_godjb1337 @ct 0");
ServerCommand("sm_mortal1337 @ct");
}
}
public Action Command_GiveSimon(client, args)
{
if(args != 1)
{
ReplyToCommand(client, "★ \x04[JailBreak] \x01Usage: \x07sm_givesimon \x02<target>");
return Plugin_Handled;
}
char arg1[64];
GetCmdArg(1, arg1, sizeof(arg1));
int target = FindTarget(client, arg1, true, true); //Find the target(no bots, no immunity check)
if(GetClientTeam(target) == 3 && IsPlayerAlive(target))
{
istheresimon = false
ClientCommand(target, "sm_simonmenu")
PrintToChatAll("★ \x04[Jailbreak] \x02%N i-a dat simon lui \x02%N!", client, target);
PrintCenterTextAll("%N i-a dat simon lui %N!", client, target);
PrintHintTextToAll("%N i-a dat simon lui %N!", client, target);
PrecacheModel("models/player/custom_player/kuristaja/slickman/slickman.mdl");
SetEntityModel(target, "models/player/custom_player/kuristaja/slickman/slickman.mdl");
AddFileToDownloadsTable("models/player/custom_player/kuristaja/slickman/slickman.mdl");
CS_SetClientClanTag(target, "★ Simon ★");
issimon[target] = true;
istheresimon = true;
Forward_OnWardenGived(target);
}
else
{
ReplyToCommand(client, "★ \x04[JailBreak] Playerul nu este ct sau viu !");
}
return Plugin_Handled;
}
public Action Command_GiveFreeday(client, args)
{
if(args != 1)
{
ReplyToCommand(client, "★ \x04[JailBreak] \x01Usage: \x07sm_givefreeday \x02<target>");
return Plugin_Handled;
}
char arg1[64];
GetCmdArg(1, arg1, sizeof(arg1));
int target = FindTarget(client, arg1, true, true); //Find the target(no bots, no immunity check)
if(IsPlayerAlive(target) && GetClientTeam(target) == 2 && !JB_GetFD(target))
{
PrintToChatAll("★ \x04[Jailbreak] Admin \x02%N i-a dat FreeDay lui \x02%N!", client, target);
PrecacheModel("models/player/prisoner/prisoner_new.mdl");
SetEntityModel(target, "models/player/prisoner/prisoner_new.mdl");
AddFileToDownloadsTable("models/player/prisoner/prisoner_new.mdl");
}
else
{
ReplyToCommand(client, "★ \x04[Jailbreak] Playerul nu este tero sau viu sau este deja FreeDay !");
}
return Plugin_Handled;
}
RevivePlayer(client)
{
new Handle:menu3 = CreateMenu(RevivePlayerM);
SetMenuTitle(menu3, "Revive a player :");
AddMenuItem(menu3, "revall", "Revive All Players");
decl String:temp2[8], String:temp[128];
new cuenta = 0;
for (new i = 1; i < MaxClients; i++)
if(IsClientInGame(i) && !IsPlayerAlive(i))
{
Format(temp, 128, "%N", i);
Format(temp2, 8, "%i", i);
AddMenuItem(menu3, temp2, temp);
cuenta++;
}
SetMenuExitButton(menu3, true);
DisplayMenu(menu3, client, MENU_TIME_FOREVER);
if(cuenta == 0)
{
PrintToChat(client, "★ \x04[Jailbreak] \x05No players to revive.");
// DOsimon(client,0);
}
}
FDOne(client)
{
new Handle:menu4 = CreateMenu(FreedayOne);
SetMenuTitle(menu4, "Give Freeday to a player :");
decl String:temp2[8], String:temp[128];
new cuenta2 = 0;
for (new i = 1; i < MaxClients; i++)
if(IsClientInGame(i) && IsPlayerAlive(i) && GetClientTeam(i) == 2 && !JB_GetFD(i))
{
Format(temp, 128, "%N", i);
Format(temp2, 8, "%i", i);
AddMenuItem(menu4, temp2, temp);
cuenta2++;
}
SetMenuExitButton(menu4, true);
DisplayMenu(menu4, client, MENU_TIME_FOREVER);
if(cuenta2 == 0)
{
PrintToChat(client, "★ \x04[Jailbreak] \x05No players to give freeday.");
// DOsimon(client,0);
}
}
public FreedayOne(Handle:menu4, MenuAction:action, client, itemNum)
{
if ( action == MenuAction_Select )
{
if(!issimon[client]) return;
new String:info[32];
GetMenuItem(menu4, itemNum, info, sizeof(info));
new i = StringToInt(info);
if(IsClientInGame(i) && IsPlayerAlive(i) && GetClientTeam(i) == 2)
{
JB_GiveFD(i);
PrecacheModel("models/player/prisoner/prisoner_new.mdl");
SetEntityModel(i, "models/player/prisoner/prisoner_new.mdl");
AddFileToDownloadsTable("models/player/prisoner/prisoner_new.mdl");
PrintToChatAll("★ \x04[Jailbreak] \x05Simon %N i-a dat FreeDay lui %N", client, i);
// DOsimon(client,0);
}
else
{
PrintToChat(client, "★ \x04[Jailbreak] \x05Target invalid. Choose other player");
FDOne(client);
}
}
else if (action == MenuAction_End)
{
CloseHandle(menu4);
}
}
public RevivePlayerM(Handle:menu3, MenuAction:action, client, itemNum)
{
if ( action == MenuAction_Select )
{
if(!issimon[client]) return;
new String:info[32];
GetMenuItem(menu3, itemNum, info, sizeof(info));
if (StrEqual(info, "revall"))
{
for (int ia = 1; ia<=MaxClients; ia++)
{
CS_RespawnPlayer(ia)
}
}
new i = StringToInt(info);
if(IsClientInGame(i) && !IsPlayerAlive(i))
{
CS_RespawnPlayer(i);
PrintToChatAll("★ \x04[Jailbreak] Simon \x02%N \x01i-a dat revive lui \x02%N", client, i);
}
else
{
PrintToChat(client, "★ \x04[Jailbreak] Target invalid. Choose other player");
RevivePlayer(client);
}
}
else if (action == MenuAction_End)
{
CloseHandle(menu3);
}
}
DeliverSimon(client)
{
new Handle:menu5 = CreateMenu(delivsimon);
SetMenuTitle(menu5, "Deliver Simon to a player :");
decl String:temp2[8], String:temp[128];
new cuenta3 = 0;
for (new i = 1; i < MaxClients; i++)
if(IsClientInGame(i) && IsPlayerAlive(i) && GetClientTeam(i) == 3 && !issimon[i])
{
Format(temp, 128, "%N", i);
Format(temp2, 8, "%i", i);
AddMenuItem(menu5, temp2, temp);
cuenta3++;
}
SetMenuExitButton(menu5, true);
DisplayMenu(menu5, client, MENU_TIME_FOREVER);
if(cuenta3 == 0)
{
PrintToChat(client, "★ \x04[Jailbreak] \x05No players to give simon.");
// DOsimon(client,0);
}
}
public delivsimon(Handle:menu5, MenuAction:action, client, itemNum)
{
if ( action == MenuAction_Select )
{
if(!issimon[client]) return;
new String:info[32];
GetMenuItem(menu5, itemNum, info, sizeof(info));
new i = StringToInt(info);
if(IsClientInGame(i) && IsPlayerAlive(i) && GetClientTeam(i) == 3 && !issimon[i])
{
issimon[client] = false;
istheresimon = false;
CS_SetClientClanTag(client, "");
PrecacheModel("models/player/custom_player/kuristaja/jailbreak/guard3/guard3.mdl");
SetEntityModel(client, "models/player/custom_player/kuristaja/jailbreak/guard3/guard3.mdl");
ServerCommand("sm plugins reload togsclantags");
CloseHandle(menu5)
issimon[i] = true;
istheresimon = true;
ClientCommand(i, "sm_simonmenu")
PrecacheModel("models/player/custom_player/kuristaja/slickman/slickman.mdl");
SetEntityModel(i, "models/player/custom_player/kuristaja/slickman/slickman.mdl");
AddFileToDownloadsTable("models/player/custom_player/kuristaja/slickman/slickman.mdl");
CS_SetClientClanTag(i, "★ Simon ★");
PrintToChatAll("★ \x04[Jailbreak] \x05Simon %N i-a dat simonul lui %N", client, i);
CS_SetClientClanTag(i, "★ Simon ★");
CreateTimer(0.2, delaytag, i);
// DOsimon(client,0);
}
else
{
PrintToChat(client, "★ \x04[Jailbreak] \x05Target invalid. Choose other player");
DeliverSimon(client);
}
}
else if (action == MenuAction_End)
{
CloseHandle(menu5);
}
}
DaysMenu(client)
{
new Handle:menu6 = CreateMenu(fdday1);
SetMenuTitle(menu6, "Choose a Day :");
AddMenuItem(menu6, "fdday", "FreeDay");
AddMenuItem(menu6, "boxday", "Box Day");
AddMenuItem(menu6, "godmodeday", "GodMode Day");
AddMenuItem(menu6, "zombieday", "Zombie Day");
decl String:temp2[8], String:temp[128];
SetMenuExitButton(menu6, true);
DisplayMenu(menu6, client, MENU_TIME_FOREVER);
}
public fdday1(Handle:menu6, MenuAction:action, client, itemNum)
{
if ( action == MenuAction_Select )
{
if(!issimon[client]) return;
new String:info[32];
GetMenuItem(menu6, itemNum, info, sizeof(info));
if (StrEqual(info, "fdday"))
{
if(IsClientInGame(client) && issimon[client] && IsPlayerAlive(client) && GetClientTeam(client) == 3)
{
g_bCommandUsedDay[client] = true;
// JB_GiveFD(tcount);
PrintToChatAll("★ \x04[Jailbreak] Simon \x02%N \x01a ales Dayul \x07(FreeDay)", client);
PrintCenterTextAll("Simon %N a ales Dayul (FreeDay)", client);
PrintHintTextToAll("Simon %N a ales Dayul (FreeDay)", client);
SJD_OpenDoors();
EmitSoundToAllAny("misc/ding.mp3");
}
else
{
CloseHandle(menu6);
}
}
else if (StrEqual(info, "boxday"))
{
if(IsClientInGame(client) && issimon[client] && IsPlayerAlive(client) && GetClientTeam(client) == 3)
{
g_bCommandUsedDay[client] = true;
g_bCommandUsedDayU[client] = true;
// JB_GiveFD(tcount);
PrintToChatAll("★ \x04[Jailbreak] Simon \x02%N \x01a ales Dayul \x07(Box Day)", client);
PrintCenterTextAll("Simon %N a ales Dayul (Box Day)", client);
PrintHintTextToAll("Simon %N a ales Dayul (Box Day)", client);
SJD_OpenDoors();
ServerCommand("mp_teammates_are_enemies 1");
ServerCommand("sm_godjb1337 @ct 1");
EmitSoundToAllAny("misc/boxding.mp3");
}
else
{
CloseHandle(menu6);
}
}
else if (StrEqual(info, "godmodeday"))
{
if(IsClientInGame(client) && issimon[client] && IsPlayerAlive(client) && GetClientTeam(client) == 3)
{
g_bCommandUsedDay[client] = true;
g_bCommandUsedDayG[client] = true;
// JB_GiveFD(tcount);
PrintToChatAll("★ \x04[Jailbreak] Simon \x02%N \x01a ales Dayul \x07(GodMode Day)", client);
PrintCenterTextAll("Simon %N a ales Dayul (GodMode Day)", client);
PrintHintTextToAll("Simon %N a ales Dayul (GodMode Day)", client);
// SJD_OpenDoors();
// ServerCommand("mp_teammates_are_enemies 1");
ServerCommand("sm_godjb1337 @ct 1");
EmitSoundToAllAny("misc/ding.mp3");
}
else
{
CloseHandle(menu6);
}
}
else if (StrEqual(info, "zombieday"))
{
if(IsClientInGame(client) && issimon[client] && IsPlayerAlive(client) && GetClientTeam(client) == 3)
{
g_bCommandUsedDay[client] = true;
PrintToChatAll("★ \x04[Jailbreak] Simon \x02%N \x01a ales Dayul \x07(Zombie Day)", client);
PrintCenterTextAll("Simon %N a ales Dayul (Zombie Day)", client);
PrintHintTextToAll("Simon %N a ales Dayul (Zombie Day)", client);
for (int i = 1; i<=MaxClients; i++)
{
if(IsClientInGame(i) && GetClientTeam(i) == 2) // Sets the T Team model
{
g_bCommandUsedDayZom[i] = true;
SDKHook(i, SDKHook_WeaponEquip, OnWeaponEquip);
SetEntityMoveType(i, MOVETYPE_NONE);
PrecacheModel("models/player/jbgosniperhero/zombie.mdl");
SetEntityModel(i, "models/player/jbgosniperhero/zombie.mdl");
SetEntityHealth(i, 4000);
new uID = GetClientUserId(i);
ServerCommand("sm_blind #%d 240", uID);
ServerCommand("sm_cvar sm_hosties_lr 0");
}
}
// TimerCount = 60;
PrintCenterTextAll("Prepare time 60 seconds")
EmitSoundToAllAny("misc/ding.mp3");
CreateTimer(60.0, freezetimer, client);
}
else
{
CloseHandle(menu6);
}
}
}
else if (action == MenuAction_End)
{
CloseHandle(menu6);
}
}
ExtendRound(client)
{
new Handle:menu7 = CreateMenu(extendr);
SetMenuTitle(menu7, "Select time to extend round :");
AddMenuItem(menu7, "3m", "3 minutes");
AddMenuItem(menu7, "5m", "5 minutes");
SetMenuExitButton(menu7, true);
DisplayMenu(menu7, client, MENU_TIME_FOREVER);
}
public extendr(Handle:menu6, MenuAction:action, client, itemNum)
{
if ( action == MenuAction_Select )
{
if(!issimon[client]) return;
new String:info[32];
GetMenuItem(menu6, itemNum, info, sizeof(info));
if (StrEqual(info, "3m"))
{
if(IsClientInGame(client) && issimon[client] && IsPlayerAlive(client) && GetClientTeam(client) == 3)
{
g_bCommandUsedExt[client] = true;
// JB_GiveFD(tcount);
PrintToChatAll("★ \x04[Jailbreak] Simon \x02%N \x01a extins runda cu \x073 minute.", client);
PrintCenterTextAll("Simon %N a extins runda cu 3 minute.", client);
PrintHintTextToAll("Simon %N a extins runda cu 3 minute.", client);
GameRules_SetProp("m_iRoundTime", GameRules_GetProp("m_iRoundTime", 4, 0)+180, 4, 0, true);
// new Handle:mp_roundtime = INVALID_HANDLE;
// mp_roundtime = FindConVar("mp_roundtime");
// SetConVarBounds(mp_roundtime, ConVarBound_Upper, true, mp_roundtime+3.0);
}
else
{
CloseHandle(menu6);
}
}
else if (StrEqual(info, "5m"))
{
if(IsClientInGame(client) && issimon[client] && IsPlayerAlive(client) && GetClientTeam(client) == 3)
{
g_bCommandUsedExt[client] = true;
// JB_GiveFD(tcount);
PrintToChatAll("★ \x04[Jailbreak] Simon \x02%N \x01a extins runda cu \x075 minute.", client);
PrintCenterTextAll("Simon %N a extins runda cu 5 minute.", client);
PrintHintTextToAll("Simon %N a extins runda cu 5 minute.", client);
GameRules_SetProp("m_iRoundTime", GameRules_GetProp("m_iRoundTime", 4, 0)+300, 4, 0, true);
// new Handle:mp_roundtime = INVALID_HANDLE;
// mp_roundtime = FindConVar("mp_roundtime");
// SetConVarBounds(mp_roundtime, ConVarBound_Upper, true, mp_roundtime+5.0);
}
else
{
CloseHandle(menu6);
}
}
}
else if (action == MenuAction_End)
{
CloseHandle(menu6);
}
}
public Native_DarFD(Handle:plugin, argc)
{
new client = GetNativeCell(1);
FD[client] = true;
}
public Native_ObtenerFD(Handle:plugin, argc)
{
return FD[GetNativeCell(1)];
}
public Forward_OnWardenGived(client)
{
Call_StartForward(g_fward_onGive);
Call_PushCell(client);
Call_Finish();
}
public Action delaytag(Handle timer, int client)
{
CS_SetClientClanTag(client, "★ Simon ★");
}
public Action freezetimer(Handle timer, int client)
{
SJD_OpenDoors();
for (int i = 1; i<=MaxClients; i++)
{
SetEntityMoveType(i, MOVETYPE_WALK);
if(IsClientInGame(i) && GetClientTeam(i) == 2) // Sets the T Team model
{
new uID = GetClientUserId(i);
ServerCommand("sm_blind #%d 0", uID);
}
}
PrintCenterTextAll("Prepare time EXPIRED !")
// return Plugin_Continue;
}
public Action:OnWeaponEquip(client, weapon)
{
decl String:sWeapon[32];
GetEdictClassname(weapon, sWeapon, sizeof(sWeapon));
if( !StrEqual(sWeapon, "weapon_knife") )
{
if( GetClientTeam(client) == CS_TEAM_T )
{
return Plugin_Handled;
}
}
return Plugin_Continue;
}