Skocz do zawartości

Nowy szablon forum

mygo.pl

Stworzyliśmy dla Was nowy wygląd forum. Z pewnością znajdziesz rzeczy, które wg Ciebie mogą zostać zmienione - wspomnij o tym w specjalnym wątku.

Czytaj więcej

Jak założyć własną sieć

serwerów CS

Zastanawiasz się nad prowadzeniem własnej sieci serwerów? Przeczytaj podstawowe informacje, na które należy zwrócić uwagę, przy takim projekcie.

Czytaj więcej

Tworzymy spis sieci

dodaj swoją

Dodaj sieć do której należysz, pozwoli to na promocję i budowę ogólnopolskiej bazy sieci CS.

Czytaj więcej

VIP co jest nie tak?


Darkin
 Udostępnij

1 Attachment

Rekomendowane odpowiedzi

Cześć użyłem generatora vipa z pewnej stronki, po wrzuceniu jednak nie czyta mi tego pluginu. Wrzucam sp i smx, resetuje serva i nie ma tego pluginu, sm plugins go nie widzi i brak jakiś errorów w logach czy czegokolwiek. Wrzucam wam kod. 

 

Plugin powinien zawierać:

- 200$ za zabójstwo

- zestaw do rozbrajania 

- kevlar i hełm poza rundami pistol

- granaty co runde (2xFlash, 1xSmoke)

- podwójny skok

 

Spoiler

#include <sourcemod>
#include <cstrike>
#include <sdktools>

#pragma semicolon 1
#pragma newdecls required

public Plugin myinfo =
{
	name = "[CS:GO] VIP",
	author = "xBonio & Avgariat & Vasto_Lorde",
	description = "VIP Generator by cs-plugin.com",
	version = "1.0",
	url = "http://cs-plugin.com"
};

int offsetFlash;
int offsetSmoke;
public void OnPluginStart()
{
	HookEvent("player_spawn", PlayerSpawn);
	HookEvent("player_death", PlayerDeath);
}
public void OnMapStart()
{
	int entindex;

	entindex = CreateEntityByName("weapon_flashbang");
	DispatchSpawn(entindex);
	offsetFlash = GetEntProp(entindex, Prop_Send, "m_iPrimaryAmmoType");
	AcceptEntityInput(entindex, "Kill");

	entindex = CreateEntityByName("weapon_smokegrenade");
	DispatchSpawn(entindex);
	offsetSmoke = GetEntProp(entindex, Prop_Send, "m_iPrimaryAmmoType");
	AcceptEntityInput(entindex, "Kill");

}

public Action PlayerSpawn(Event event, const char[] name, bool dontBroadcast)
{
	int client = GetClientOfUserId(GetEventInt(event, "userid"));
	if(!IsPlayerVIP(client)) return;
	if(GetTeamScore(CS_TEAM_CT) + GetTeamScore(CS_TEAM_T) != 0 || GetTeamScore(CS_TEAM_CT) + GetTeamScore(CS_TEAM_T) != 15)
		SetEntProp(client, Prop_Send, "m_ArmorValue", );
	if(GetTeamScore(CS_TEAM_CT) + GetTeamScore(CS_TEAM_T) != 0 || GetTeamScore(CS_TEAM_CT) + GetTeamScore(CS_TEAM_T) != 15)
		SetEntProp(client, Prop_Send, "m_bHasHelmet", 1);
	if(GetClientTeam(client) == CS_TEAM_CT)
		if(GetEntProp(client, Prop_Send, "m_bHasDefuser") == 0) GivePlayerItem(client, "item_defuser");
	for(int x = 0; x < 2; x++)
		if(GetEntProp(client, Prop_Send, "m_iAmmo", _, offsetFlash) < 2) GivePlayerItem(client, "weapon_flashbang");
	for(int x = 0; x < 1; x++)
		if(GetEntProp(client, Prop_Send, "m_iAmmo", _, offsetSmoke) < 1) GivePlayerItem(client, "weapon_smokegrenade");
}
public Action PlayerDeath(Handle event, const char[] name, bool dontBroadcast)
{
	int attacker = GetClientOfUserId(GetEventInt(event, "attacker"));
	if(!IsValidPlayer(attacker) || !IsPlayerVIP(attacker)) return;
	int money = GetEntProp(attacker, Prop_Send, "m_iAccount");
	SetEntProp(attacker, Prop_Send, "m_iAccount", money+200);
}

public Action OnPlayerRunCmd(int client, int &buttons, int &impulse, float[3] vel, float[3] angles, int &weapon)
{
	if(!IsValidPlayer(client) || !IsPlayerAlive(client)) return;
	if(!IsPlayerVIP(client)) return;
	static int g_fLastButtons[MAXPLAYERS+1], g_fLastFlags[MAXPLAYERS+1], g_iJumps[MAXPLAYERS+1], fCurFlags, fCurButtons;
	fCurFlags = GetEntityFlags(client);
	fCurButtons = GetClientButtons(client);
	if (g_fLastFlags[client] & FL_ONGROUND && !(fCurFlags & FL_ONGROUND) && !(g_fLastButtons[client] & IN_JUMP) && fCurButtons & IN_JUMP) g_iJumps[client]++;
	else if(fCurFlags & FL_ONGROUND) g_iJumps[client] = 0;
	else if(!(g_fLastButtons[client] & IN_JUMP) && fCurButtons & IN_JUMP && g_iJumps[client] <= 2)
	{
		g_iJumps[client]++;
		float vVel[3];
		GetEntPropVector(client, Prop_Data, "m_vecVelocity", vVel);
		vVel[2] = 250.0;
		TeleportEntity(client, NULL_VECTOR, NULL_VECTOR, vVel);
	}
	g_fLastFlags[client] = fCurFlags;
	g_fLastButtons[client] = fCurButtons;
	
}

public Action CS_OnBuyCommand(int client, const char[] item)
{
	if(!IsPlayerVIP(client)) return Plugin_Continue;
	if(GetTeamScore(CS_TEAM_CT) + GetTeamScore(CS_TEAM_T) == 0 || GetTeamScore(CS_TEAM_CT) + GetTeamScore(CS_TEAM_T) == 15)
	{
		if(StrEqual(item, "assaultsuit") || StrEqual(item, "vesthelm"))
		{
			PrintToChat(client, "Helm zostal zablokowany na rundach pistoletowych!");
			return Plugin_Handled;
		}
	}
	
	return Plugin_Continue;
}

stock bool IsValidPlayer(int client)
{
	if(client >= 1 && client <= MaxClients && IsClientInGame(client) && !IsFakeClient(client) && !IsClientSourceTV(client))
		return true;
	return false;
}
stock bool IsPlayerVIP(int client)
{
	if(GetUserFlagBits(client) & ADMFLAG_RESERVATION)
		return true;
	return false;
}

 

 

Odnośnik do komentarza
Udostępnij na innych stronach

Jeśli chcesz dodać odpowiedź, zaloguj się lub zarejestruj nowe konto

Jedynie zarejestrowani użytkownicy mogą komentować zawartość tej strony.

Zarejestruj nowe konto

Załóż nowe konto. To bardzo proste!

Zarejestruj się

Zaloguj się

Posiadasz już konto? Zaloguj się poniżej.

Zaloguj się
 Udostępnij

×
×
  • Dodaj nową pozycję...