I tried to do something like this by getting help.
PHP Code:
#include <sourcemod>
#include <cstrike>
#include <sdktools>
#include <SteamWorks>
#include <SWGM>
#pragma semicolon 1
#pragma newdecls required
#define MESSAGE_PREFIX " \x02[Narkotik]"
Handle RoundStartMoney;
int iRoundStartMoney;
public Plugin myinfo =
{
name = "Round start and per kill money",
author = "B3none, LazHoroni",
description = "",
version = "1.0.0",
url = ""
};
public void OnPluginStart()
{
HookEvent("round_start", OnRoundStart);
RoundStartMoney = CreateConVar("sm_roundstartmoney", "1000", "Round start money");
}
public void OnMapStart()
{
iRoundStartMoney = GetConVarInt(RoundStartMoney);
}
public Action OnRoundStart(Handle hEvent, const char[] Name, bool dontbroadcast)
{
if (IsWarmup())
{
return;
}
if (IsRoundBlah(GetCurrentRound()))
{
for (int iClient = 1; iClient <= MaxClients; iClient++)
{
if(IsClientInGame(iClient))
{
if(SWGM_IsPlayerValidated(iClient) && !SWGM_InGroup(iClient))
{
PrintToChat(iClient, "%s \x04Her round \x07+$%i \x04kazanmak için gruba katılınız.", MESSAGE_PREFIX, iRoundStartMoney);
PrintToChat(iClient, "%s \x04Skor tablosundaki \x07SUNUCU İNTERNET SİTESİ\x04'ne tıklayarak gruba katılabilirsin.", MESSAGE_PREFIX);
SetEntProp(iClient, Prop_Send, "m_bHasHelmet", 100);
SetEntProp(iClient, Prop_Send, "m_ArmorValue", 100);
}
else
{
PrintToChat(iClient, "%s \x07+$%i \x04kazandınız. Gruba katıldığınız için teşekkürler.", MESSAGE_PREFIX, iRoundStartMoney);
int money = GetEntProp(iClient, Prop_Send, "m_iAccount");
SetEntProp(iClient, Prop_Send, "m_iAccount", money + iRoundStartMoney);
SetEntProp(iClient, Prop_Send, "m_bHasHelmet", 100);
SetEntProp(iClient, Prop_Send, "m_ArmorValue", 100);
}
}
}
}
if (IsRoundBlahYasak(GetCurrentRound()))
{
for (int iClient = 1; iClient <= MaxClients; iClient++)
{
if(IsClientInGame(iClient))
{
if(SWGM_IsPlayerValidated(iClient) && !SWGM_InGroup(iClient))
{
PrintToChat(iClient, "%s \x04Her round \x07+$%i \x04kazanmak için gruba katılınız.", MESSAGE_PREFIX, iRoundStartMoney);
PrintToChat(iClient, "%s \x04Skor tablosundaki \x07SUNUCU İNTERNET SİTESİ\x04'ne tıklayarak gruba katılabilirsin.", MESSAGE_PREFIX);
}
else
{
PrintToChat(iClient, "%s \x04İlk 3 round \x07+$%i \x04ödülü devre dışıdır.", MESSAGE_PREFIX, iRoundStartMoney);
}
}
}
}
if (IsRoundWeaponYasak(GetCurrentRound()))
{
ServerCommand("sm plugins unload weapons");
for (int iClient = 1; iClient <= MaxClients; iClient++)
{
if(IsClientInGame(iClient))
{
if(SWGM_IsPlayerValidated(iClient) && !SWGM_InGroup(iClient))
{
PrintToChat(iClient, "%s \x04Her round \x07+$%i \x04kazanmak için gruba katılınız.", MESSAGE_PREFIX, iRoundStartMoney);
PrintToChat(iClient, "%s \x04Skor tablosundaki \x07SUNUCU İNTERNET SİTESİ\x04'ne tıklayarak gruba katılabilirsin.", MESSAGE_PREFIX);
}
else
{
PrintToChat(iClient, "%s \x04İlk 3 round \x07+$%i \x04ödülü devre dışıdır.", MESSAGE_PREFIX, iRoundStartMoney);
}
}
}
}
if (IsRoundWeaponSerbest(GetCurrentRound()))
{
ServerCommand("sm plugins load weapons");
for (int iClient = 1; iClient <= MaxClients; iClient++)
{
if(IsClientInGame(iClient))
{
if(SWGM_IsPlayerValidated(iClient) && !SWGM_InGroup(iClient))
{
PrintToChat(iClient, "%s \x04Her round \x07+$%i \x04kazanmak için gruba katılınız.", MESSAGE_PREFIX, iRoundStartMoney);
PrintToChat(iClient, "%s \x04Skor tablosundaki \x07SUNUCU İNTERNET SİTESİ\x04'ne tıklayarak gruba katılabilirsin.", MESSAGE_PREFIX);
SetEntProp(iClient, Prop_Send, "m_bHasHelmet", 100);
SetEntProp(iClient, Prop_Send, "m_ArmorValue", 100);
}
else
{
PrintToChat(iClient, "%s \x07+$%i \x04kazandınız. Gruba katıldığınız için teşekkürler.", MESSAGE_PREFIX, iRoundStartMoney);
int money = GetEntProp(iClient, Prop_Send, "m_iAccount");
SetEntProp(iClient, Prop_Send, "m_iAccount", money + iRoundStartMoney);
SetEntProp(iClient, Prop_Send, "m_bHasHelmet", 100);
SetEntProp(iClient, Prop_Send, "m_ArmorValue", 100);
}
}
}
}
}
bool IsRoundBlah(int iRound)
{
return iRound == 4 && iRound == 5 && iRound == 6 && iRound == 7 && iRound == 8 && iRound == 9 && iRound == 10 && iRound == 11 && iRound == 12 && iRound == 13 && iRound == 14 && iRound == 19 && iRound == 20 && iRound == 21 && iRound == 22 && iRound == 23 && iRound == 24 && iRound == 25 && iRound == 26 && iRound == 27 && iRound == 28 && iRound == 29;
}
bool IsRoundBlahYasak(int iRound)
{
return iRound == 1 && iRound == 2 && iRound == 16 && iRound == 17;
}
bool IsRoundWeaponYasak(int iRound)
{
return iRound == 0 && iRound == 15;
}
bool IsRoundWeaponSerbest(int iRound)
{
return iRound == 3 && iRound == 18;
}
bool IsWarmup()
{
return GameRules_GetProp("m_bWarmupPeriod") != 0;
}
int GetCurrentRound()
{
return CS_GetTeamScore(CS_TEAM_T) + CS_GetTeamScore(CS_TEAM_CT);
}