Контакты Поиск

[ вход ]
[ последние сообщения ]

  • Страница 1 из 1
  • 1
Форум » SourceMod >> CS:Source >> CSGO » Обсуждение » Jail Menu Control. (Go to the help ,please))
Jail Menu Control.
котэ Дата: Среда, 13.11.2013, 20:03:51 | Сообщение # 1
Сообщений: 44
Репутация: -8 [ +/- ]
Hello all форумчане ,Мне нужно Menu Control вы не подумайте платное вернее написать что бы при открытие было меню Дать скорость ,дать гравитацию ,дать хп всего больше не надо вот скрипт там все встроено только добавить менюшку я не профи в SP знаю чуть чуть думаю вы профи можете это сделать за несколько сек. Заранее благодарю! vshapke ulibka

Добавлено (13.11.2013, 20:03:51)
---------------------------------------------
};

public OnPluginStart()
{
// Initialize our phrases
LoadTranslations("warden.phrases");

// Register our public commands
RegConsoleCmd("sm_w", BecomeWarden);
RegConsoleCmd("sm_k", BecomeWarden);
RegConsoleCmd("sm_c", BecomeWarden);
RegConsoleCmd("sm_warden", BecomeWarden);
RegConsoleCmd("sm_uk", ExitWarden);
RegConsoleCmd("sm_unwarden", ExitWarden);

// Register our admin commands
RegAdminCmd("sm_admin_c", RemoveWarden, ADMFLAG_GENERIC);

// Hooking the events
HookEvent("round_start", roundStart); // For the round start
HookEvent("player_death", playerDeath); // To check when our warden dies :)

// For our warden to look some extra cool
AddCommandListener(HookPlayerChat, "say");

// May not touch this line
CreateConVar("sm_cmddd_version", Commander_VERSION, "The version of the SourceMod plugin JailBreak Warden, by ecca", FCVAR_REPLICATED|FCVAR_SPONLY|FCVAR_PLUGIN);
}

public Action:BecomeWarden(client, args)
{
if (Warden == -1) // There is no warden , so lets proceed
{
if (GetClientTeam(client) == TEAM_CTS) // The requested player is on the Counter-Terrorist side
{
if (IsPlayerAlive(client)) // A dead warden would be worthless >_<
{
CPrintToChatAll("\x01[\x04Тюряга\x01] \x03%t", "warden_new", client);
Warden = client; // Set the client to warden
SetEntityRenderColor(client, 0, 0, 255, 128); // Lets give him some special blue color
SetClientListeningFlags(client, VOICE_NORMAL); // Will unmute the player if he is muted
SetEntPropFloat(client, Prop_Data, "m_flLaggedMovementValue", 1.1);
SetEntityGravity(client, 0.8);
SetEntProp(client, Prop_Send, "m_iHealth", 160);
}
else // Grr he is not alive -.-
{
CPrintToChat(client, "\x01[\x04Тюряга\x01] \x03%t", "warden_playerdead");
}
}
else // Would be wierd if an terrorist would run the prison wouldn't it :p
{
CPrintToChat(client, "\x01[\x04Тюряга\x01] \x03%t", "warden_ctsonly");
}
}
else // The warden already exist so there is no point setting a new one
{
CPrintToChat(client, "\x01[\x04Тюряга\x01] \x03%t", "warden_exist", Warden);
}
}

public Action:ExitWarden(client, args)
{
if(client == Warden) // The client is actually the current warden so lets proceed
{
CPrintToChatAll("\x01[\x04Тюряга\x01] \x03%t", "warden_retire", client);
Warden = -1; // Open for a new warden
SetEntityRenderColor(client, 255, 255, 255, 255); // Lets remove the awesome color
}
else // Fake dude!
{
CPrintToChat(client, "\x01[\x04Тюряга\x01] \x03%t", "warden_notwarden");
}
}

public Action:roundStart(Handle:event, const String:name[], bool:dontBroadcast)
{
Warden = -1; // Lets remove the current warden if he exist
}

