Fiaaa
Участник
- Сообщения
- 33
- Реакции
- 0
Попытался скомпилить, неполучилосьПробуй , переделал под zp
C-подобный:
#include <sourcemod>
#include <csgo_colors>
#include <wcs>
#include <zombieplague>
new bool:ZombieSpawned;
new String:prefix[64];
new String:Allowed_Ultimates[1024];
new String:Allowed_Abilitys[1024];
public OnPluginStart()
{
HookEvent("round_end", RoundEnd);
CreateConVar("wcs_allowed_ultimates", "PropMenu;CreateProp;del;RapidFire;jetpack;teleport;heal;healcash", "Разрешенные ультимэйты");
CreateConVar("wcs_allowed_abilitys", "del;RapidFire;CreateProp;PropMenu;jetpack;teleport;heal;healcash", "Разрешенные абилити");
}
public OnMapStart()
{
ZombieSpawned = false;
prefix[0] = '\0';
GetConVarString(FindConVar("wcs_prefix"), prefix, sizeof(prefix));
Allowed_Ultimates[0] = '\0';
GetConVarString(FindConVar("wcs_allowed_ultimates"), Allowed_Ultimates, sizeof(Allowed_Ultimates));
Allowed_Abilitys[0] = '\0';
GetConVarString(FindConVar("wcs_allowed_abilitys"), Allowed_Abilitys, sizeof(Allowed_Abilitys));
}
public Action:RoundEnd(Handle:event, const String:name[], bool:dontBroadcast)
{
ZombieSpawned = false;
}
public ZP_OnClientInfected(client, attacker)
{
ZombieSpawned = true;
}
public Action:WCS_OnUltimatePre(client, const String:ultimate[])
{
if (!ZombieSpawned)
{
decl String:explode[2][32];
ExplodeString(ultimate, " ", explode, 2, 32);
if (StrContains(Allowed_Ultimates, explode[0], false) == -1)
{
CGOPrintToChat(client, "-----------------------------\n{RED}[{LIGHTPURPLE}PT{RED}] {DEFAULT}%s До появления зомби,\n{RED}[{LIGHTPURPLE}PT{RED}] {DEFAULT}запрещено использовать данный {RED}ультимэйт! (%s)\n-----------------------------", prefix, explode[0]);
ClientCommand(client,"play buttons/weapon_cant_buy.wav");
return Plugin_Handled;
}
}
else if (ZP_IsPlayerZombie(client))
{
if (StrContains(ultimate, "PropMenu", false) != -1 || StrContains(ultimate, "CreateProp", false) != -1 || StrContains(ultimate, "Props", false) != -1 || StrContains(ultimate, "Propsice", false) != -1 || StrContains(ultimate, "Props2", false) != -1 || StrContains(ultimate, "Propsc4", false) != -1 || StrContains(ultimate, "Propslaser", false) != -1)
{
CGOPrintToChat(client, "{RED}[{LIGHTPURPLE}PT{RED}] {DEFAULT}Зомби не могут использовать данный {RED}Абилити!");
return Plugin_Handled;
}
}
return Plugin_Continue;
}
public Action:WCS_OnAbilityPre(client, const String:ability[])
{
if (!ZombieSpawned)
{
decl String:explode[2][32];
ExplodeString(ability, " ", explode, 2, 32);
if (StrContains(Allowed_Abilitys, explode[0], false) == -1)
{
CGOPrintToChat(client, "-----------------------------\n{RED}[{LIGHTPURPLE}PT{RED}] {DEFAULT}%s До появления зомби,\n{RED}[{LIGHTPURPLE}PT{RED}] {DEFAULT}запрещено использовать данный {RED}Абилити! (%s)\n-----------------------------", prefix, explode[0]);
ClientCommand(client,"play buttons/weapon_cant_buy.wav");
return Plugin_Handled;
}
}
else if (ZP_IsPlayerZombie(client))
{
if (StrContains(ultimate, "PropMenu", false) != -1 || StrContains(ultimate, "CreateProp", false) != -1 || StrContains(ultimate, "Props", false) != -1 || StrContains(ultimate, "Propsice", false) != -1 || StrContains(ultimate, "Props2", false) != -1 || StrContains(ultimate, "Propsc4", false) != -1 || StrContains(ultimate, "Propslaser", false) != -1)
{
CGOPrintToChat(client, "{RED}[{LIGHTPURPLE}PT{RED}] {DEFAULT}Зомби не могут использовать данный {RED}ультимэйт!");
ClientCommand(client,"play buttons/weapon_cant_buy.wav");
return Plugin_Handled;
}
}
return Plugin_Continue;
}
Сообщения автоматически склеены:
C-подобный:
//// WCS_addon_UltimateBlocker.sp
//
// C:\Users\leony\Desktop\compile\scripting\WCS_addon_UltimateBlocker.sp(86) : error 017: undefined symbol "ultimate"
//
// 1 Error.
//
// Compilation Time: 0,8 sec
// ----------------------------------------
Press enter to exit ...