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

naXe

Użytkownik
  • Postów

    100
  • Dołączył

  • Ostatnia wizyta

  • Wygrane w rankingu

    6

Odpowiedzi opublikowane przez naXe

  1. #pragma semicolon 1
    
    #include <sourcemod>
    #include <sdktools>
    
    new bool:bGotWeapon[MAXPLAYERS + 1];
    
    public Plugin:myinfo = {
    	name = "Free AK47 for CT's",
    	author = "naXe",
    	description = "Dodaje AK47 po odrodzeniu gracza",
    	version = "1.0",
    	url = "http://gamesolutions.pl"
    };
    
    public OnPluginStart()
    	HookEvent("player_spawn", OnPlayerSpawn);
    
    public OnClientConnected(client)
    	bGotWeapon[client] = true;
    
    public OnClientDisconnected(client)
    	bGotWeapon[client] = false;
    
    public Action:OnPlayerSpawn(Handle:event, const String:name[], bool:dontBroadcast) {
    	int client = GetClientOfUserId(GetEventInt(event, "userid"));
    	if(1 <= client <= MaxClients && IsPlayerAlive(client) && GetClientTeam(client) == 3 && !bGotWeapon[client]) {
    		CreateTimer(0.2, GiveWeapons, GetClientUserId(client));
    	}
    }
    
    public Action:GiveWeapons(Handle:timer, any:userid) {
    	int client = GetClientOfUserId(userid);
    	GivePlayerItem(client, "weapon_ak47");
    	bGotWeapon[client] = true;
    }

     

  2. #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"));
    	static String: szTag[22], String: szOldTag[22];
    
    	switch(GetUserFlagBits(client)) {
    		case ADMFLAG_ROOT: strcopy(szTag, sizeof szTag, "[Owner]");
    		case ADMFLAG_GENERIC: strcopy(szTag, sizeof szTag, "[Admin]");
    		case ADMFLAG_CUSTOM6: strcopy(szTag, sizeof szTag, "[VIP]");
    		default: strcopy(szTag, sizeof szTag, "[Gracz]");
    	}
    
    	CS_GetClientClanTag(client, szOldTag, sizeof szOldTag);
    	if(!StrEqual(szOldTag, szTag)) CS_SetClientClanTag(client, szTag);
    }

     

  3. #include <sourcemod>
    
    #pragma semicolon 1
    
    public Plugin myinfo = {
    	name        = "Freeze Players at Spawn",
    	author      = "naXe",
    	description = "Zamraża gracza po odrodzeniu",
    	version     = "1.0.0",
    	url         = "http://gamesolutions.pl"
    };
    
    Handle g_hFreezeTimer[MAXPLAYERS + 1];
    
    public void OnPluginStart() {
    	HookEvent("player_spawn", Event_PlayerSpawn);
    }
    
    public Action:Event_PlayerSpawn(Handle:event, const String:name[], bool:dontBroadcast) {
    	int client = GetClientOfUserId(GetEventInt(event, "userid"));
    
    	if(IsPlayerAlive(client) && 2 <= GetClientTeam(client) <= 3) {
    		SetEntPropFloat(client, Prop_Data, "m_flLaggedMovementValue", 0.0);
    		g_hFreezeTimer[client] = CreateTimer(GetClientTeam(client) == 2 ? 60.0 : 42.0, UnFreezeClient, client);
    	}
    }
    
    public Action UnFreezeClient(Handle timer, any client) {
    	if(IsClientInGame(client))
    		SetEntPropFloat(client, Prop_Data, "m_flLaggedMovementValue", 1.0);
    
    	g_hFreezeTimer[client] = null;
    }

     

  4. #include <sourcemod>
    #include <sdktools>
    
    #pragma semicolon 1
    
    new Handle:g_iCvar = INVALID_HANDLE;
    new String:g_szSoundName[80];
    
    public Plugin myinfo = {
    	name        = "Kill Sound",
    	author      = "naXe",
    	description = "Odtwarza dźwięk wszystkim graczom, gdy ktoś zginie.",
    	version     = "0.0.1",
    	url         = "http://gamesolutions.pl"
    };
    
    public OnPluginStart() {
    	g_iCvar = CreateConVar("sm_kill_sound", "kill.mp3", "Ścieżka oraz nazwa dźwięku (bez sound/!)");
    
    	HookEvent("player_death", Event_PlayerDeath, EventHookMode_Pre);
    }
    
    public OnConfigsExecuted() {
    	GetConVarString(g_iCvar, g_szSoundName, 80);
    	decl String:szBuffer[80];
    	PrecacheSound(g_szSoundName, true);
    	Format(szBuffer, 80, "sound/%s", g_szSoundName);
    	AddFileToDownloadsTable(szBuffer);
    }
    
    public Action Event_PlayerDeath(Event event, const char[] name, bool dontBroadcast) {
    	for(new i = 1; i <= GetMaxHumanPlayers(); i++) {
    		if(!IsClientInGame(i) || !IsFakeClient(i) || GetClientOfUserId(GetEventInt(event, "userid")) == i) continue;
    
    		EmitSoundToClient(i, g_szSoundName);
    	}
    }

    Cvar: sm_kill_sound "dźwięk"

×
×
  • Dodaj nową pozycję...