Eklenti Yapımcısı : Ak0
Eklenti Açıklaması : CS:GO için kendi yaptığım özel haritalarda 1v1 yerleri bulunmaktadir bu yerlere son 1v1 kalınca otomatik olarak ışınlanıyor.
Eklentiyi direk source olarak paylaşıyorum https://www.sourcemod.net/compiler.php bu siteden derleyebilirsiniz.
PHP Kod:
#pragma semicolon 1
#define DEBUG
#define PLUGIN_AUTHOR "Ak0"
#define PLUGIN_VERSION "1.0"
#include <sourcemod>
#include <sdktools>
#include <cstrike>
//#include <sdkhooks>
EngineVersion g_Game;
int Randomoda;
ConVar isinlanma;
public Plugin:myinfo =
{
name = "[AWP] 1v1 Isınlanma Plugini",
author = PLUGIN_AUTHOR,
description = "",
version = PLUGIN_VERSION,
url = "www.csailesi.com"
};
public OnMapStart()
{
decl String:MapName[32];
GetCurrentMap(MapName, sizeof(MapName));
if (!StrEqual(MapName, "awp_lego_kirala", false))
{
SetFailState("Bu plugin sadece ServerKira.La ozel haritasında çalışmaktadır.");
}
}
public OnPluginStart()
{
g_Game = GetEngineVersion();
if (g_Game != Engine_CSGO && g_Game != Engine_CSS)
{
SetFailState("This plugin is for CSGO/CSS only.");
}
isinlanma = CreateConVar("awp_isinlanma", "1", "Işınlanmayı Açıp Kapatır");
HookEvent("player_death", BirisiOlunce, EventHookMode_Pre);
HookEvent("round_start", ElBasi);
RegConsoleCmd("sm_bilgi", bilgicek);
}
public Action bilgicek(int client, int args) {
PrintToChat(client, "Oda Numarası: %i", Randomoda);
}
public Action:ElBasi(Handle:event, const String:name[], bool:dontBroadcast) {
new randomcu = GetRandomInt(1, 6);
Randomoda = randomcu;
ServerCommand("abner_bhop_enabled 0");
ServerCommand("abner_bhop_autobhop 0");
}
public Action BirisiOlunce(Handle event, char[] name, bool dontBroadcast)
{
if(GetConVarInt(isinlanma) == 1){
/* Yerdeki Silahları Silme
new maxent = GetMaxEntities(), String:weapon[64];
if(YasayanOyuncu(2) == 1 && YasayanOyuncu(3) == 1) {
for (new i=GetMaxClients();i<maxent;i++)
{
if( IsValidEdict(i) && IsValidEntity(i) )
{
GetEdictClassname(i, weapon, sizeof(weapon));
if(!(StrContains(weapon, "weapon_")) && (StrContains(weapon, "weapon_knife") != 0) && (StrContains(weapon, "weapon_bayonet") != 0))
RemoveEdict(i);
}
}
}
*/
if (YasayanOyuncu(2) == 1 && YasayanOyuncu(3) == 1) {
ServerCommand("sm plugins unload onlyhsdeagle");
if (Randomoda == 5) {
ServerCommand("sm plugins load abner_bhop");
ServerCommand("sv_airaccelerate 999999");
ServerCommand("abner_bhop_enabled 1");
ServerCommand("abner_bhop_autobhop 1");
}
}
// Deagle Odası
new Float:dgT[3];
new Float:dgCT[3];
dgT[0] = 3822.0;
dgT[1] = 635.0;
dgT[2] = -244.0;
dgCT[0] = 3822.0;
dgCT[1] = -185.0;
dgCT[2] = -244.0;
//Ssg08 Odası
new Float:ssgT[3];
new Float:ssgCT[3];
ssgT[0] = 5670.0;
ssgT[1] = 1659.0;
ssgT[2] = -244.0;
ssgCT[0] = 5670.0;
ssgCT[1] = -1209.0;
ssgCT[2] = -244.0;
//Hedef Odası
new Float:hedefT[3];
new Float:hedefCT[3];
hedefT[0] = 3508.0;
hedefT[1] = 1904.0;
hedefT[2] = -244.0;
hedefCT[0] = 3508.0;
hedefCT[1] = 2078.0;
hedefCT[2] = -244.0;
//KZ Odası
new Float:kzT[3];
new Float:kzCT[3];
kzT[0] = 7024.0;
kzT[1] = -352.0;
kzT[2] = -244.0;
kzCT[0] = 7024.0;
kzCT[1] = 352.0;
kzCT[2] = -244.0;
//Bhop Odası
new Float:bhopT[3];
new Float:bhopCT[3];
bhopT[0] = 9298.0;
bhopT[1] = 6639.0;
bhopT[2] = -25.0;
bhopCT[0] = 9282.0;
bhopCT[1] = 6466.0;
bhopCT[2] = -25.0;
//Redline Odası
new Float:redT[3];
new Float:redCT[3];
redT[0] = 1900.0;
redT[1] = 3544.0;
redT[2] = -250.0;
redCT[0] = 1900.0;
redCT[1] = 4742.0;
redCT[2] = -250.0;
for (int i = 1; i <= MaxClients; i++)
{
if (i && IsClientInGame(i) && IsClientConnected(i) && !IsFakeClient(i) && IsPlayerAlive(i))
{
if (YasayanOyuncu(2) == 1 && YasayanOyuncu(3) == 1) {
SilahSil(i);
SetEntityHealth(i, 100);
switch (Randomoda)
{
case 1:
{
if (GetClientTeam(i) == 2) {
TeleportEntity(i, dgT, NULL_VECTOR, NULL_VECTOR);
} else if (GetClientTeam(i) == 3) {
TeleportEntity(i, dgCT, NULL_VECTOR, NULL_VECTOR);
}
}
case 2:
{
if (GetClientTeam(i) == 2) {
TeleportEntity(i, ssgT, NULL_VECTOR, NULL_VECTOR);
} else if (GetClientTeam(i) == 3) {
TeleportEntity(i, ssgCT, NULL_VECTOR, NULL_VECTOR);
}
}
case 3:
{
if (GetClientTeam(i) == 2) {
TeleportEntity(i, hedefT, NULL_VECTOR, NULL_VECTOR);
} else if (GetClientTeam(i) == 3) {
TeleportEntity(i, hedefCT, NULL_VECTOR, NULL_VECTOR);
}
}
case 4:
{
if (GetClientTeam(i) == 2) {
TeleportEntity(i, kzT, NULL_VECTOR, NULL_VECTOR);
} else if (GetClientTeam(i) == 3) {
TeleportEntity(i, kzCT, NULL_VECTOR, NULL_VECTOR);
}
}
case 5:
{
if (GetClientTeam(i) == 2) {
TeleportEntity(i, bhopT, NULL_VECTOR, NULL_VECTOR);
} else if (GetClientTeam(i) == 3) {
TeleportEntity(i, bhopCT, NULL_VECTOR, NULL_VECTOR);
}
}
case 6:
{
if (GetClientTeam(i) == 2) {
TeleportEntity(i, redT, NULL_VECTOR, NULL_VECTOR);
} else if (GetClientTeam(i) == 3) {
TeleportEntity(i, redCT, NULL_VECTOR, NULL_VECTOR);
}
}
}
}
}
}
}
}
YasayanOyuncu(iTeam)
{
decl iCount, i; iCount = 0;
for (i = 1; i <= MaxClients; i++)
if (IsClientInGame(i) && IsPlayerAlive(i) && GetClientTeam(i) == iTeam)
iCount++;
return iCount;
}
stock void SilahSil(int client)
{
int iEnt;
for (int i = 0; i <= 4; ++i)
{
while ((iEnt = GetPlayerWeaponSlot(client, i)) != -1)
{
RemovePlayerItem(client, iEnt);
AcceptEntityInput(iEnt, "Kill");
}
}
}