public Action:playerDeath(Handle:event, const String:name[], bool:dontBroadcast)
{
new client = GetClientOfUserId(GetEventInt(event, "userid")); // Get the dead clients id

if(client == Warden) // Aww damn , he is the warden
{
CPrintToChatAll("\x01[\x04Тюряга\x01] \x03%t", "warden_dead", client);
SetEntityRenderColor(client, 255, 255, 255, 255); // Lets give him the standard color back
Warden = -1; // Lets open for a new warden
}
}

public OnClientDisconnect(client)
{
if(client == Warden) // The warden disconnected, action!
{
CPrintToChatAll("\x01[\x04Тюряга\x01] \x03%t", "warden_disconnected");
Warden = -1; // Lets open for a new warden
}
}

public Action:RemoveWarden(client, args)
{
if(Warden != -1) // Is there an warden at the moment ?
{
CPrintToChatAll("\x01[\x04Тюряга\x01] \x03%t", "warden_removed", client, Warden);
SetEntityRenderColor(Warden, 255, 255, 255, 255); // Give his normal color back
Warden = -1; // Lets open for a new warden
}
else
{
CPrintToChatAll("\x01[\x04Тюряга\x01] \x03%t", "warden_noexist");
}

return Plugin_Handled; // Prevent sourcemod from typing "unknown command" in console
}

public Action:HookPlayerChat(client, const String:command[], args)
{
if(Warden == client && client != 0) // Check so the player typing is warden and also checking so the client isn't console!
{
new String:szText[256];
GetCmdArg(1, szText, sizeof(szText));

if(szText[0] == '/' || szText[0] == '@' || IsChatTrigger()) // Prevent unwanted text to be displayed.
{
return Plugin_Handled;
}

if(IsClientInGame(client) && IsPlayerAlive(client) && GetClientTeam(client) == TEAM_CTS) // Typing warden is alive and his team is Counter-Terrorist
{
CPrintToChatAll("\x03[\x01Контрол\x03] \x04%N: \x03=>>\x01%s", client, szText);
return Plugin_Handled;
}
}
return Plugin_Continue;
}

 
panorama Дата: Воскресенье, 17.11.2013, 05:05:03 | Сообщение # 2
Сообщений: 206
Репутация: 2 [ +/- ]
Цитата котэ ()
};

public OnPluginStart()
{
// Initialize our phrases
LoadTranslations("warden.phrases");

// Register our public commands
RegConsoleCmd("sm_w", BecomeWarden);
RegConsoleCmd("sm_k", BecomeWarden);
RegConsoleCmd("sm_c", BecomeWarden);
RegConsoleCmd("sm_warden", BecomeWarden);
RegConsoleCmd("sm_uk", ExitWarden);
RegConsoleCmd("sm_unwarden", ExitWarden);

// Register our admin commands
RegAdminCmd("sm_admin_c", RemoveWarden, ADMFLAG_GENERIC);

// Hooking the events
HookEvent("round_start", roundStart); // For the round start
HookEvent("player_death", playerDeath); // To check when our warden dies :)

// For our warden to look some extra cool
AddCommandListener(HookPlayerChat, "say");

// May not touch this line
CreateConVar("sm_cmddd_version", Commander_VERSION, "The version of the SourceMod plugin JailBreak Warden, by ecca", FCVAR_REPLICATED|FCVAR_SPONLY|FCVAR_PLUGIN);
}

