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

Zhp.

Użytkownik
  • Postów

    98
  • Dołączył

  • Ostatnia wizyta

  • Wygrane w rankingu

    1

Odpowiedzi opublikowane przez Zhp.

  1. Witam mam niestety problem z kompilacją tego pluginu :/

    #include <sourcemod>
    
    public Plugin:myinfo =
    {
    	name = "Losowy Vip",
    	author = "Hanys (Edit by Kempuś)",
    	description = "Plugin losuje losową osobę która otrzyma flagi VIP'a",
    	version = "1.0",
    	url = "http://hanys.dispark.pl"
    }
    
    new Handle:Random_player;
    
    public OnPluginStart()
    {
    	CreateConVar("sm_randomvip", "1.0", "Losowy VIP", FCVAR_PLUGIN|FCVAR_SPONLY|FCVAR_REPLICATED|FCVAR_NOTIFY|FCVAR_DONTRECORD);
    	
    	Random_player = CreateConVar("random_player", "0", "Ile osob wymaganych jest do wylosowania losowego vip'a", FCVAR_NOTIFY);
    	
    	
    	AutoExecConfig(true, "sm_vip_random");
    }
    
    public OnMapStart()
    {
    
    	CreateTimer(240.0, Timer_GiveVIP);
    
    }
    
    public Action:Timer_GiveVIP(Handle:timer)
    {
    	new winner = GetRandomPlayer(3);
    	
    	{
    	
    		if (winner == -1)
    		
    		{
    			
    			PrintToChatAll("[\x02BOT\x01] \x06Na serwerze panuje za mała ilość graczy aby rozpocząć losowanie VIP'a\x01");
    			
    			return Plugin_Handled;
    			
    		}
    	
    		AddUserFlags(winner, Admin_Reservation,Admin_Custom1,Admin_Custom2);
    		
    		PrintToChatAll("[\x02PLHW\x01] \x06Trwa losowanie VIP'a...\x01");
    		PrintToChatAll("[\x02PLHW\x01] \x06-----\x01");
    		PrintToChatAll("[\x02PLHW\x01] \x06-----\x01");
    		PrintToChatAll("[\x02PLHW\x01] \x06-----\x01");
    		PrintToChatAll("[\x02PLHW\x01] \x06Losowym VIP'em zostaje \x02%N\x01\x06! Gratulujemy!\x01", winner);
    		PrintToChatAll("[\x02PLHW\x01] \x06Wylosowany Gracz otrzymał VIP'a do końca mapy!");
    		
    		return Plugin_Handled;	
    		
    	}
    }
    
    stock GetRandomPlayer(team)
    {
    	
    	new g_random_player = GetConVarInt(Random_player);
    	new clients[MaxClients + 1], clientCount;
    	
    	for (new i = 1; i <= MaxClients; i++)
    	if (IsClientInGame(i) && !IsFakeClient(i) && !GetAdminFlag(GetUserAdmin(i), Admin_Reservation))
    	clients[clientCount++] = i;
    	
    	if (clientCount <= g_random_player)
    	return -1;
    	
    	return clients[GetRandomInt(0, clientCount - 1)];
    }

     

  2. Witam mam plugin na bs'y ale niestety nw jak go edytować na mapę de_mirage.

    Wszystko by było fajnie ale gdy gracze grają raz jest A , a czasem jest B chciałbym aby powyżej 6 graczy na serwerze były odblokowane wszystkie bs'y

    Sm

    #pragma semicolon 1
    #include <sourcemod>    
    #include <sdktools>
    #include <cstrike>
    
    #define	STANDARDMAPSMAX	12
    
    new String:BSAL[1];
    new EIBA = -1;
    new EIBB = -1;
    new Handle:Timer = INVALID_HANDLE;
    new String:StandardMaps[STANDARDMAPSMAX][2][11] =
    {	
    	{
    		"de_aztec","B"
    	},
    	{
    		"de_cbble","A"
    	},
    	{
    		"de_chateau","A"
    	},
    	{
    		"de_dust","A"
    	},
    	{
    		"de_dust2","A"
    	},
    	{
    		"de_inferno","B"
    	},
    	{
    		"de_nuke","B"
    	},
    	{
    		"de_piranesi","A"
    	},
    	{
    		"de_port","A"
    	},
    	{
    		"de_prodigy","B"
    	},
    	{
    		"de_tides","A"
    	},
    	{
    		"de_train","A"
    	}
    };
    
    public Plugin:myinfo =
    {
        name = "Bombsite Limiter",
        author = "Tomasz 'anacron' Motylinski",
        description = "Limiting Bomsites when due to low CT players.",
        version = "1.2.3",
        url = "http://anacron.pl/"
    }
    public OnPluginStart()
    {
    	HookEvent("round_freeze_end",Event_RoundFreezeEnd,EventHookMode_Post); 
    	HookEvent("bomb_planted",Event_RoundEnd,EventHookMode_Post); 
    	HookEvent("round_end",Event_RoundEnd,EventHookMode_Post); 
    	CreateConVar("sm_bslimiter","1.2.3","Version Information",FCVAR_REPLICATED|FCVAR_NOTIFY);
    }
    stock bool:IsVecBetween(const Float:vecVector[3],const Float:vecMin[3],const Float:vecMax[3]) 
    { 
        return ( (vecMin[0] <= vecVector[0] <= vecMax[0]) && 
                 (vecMin[1] <= vecVector[1] <= vecMax[1]) && 
                 (vecMin[2] <= vecVector[2] <= vecMax[2])    ); 
    }
    public Message()
    {
    	PrintToChatAll("[BS Limiter] Ze wzgledu na mala liczbe CT w tej rundzie. Beda oni bronic tylko Bombside %s.",BSAL);
    	PrintHintTextToAll("Tylko Bombsite %s jest wlaczony w tej rundzie",BSAL);
    }
    public Action:RepeatMessage(Handle:timer)
    {
    	Message();
    }
    public Action:Event_RoundFreezeEnd (Handle:event,const String:name[],bool:dontBroadcast)
    {
    	if(IsValidEntity(EIBA)) 
    	{
    		EIBA = -1;
    	}
    	if(IsValidEntity(EIBB)) 
    	{
    		EIBB = -1;
    	}
    	if(Timer != INVALID_HANDLE)
    	{
    		CloseHandle(Timer);
    		Timer = INVALID_HANDLE;
    	}
    
    	new Float:VBCPA[3]; 
    	new Float:VBCPB[3]; 
    	new EI = -1;
    	
    	EI = FindEntityByClassname(EI,"cs_player_manager");
    	
    	if(IsValidEntity(EI)) 
    	{ 
    		GetEntPropVector(EI,Prop_Send,"m_bombsiteCenterA",VBCPA); 
    		GetEntPropVector(EI,Prop_Send,"m_bombsiteCenterB",VBCPB); 
    	} 
    	
    	EI = -1; 
    	EI = FindEntityByClassname(EI,"func_bomb_target");
    	
    	while(IsValidEntity(EI)) 
    	{ 
    		new Float:VBMin[3]; 
    		new Float:VBMax[3]; 
    		 
    		GetEntPropVector(EI,Prop_Send,"m_vecMins",VBMin); 
    		GetEntPropVector(EI,Prop_Send,"m_vecMaxs",VBMax); 
    		 
    		if (IsVecBetween(VBCPA,VBMin,VBMax)) 
    		{ 
    			EIBA = EI; 
    		} 
    		else if (IsVecBetween(VBCPB,VBMin,VBMax)) 
    		{ 
    			EIBB = EI; 
    		} 
    		EI = FindEntityByClassname(EI,"func_bomb_target");
    	}
        
    	if(IsValidEntity(EIBA) && IsValidEntity(EIBB))
        {
    		new CTPlayers = GetTeamClientCount(CS_TEAM_CT);
    		new TTPlayers = GetTeamClientCount(CS_TEAM_T);
    
    		if(((CTPlayers > TTPlayers) && (TTPlayers == 1 || CTPlayers > 3)) || CTPlayers > 4)
    		{
    			AcceptEntityInput(EIBB,"Enable");
    			AcceptEntityInput(EIBA,"Enable");
    			BSAL = "";
    			PrintHintTextToAll("All Bombsites are enabled in this round!");
    			PrintCenterTextAll("All Bombsites are enabled in this round!");
    		}
    		else
    		{
    			if(GetRandomInt(1,2) == 1)
    			{
    				AcceptEntityInput(EIBA,"Disable");
    				AcceptEntityInput(EIBB,"Enable");
    				BSAL = "B";
    			}
    			else
    			{
    				AcceptEntityInput(EIBB,"Disable");
    				AcceptEntityInput(EIBA,"Enable");
    				BSAL = "A";
    			}
    			decl String:CurrentMap[256];
    			GetCurrentMap(CurrentMap,sizeof(CurrentMap));
    			for(new i=0; i<STANDARDMAPSMAX; i++)
    			{
    				if(StrEqual(CurrentMap,StandardMaps[i][0],false)) 
    				{
    					if(StrEqual(StandardMaps[i][1],"B",false))
    					{
    						AcceptEntityInput(EIBA,"Disable");
    						AcceptEntityInput(EIBB,"Enable");
    						BSAL = "B";
    					}
    					else
    					{
    						AcceptEntityInput(EIBB,"Disable");
    						AcceptEntityInput(EIBA,"Enable");
    						BSAL = "A";
    					}
    				}
    			}
    			if(GetClientCount(true) > 1)
    			{
    				Message();
    				Timer = CreateTimer(15.0,RepeatMessage, _,TIMER_REPEAT); 
    			}
    		}
    	}
    }
    public Action:Event_RoundEnd (Handle:event,const String:name[],bool:dontBroadcast)
    {
    	if(Timer != INVALID_HANDLE)
    	{
    		CloseHandle(Timer);
    		Timer = INVALID_HANDLE;
    	}
    	if(IsValidEntity(EIBA)) 
    	{
    		AcceptEntityInput(EIBA,"Enable");
    		EIBA = -1;
    	}
    	if(IsValidEntity(EIBB)) 
    	{
    		AcceptEntityInput(EIBB,"Enable");
    		EIBB = -1;
    	}
    }
    
    /* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
    *{\\ rtf1\\ ansi\\ deff0{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ lang1045\\ f0\\ fs16 \n\\ par }
    */

    Po dodaniu frazy de_mirage plugin nie chce się skompilować.

    • Super! 1
  3. 11 minut temu, GoldeneK napisał:

    Zmień kolejność w tym kodzie co ci dał baron: VIP admin opiekun wlasciciel 

    #pragma semicolon 1
    
    #define DEBUG
    
    #define PLUGIN_AUTHOR ""
    #define PLUGIN_VERSION "0.00"
    
    #include <sourcemod>
    #include <sdktools>
    #include <cstrike>
    //#include <sdkhooks>
    
    EngineVersion g_Game;
    
    public Plugin:myinfo = 
    {
    	name = "",
    	author = PLUGIN_AUTHOR,
    	description = "",
    	version = PLUGIN_VERSION,
    	url = ""
    };
    
    public void OnPluginStart()
    {
    	HookEvent("player_spawn", Event_TagTable);
    }
    
    public Action Event_TagTable(Handle hEvent, const char[] chName, bool bDontBroadcast)
    {
    	int client = GetClientOfUserId(GetEventInt(hEvent, "userid"));
    	
    	if (IsValidClient(client))
    	{
    		CS_SetClientClanTag(client, "- Gracz -");
    	}
    	if (GetAdminFlag(GetUserAdmin(client), Admin_Reservation))
    	{
    		CS_SetClientClanTag(client, "[VIP]");
    	if (GetAdminFlag(GetUserAdmin(client), Admin_Generic))
    	{
    		CS_SetClientClanTag(client, "[Admin]");
    	}
    	if (GetAdminFlag(GetUserAdmin(client), Admin_Root))
    	{
    		CS_SetClientClanTag(client, "[Właściciel]");
    	}
    }
    
    bool IsValidClient(int client)
    {
    	if (client <= 0 || client > MaxClients) {
    		return false;
    	}
    	
    	if (!IsClientInGame(client)) {
    		return false;
    	}
    	
    	if (IsFakeClient(client)) {
    		return false;
    	}
    	
    	return true;
    } 

    tak ?

  4. 12 minut temu, styllek napisał:

    @Baron ja posiadam ten sam plugin i wszystko działa ;) i jest w tym else. 

     

    Spróbuj tego tylko zamien nazwy grup na swoje itd. mi wszystko działa na tym:\

     

    
    #include <sourcemod>
    #include <cstrike>
    
    public Plugin:myinfo = 
    {
    	name = "Tag Admin",
    	author = "Hamp",
    	description = "Ustawia tagi w tabeli wynikow",
    	version = "1.0",
    	url = "www.MyGo.pl"
    }
    
    
    public OnPluginStart()
    {	
    	HookEvent("player_team", Event_TagTable);
    	HookEvent("player_spawn", Event_TagTable);
    }
    
    
    public Action:Event_TagTable(Handle:event, String:name[], bool:dontBroadcast)
    {
    	new client = GetClientOfUserId(GetEventInt(event, "userid"));
    	if (GetUserFlagBits(client) & ADMFLAG_ROOT)
    	{
    		CS_SetClientClanTag(client, "★ Head Admin ★");
    	}
    	
    	else
    	
    	if (GetUserFlagBits(client) & ADMFLAG_CUSTOM3)
    	{
    		CS_SetClientClanTag(client, "- Opiekun -");
    	}
    	
    	if (GetUserFlagBits(client) & ADMFLAG_GENERIC)
    	{
    		CS_SetClientClanTag(client, "- Admin -");
    	}
    	
    	else
    	
    	if (GetUserFlagBits(client) & ADMFLAG_CUSTOM6)
    	{
    		CS_SetClientClanTag(client, "- VIP -");
    	}
    	
    	else
    	
    	if (GetUserFlagBits(client) & ADMFLAG_CUSTOM1)
    	{
    		CS_SetClientClanTag(client, "- Super VIP -");
    	}
    	
    	else
    	
    	{
    		CS_SetClientClanTag(client, "- Gracz -");
    	}
    }

     

    Nie chce mi dopisać tab clanu 

  5. Przed chwilą, Baron napisał:

    Użyj tego co ci podałem, a nie używaj tego szitu 

    Mam jeden problem nie pokazuje mi rangi właściciel tylko vip.

    #include <sourcemod>
    #include <cstrike>
    
    public Plugin:myinfo =
    {
    	name = "AdminTag",
    	description = "Private plugin",
    	author = "dk",
    	version = "1.0",
    	url = "http://blblba"
    };
    public void OnPluginStart()
    {
    	HookEvent("player_spawn", Event_TagTable);
    }
    
    public Action Event_TagTable(Handle hEvent, const char[] chName, bool bDontBroadcast)
    {
    	int client = GetClientOfUserId(GetEventInt(hEvent, "userid"));
    	
    	if (IsValidClient(client))
    	{
    		CS_SetClientClanTag(client, "- Gracz -");
    	}
    	if (GetAdminFlag(GetUserAdmin(client), Admin_Generic))
    	{
    		CS_SetClientClanTag(client, "[Admin]");
    	}
    	if (GetAdminFlag(GetUserAdmin(client), Admin_Root))
    	{
    		CS_SetClientClanTag(client, "[Właściciel]");
    	}
    	if (GetAdminFlag(GetUserAdmin(client), Admin_Reservation))
    	{
    		CS_SetClientClanTag(client, "- VIP -");
    	}
    }
    
    bool IsValidClient(int client)
    {
    	if (client <= 0 || client > MaxClients) {
    		return false;
    	}
    	
    	if (!IsClientInGame(client)) {
    		return false;
    	}
    	
    	if (IsFakeClient(client)) {
    		return false;
    	}
    	
    	return true;
    } 

     

  6. Dnia 22.08.2017 o 18:06, Baron napisał:

     

    czemu else ?

    czemu tak to napisane? 

     

    
    public void OnPluginStart()
    {
    	HookEvent("player_spawn", Event_TagTable);
    }
    
    public Action Event_TagTable(Handle hEvent, const char[] chName, bool bDontBroadcast)
    {
    	int client = GetClientOfUserId(GetEventInt(hEvent, "userid"));
    	
    	if (IsValidClient(client))
    	{
    		CS_SetClientClanTag(client, "- Gracz -");
    	}
    	if (GetAdminFlag(GetUserAdmin(client), Admin_Generic))
    	{
    		CS_SetClientClanTag(client, "[Admin]");
    	}
    	if (GetAdminFlag(GetUserAdmin(client), Admin_Root))
    	{
    		CS_SetClientClanTag(client, "[Właściciel]");
    	}
    }
    
    bool IsValidClient(int client)
    {
    	if (client <= 0 || client > MaxClients) {
    		return false;
    	}
    	
    	if (!IsClientInGame(client)) {
    		return false;
    	}
    	
    	if (IsFakeClient(client)) {
    		return false;
    	}
    	
    	return true;
    } 

    Spytaj się tego pana 

     

     

  7. Witam chciałem dodać kilka dodatkowych grup do pluginu i trochę lipa bo sypie erroami oto sp

    #include <sourcemod>
    #include <cstrike>
    
    public Plugin:myinfo =
    {
    	name = "AdminTag",
    	description = "Private plugin",
    	author = "ProLog",
    	version = "1.0",
    	url = "http://prologia.pl/"
    };
    
    
    public OnPluginStart()
    {
    	HookEvent("player_team", Event, EventHookMode:1);
    	HookEvent("player_spawn", Event, EventHookMode:1);
    	return 0;
    }
    
    public OnClientPutInServer(client)
    {
    	HandleTag(client);
    	return 0;
    }
    
    public Action:Event(Handle:event, String:name[], bool:dontBroadcast)
    {
    	new client = GetClientOfUserId(GetEventInt(event, "userid"));
    	if (0 < client)
    	{
    		HandleTag(client);
    	}
    	return Action:0;
    }
    
    HandleTag(client)
    
    { 
        if (GetUserFlagBits(client) & ADMFLAG_ROOT) 
        { 
            CS_SetClientClanTag(client, "[WLASCICIEL]"); 
        }
        else
    		if (GetUserFlagBits(client) & ADMFLAG_CUSTOM6)
    		{ 
    			CS_SetClientClanTag(client, "[ADMIN]"); 
    		}
    		else
    				if (GetUserFlagBits(client) & ADMFLAG_GENERIC)
    				{ 
    					CS_SetClientClanTag(client, "[OPIEKUN]"); 
    				}
    				else
    					if (GetUserFlagBits(client) & ADMFLAG_RESERVATION)
    					{ 
    						CS_SetClientClanTag(client, "[VIP]"); 
    					}
    						else
    						{ 
    							CS_SetClientClanTag(client, "[GRACZ]"); 
    						}	
    }

     

×
×
  • Dodaj nową pozycję...