BossKotoriiNeSmok
Участник
- Сообщения
- 976
- Реакции
- 189
МОжно ли как то пофиксить баг, когда ставить низкий скин, чтобы и положение у всех низкое было? просто он после прыжка на 1-2 секунды положение низкое, и потом обратно стандартное
Через "alt+0+1". "alt+0+2" и т.д., или пишешь 01, выделяешь, нажимаешь плагины - конвертер - "HEX -> ACXII"Подскажите, как изменить цвета в чате, когда происходит голосование?
"[SM] Игрок Ник проголосовал за Карта"
Нашел, что это прописано в файле перевода ядра sm "core.phrases.txt", но подставив {цвет}, не работает.
И знаю, что можно красить плагины в файлах перевода, символом "BEL", но в каких случаях это возможно? Т.е. нужен какой-то инклуд colors в плагине?"Voted For"
{
"ru" "Игрок {1} проголосовал за {2}"
}
/* BunnyHop
* Author: Soccerdude
* Description: Gives players the ability to jump higher
*/
#include <sourcemod>
#include <sdktools>
#pragma semicolon 1
// Declare offsets
new VelocityOffset_0;
new VelocityOffset_1;
new BaseVelocityOffset, bool:acces[MAXPLAYERS+1];
// Declare convar handles
new Handle:hPush;
new Handle:hHeight;
public Plugin:myinfo =
{
name = "BunnyHop",
author = "Soccerdude",
description = "Gives players the ability to jump higher",
version = "1.0.1",
url = "http://sourcemod.net/"
};
public OnPluginStart()
{
PrintToServer("----------------| BunnyHop Loading |---------------");
// Hook Events
HookEvent("player_jump",PlayerJumpEvent);
// Find offsets
VelocityOffset_0=FindSendPropOffs("CBasePlayer","m_vecVelocity[0]");
if(VelocityOffset_0==-1)
SetFailState("[BunnyHop] Error: Failed to find Velocity[0] offset, aborting");
VelocityOffset_1=FindSendPropOffs("CBasePlayer","m_vecVelocity[1]");
if(VelocityOffset_1==-1)
SetFailState("[BunnyHop] Error: Failed to find Velocity[1] offset, aborting");
BaseVelocityOffset=FindSendPropOffs("CBasePlayer","m_vecBaseVelocity");
if(BaseVelocityOffset==-1)
SetFailState("[BunnyHop] Error: Failed to find the BaseVelocity offset, aborting");
// Create cvars
hPush=CreateConVar("bunnyhop_push","1.0","The forward push when you jump");
hHeight=CreateConVar("bunnyhop_height","1.0","The upward push when you jump");
// Create config
AutoExecConfig();
// Public cvar
CreateConVar("bunnyhop_version","1.0.1","[BunnyHop] Current version of this plugin",FCVAR_PLUGIN|FCVAR_SPONLY|FCVAR_UNLOGGED|FCVAR_DONTRECORD|FCVAR_REPLICATED|FCVAR_NOTIFY);
PrintToServer("----------------| BunnyHop Loaded |---------------");
}
public OnClientPostAdminFilter(client)
{
new AdminId:aid = GetUserAdmin(client);
if (aid != INVALID_ADMIN_ID)
{
if (GetAdminFlag(aid, Admin_Ban, Access_Effective))
acces[client] = true;
}
}
public OnClientDisconnect_Post(client) acces[client] = false;
public PlayerJumpEvent(Handle:event,const String:name[],bool:dontBroadcast)
{
new index=GetClientOfUserId(GetEventInt(event,"userid"));
if (acces[index])
{
new Float:finalvec[3];
finalvec[0]=GetEntDataFloat(index,VelocityOffset_0)*GetConVarFloat(hPush)/2.0;
finalvec[1]=GetEntDataFloat(index,VelocityOffset_1)*GetConVarFloat(hPush)/2.0;
finalvec[2]=GetConVarFloat(hHeight)*50.0;
SetEntDataVector(index,BaseVelocityOffset,finalvec,true);
}
}
Замени 60 строчку Admin_Ban на Admin_Generic (должно сработать)Доброго времени суток.Игра Counter-Strike Source v.34.Подправьте плагин если не сложно.Хотел прописать в admin_overrides "CFG" флаг b для этого плагина.А какую команду прописать не пойму.C-подобный:/* BunnyHop * Author: Soccerdude * Description: Gives players the ability to jump higher */ #include <sourcemod> #include <sdktools> #pragma semicolon 1 // Declare offsets new VelocityOffset_0; new VelocityOffset_1; new BaseVelocityOffset, bool:acces[MAXPLAYERS+1]; // Declare convar handles new Handle:hPush; new Handle:hHeight; public Plugin:myinfo = { name = "BunnyHop", author = "Soccerdude", description = "Gives players the ability to jump higher", version = "1.0.1", url = "http://sourcemod.net/" }; public OnPluginStart() { PrintToServer("----------------| BunnyHop Loading |---------------"); // Hook Events HookEvent("player_jump",PlayerJumpEvent); // Find offsets VelocityOffset_0=FindSendPropOffs("CBasePlayer","m_vecVelocity[0]"); if(VelocityOffset_0==-1) SetFailState("[BunnyHop] Error: Failed to find Velocity[0] offset, aborting"); VelocityOffset_1=FindSendPropOffs("CBasePlayer","m_vecVelocity[1]"); if(VelocityOffset_1==-1) SetFailState("[BunnyHop] Error: Failed to find Velocity[1] offset, aborting"); BaseVelocityOffset=FindSendPropOffs("CBasePlayer","m_vecBaseVelocity"); if(BaseVelocityOffset==-1) SetFailState("[BunnyHop] Error: Failed to find the BaseVelocity offset, aborting"); // Create cvars hPush=CreateConVar("bunnyhop_push","1.0","The forward push when you jump"); hHeight=CreateConVar("bunnyhop_height","1.0","The upward push when you jump"); // Create config AutoExecConfig(); // Public cvar CreateConVar("bunnyhop_version","1.0.1","[BunnyHop] Current version of this plugin",FCVAR_PLUGIN|FCVAR_SPONLY|FCVAR_UNLOGGED|FCVAR_DONTRECORD|FCVAR_REPLICATED|FCVAR_NOTIFY); PrintToServer("----------------| BunnyHop Loaded |---------------"); } public OnClientPostAdminFilter(client) { new AdminId:aid = GetUserAdmin(client); if (aid != INVALID_ADMIN_ID) { if (GetAdminFlag(aid, Admin_Ban, Access_Effective)) acces[client] = true; } } public OnClientDisconnect_Post(client) acces[client] = false; public PlayerJumpEvent(Handle:event,const String:name[],bool:dontBroadcast) { new index=GetClientOfUserId(GetEventInt(event,"userid")); if (acces[index]) { new Float:finalvec[3]; finalvec[0]=GetEntDataFloat(index,VelocityOffset_0)*GetConVarFloat(hPush)/2.0; finalvec[1]=GetEntDataFloat(index,VelocityOffset_1)*GetConVarFloat(hPush)/2.0; finalvec[2]=GetConVarFloat(hHeight)*50.0; SetEntDataVector(index,BaseVelocityOffset,finalvec,true); } }
а можно сделать когда поставил бобму, чтобы воспроизводился звук??@✖ FokS ✖, примерно так:C-подобный:#pragma semicolon 1 #pragma newdecls required #include <sdktools_sound> #include <sdktools_stringtables> bool bCSGO; float fPos[3]; char sCvarPath[PLATFORM_MAX_PATH], sSound[PLATFORM_MAX_PATH]; public void OnPluginStart() { bCSGO = GetEngineVersion() == Engine_CSGO; ConVar cvar = CreateConVar("sm_defused_sound", "ui/achievement_earned.wav", "", FCVAR_PRINTABLEONLY); cvar.AddChangeHook(CVarChanged_Sound); cvar.GetString(sCvarPath, sizeof(sCvarPath)); HookEvent("bomb_begindefuse", Event_Defuse); HookEvent("bomb_defused", Event_Defused, EventHookMode_PostNoCopy); } public void CVarChanged_Sound(ConVar cvar, const char[] oldVal, const char[] newVal) { cvar.GetString(sCvarPath, sizeof(sCvarPath)); int len = strlen(sCvarPath) - 4; if(len < 1 || strcmp(sCvarPath[len], ".mp3", false) && strcmp(sCvarPath[len], ".wav", false)) sCvarPath[0] = sSound[0] = 0; else AddSound(); } public void OnMapStart() { if(sCvarPath[0]) AddSound(); } stock void AddSound() { FormatEx(sSound, sizeof(sSound), "sound/%s", sCvarPath); AddFileToDownloadsTable(sSound); if(bCSGO) { FormatEx(sSound, sizeof(sSound), "*%s", sCvarPath); AddToStringTable(FindStringTable("soundprecache"), sSound); return; } FormatEx(sSound, sizeof(sSound), "%s", sCvarPath); PrecacheSound(sSound, true); } public void Event_Defuse(Event event, const char[] name, bool dontBroadcast) { int client = GetClientOfUserId(event.GetInt("userid")); if(client && IsClientInGame(client)) GetClientAbsOrigin(client, fPos); } public void Event_Defused(Event event, const char[] name, bool dontBroadcast) { if(sSound[0]) EmitAmbientSound(sSound, fPos); }
знал бы как и сделал бы.@Andrey Morozov, можно, конечно.
Делай, никто не запрещает.
Не думаю, что это проблема, но отчего не перейти на новый синтаксис? У меня на 34 стоит 11 см и всё отлично. А если в момент голосования идёт окончание раунда или установили бомбу ?Добрый день.Можно запелить плагин когда допустим идёт голосование за смену карты все игроки замораживаются(ну типа паузы на сервере) и должны все проголосовать и потом продолжается игра после гососования т.е всех размораживает.Игра Counter-Strike Source v.34(старый синтаксис)mp_roundtime 10. mp_timelimit 30 если это нужно.Голосование начинается за 2 минуты до конца карты.