public Action:BecomeWarden(client, args)
{
if (Warden == -1) // There is no warden , so lets proceed
{
if (GetClientTeam(client) == TEAM_CTS) // The requested player is on the Counter-Terrorist side
{
if (IsPlayerAlive(client)) // A dead warden would be worthless >_<
{
CPrintToChatAll("\x01[\x04Тюряга\x01] \x03%t", "warden_new", client);
Warden = client; // Set the client to warden
SetEntityRenderColor(client, 0, 0, 255, 128); // Lets give him some special blue color
SetClientListeningFlags(client, VOICE_NORMAL); // Will unmute the player if he is muted
SetEntPropFloat(client, Prop_Data, "m_flLaggedMovementValue", 1.1);
SetEntityGravity(client, 0.8);
SetEntProp(client, Prop_Send, "m_iHealth", 160);
}
else // Grr he is not alive -.-
{
CPrintToChat(client, "\x01[\x04Тюряга\x01] \x03%t", "warden_playerdead");
}
}
else // Would be wierd if an terrorist would run the prison wouldn't it :p
{
CPrintToChat(client, "\x01[\x04Тюряга\x01] \x03%t", "warden_ctsonly");
}
}
else // The warden already exist so there is no point setting a new one
{
CPrintToChat(client, "\x01[\x04Тюряга\x01] \x03%t", "warden_exist", Warden);
}
}

public Action:ExitWarden(client, args)
{
if(client == Warden) // The client is actually the current warden so lets proceed
{
CPrintToChatAll("\x01[\x04Тюряга\x01] \x03%t", "warden_retire", client);
Warden = -1; // Open for a new warden
SetEntityRenderColor(client, 255, 255, 255, 255); // Lets remove the awesome color
}
else // Fake dude!
{
CPrintToChat(client, "\x01[\x04Тюряга\x01] \x03%t", "warden_notwarden");
}
}

public Action:roundStart(Handle:event, const String:name[], bool:dontBroadcast)
{
Warden = -1; // Lets remove the current warden if he exist
}

public Action:playerDeath(Handle:event, const String:name[], bool:dontBroadcast)
{
new client = GetClientOfUserId(GetEventInt(event, "userid")); // Get the dead clients id

if(client == Warden) // Aww damn , he is the warden
{
CPrintToChatAll("\x01[\x04Тюряга\x01] \x03%t", "warden_dead", client);
SetEntityRenderColor(client, 255, 255, 255, 255); // Lets give him the standard color back
Warden = -1; // Lets open for a new warden
}
}

public OnClientDisconnect(client)
{
if(client == Warden) // The warden disconnected, action!
{
CPrintToChatAll("\x01[\x04Тюряга\x01] \x03%t", "warden_disconnected");
Warden = -1; // Lets open for a new warden
}
}

public Action:RemoveWarden(client, args)
{
if(Warden != -1) // Is there an warden at the moment ?
{
CPrintToChatAll("\x01[\x04Тюряга\x01] \x03%t", "warden_removed", client, Warden);
SetEntityRenderColor(Warden, 255, 255, 255, 255); // Give his normal color back
Warden = -1; // Lets open for a new warden
}
else
{
CPrintToChatAll("\x01[\x04Тюряга\x01] \x03%t", "warden_noexist");
}

return Plugin_Handled; // Prevent sourcemod from typing "unknown command" in console
}

public Action:HookPlayerChat(client, const String:command[], args)
{
if(Warden == client && client != 0) // Check so the player typing is warden and also checking so the client isn't console!
{
new String:szText[256];
GetCmdArg(1, szText, sizeof(szText));

if(szText[0] == '/' || szText[0] == '@' || IsChatTrigger()) // Prevent unwanted text to be displayed.
{
return Plugin_Handled;
}

if(IsClientInGame(client) && IsPlayerAlive(client) && GetClientTeam(client) == TEAM_CTS) // Typing warden is alive and his team is Counter-Terrorist
{
CPrintToChatAll("\x03[\x01Контрол\x03] \x04%N: \x03=>>\x01%s", client, szText);
return Plugin_Handled;
}
}
return Plugin_Continue;
}

Это тебе так помогли функцию сделать ? Или что то не так с ней ?
 
Форум » SourceMod >> CS:Source >> CSGO » Обсуждение » Jail Menu Control. (Go to the help ,please))
  • Страница 1 из 1
  • 1
Поиск: