Categoria unde se postează orice altceva ce nu își are locul în celelalte categorii despre Counter-Strike: Global Offensive.
Moderators: Moderatori ajutatori, Moderatori, Echipa eXtreamCS.com
-
tre3fla
- Membru eXtream
- Posts: 5317
- Joined: 27 May 2012, 11:15
- Detinator Steam: Da
- CS Status: Allah Akbar !
- Detinator server CS: Nu
- SteamID: /id/tre3fla_xxx
- Has thanked: 14 times
- Been thanked: 129 times
04 Dec 2016, 15:12
Am revenit cu un nou plugin proaspat scos din Pawn Studio, scris de 10 minute. Am gasit niste addonsuri vechi de 1.6 pe un site de cloud si in unul din ele era un plugin similar asa ca am scris unul si pentru CSGO. Sper sa va fie de folos :)
Download:
GirlShare |
FileShare |
Mega
- SayTransfer.sp | Afiseaza codul
/* Plugin Template generated by Pawn Studio */
#include <sourcemod>
#include <cstrike>
#include <csgocolors>
#include <sdktools>
new Handle: Cooldown
new Handle: TeamMax
new Handle: MaxSpecs
new iRoundsPassed[ MAXPLAYERS+1 ]
bool: CanTransfer[ MAXPLAYERS+1 ]
public Plugin:myinfo = {
name = "Say Transfer",
author = "tre3fla",
description = "Trasfer catre alta echipa in chat",
version = "1.0",
url = "http://extreamcs.com/forum"
}
public OnPluginStart( ) {
Cooldown = CreateConVar( "sm_transfer_cooldown", "2", "La cate runde se poate transfera un jucator" )
TeamMax = CreateConVar( "sm_transfer_max_players", "12", "Numarul maxim de jucator permis intr-o echipa" )
MaxSpecs = CreateConVar( "sm_transfer_max_specs", "5", "Numarul maxim de spectatori permisi" )
RegConsoleCmd( "t", Transfer_Tero )
RegConsoleCmd( "ct", Transfer_CT )
RegConsoleCmd( "spec", Transfer_Spec )
HookEvent( "round_start", Event_RoundStart, EventHookMode_PostNoCopy )
HookEvent( "round_end", Event_RoundEnd, EventHookMode_PostNoCopy )
}
public OnClientPutInServer( client ) {
if( !IsFakeClient( client ) && GetConVarInt( Cooldown ) > 0 ) {
CanTransfer[ client ] = false
iRoundsPassed[ client ] = 0
}
}
public OnClientDisconnect( client ) {
if( !IsFakeClient( client ) && GetConVarInt( Cooldown ) > 0 ) {
CanTransfer[ client ] = false
iRoundsPassed[ client ] = 0
}
}
public void Event_RoundStart( Event ev, const char[ ] name, bool dontBroadcast ) {
for( new i = 1; i <= MaxClients; i++ ) {
if( IsClientInGame( i ) && !IsFakeClient( i ) ) {
if( !CanTransfer[ i ] && GetConVarInt( Cooldown ) > 0 ) {
iRoundsPassed[ i ] ++
if( iRoundsPassed[ i ] >= GetConVarInt( Cooldown ) ) {
CanTransfer[ i ] = true
iRoundsPassed[ i ] = 0
}
}
}
}
}
public void Event_RoundEnd( Handle event, const char[ ] name, bool dontBroadcast ) {
for( new i = 1; i <= MaxClients; i++ ) {
if( IsClientInGame( i ) && !IsFakeClient( i ) && !CanTransfer[ i ] && GetConVarInt( Cooldown ) > 0 && iRoundsPassed[ i ] >= GetConVarInt( Cooldown ) ) {
CanTransfer[ i ] = true
iRoundsPassed[ i ] = 0
PrintToChat( i, "{GREEN}Acum poti schimba echipa ! ! !" )
}
}
}
public Action: Transfer_Tero( client, args ) {
if( !CanTransfer[ client ] && GetConVarInt( Cooldown ) > 0 && GetClientTeam( client ) != CS_TEAM_SPECTATOR ) {
CPrintToChat( client, "{GREEN}[Transfer]{NORMAL} Te-ai alaturat recent unei echipe. Poti schimba echipa odata la{RED} %d runde", GetConVarInt( Cooldown ) )
return Plugin_Handled
}
if( GetClientTeam( client ) == CS_TEAM_T ) {
CPrintToChat( client, "{GREEN}[Transfer]{NORMAL} Esti deja\x09 terorist !" )
return Plugin_Handled
}
int iNum
for( new i = 1; i < MaxClients; i++ ) {
if( IsClientInGame( i ) && GetClientTeam( i ) == CS_TEAM_T ) {
iNum++
}
}
if( iNum > GetConVarInt( TeamMax ) ) {
CPrintToChat( client, "{GREEN}[Transfer]{NORMAL} Nu te poti transfera ! Sunt deja prea multi\x09 Teroristi !" )
return Plugin_Handled
}
CS_SwitchTeam( client, CS_TEAM_T )
if( GetConVarInt( Cooldown ) > 0 ) {
CanTransfer[ client ] = false
}
if( IsPlayerAlive( client ) ) {
ForcePlayerSuicide( client )
}
CPrintToChat( client, "{GREEN}[Transfer]{NORMAL} Ai fost transferat la echipa\x09 Terrorists !" )
return Plugin_Handled
}
public Action: Transfer_CT( client, args ) {
if( !CanTransfer[ client ] && GetConVarInt( Cooldown ) > 0 && GetClientTeam( client ) != CS_TEAM_SPECTATOR ) {
CPrintToChat( client, "{GREEN}[Transfer]{NORMAL} Te-ai alaturat recent unei echipe. Poti schimba echipa odata la{RED} %d runde", GetConVarInt( Cooldown ) )
return Plugin_Handled
}
if( GetClientTeam( client ) == CS_TEAM_CT ) {
CPrintToChat( client, "{GREEN}[Transfer]{NORMAL} Esti deja\x09 Counter-Terorist !" )
return Plugin_Handled
}
int iNum
for( new i = 1; i < MaxClients; i++ ) {
if( IsClientInGame( i ) && GetClientTeam( i ) == CS_TEAM_CT ) {
iNum++
}
}
if( iNum > GetConVarInt( MaxSpecs ) ) {
CPrintToChat( client, "{GREEN}[Transfer]{NORMAL} Nu te poti transfera ! Sunt deja prea multi{BLUE} Counter-Teroristi !" )
return Plugin_Handled
}
CS_SwitchTeam( client, CS_TEAM_CT )
if( GetConVarInt( Cooldown ) > 0 ) {
CanTransfer[ client ] = false
}
if( IsPlayerAlive( client ) ) {
ForcePlayerSuicide( client )
}
CPrintToChat( client, "{GREEN}[Transfer]{NORMAL} Ai fost transferat la echipa\x09 Counter-Terrorists !" )
return Plugin_Handled
}
public Action: Transfer_Spec( client, args ) {
if( !CanTransfer[ client ] && GetConVarInt( Cooldown ) > 0 ) {
CPrintToChat( client, "{GREEN}[Transfer]{NORMAL} Te-ai alaturat recent unei echipe. Poti schimba echipa odata la{RED} %d runde", GetConVarInt( Cooldown ) )
return Plugin_Handled
}
if( GetClientTeam( client ) == CS_TEAM_SPECTATOR ) {
CPrintToChat( client, "{GREEN}[Transfer]{NORMAL} Esti deja\x09 Spectator !" )
return Plugin_Handled
}
int iNum
for( new i = 1; i < MaxClients; i++ ) {
if( IsClientInGame( i ) && GetClientTeam( i ) == CS_TEAM_SPECTATOR ) {
iNum++
}
}
if( iNum > GetConVarInt( TeamMax ) ) {
CPrintToChat( client, "{GREEN}[Transfer]{NORMAL} Nu te poti transfera ! Sunt deja prea multi{GRAY} spectatori !" )
return Plugin_Handled
}
ChangeClientTeam( client, CS_TEAM_SPECTATOR )
if( GetConVarInt( Cooldown ) > 0 ) {
CanTransfer[ client ] = false
}
if( IsPlayerAlive( client ) ) {
ForcePlayerSuicide( client )
}
CPrintToChat( client, "{GREEN}[Transfer]{NORMAL} Ai fost transferat la{GRAY} Spectators !" )
return Plugin_Handled
}
Nume: Say Transfer
Autor: tre3fla
Versiune: v1.0
Descriere:
Cu ajutorul acestui plugin jucatorii se pot transfera la alta echipa folosind cateva comenzi simple in chat.
Comenzi:
- say /t - Transfera jucatorul la echipa Tero
- say /ct - Transfera jucatorul la echipa CT
- say /spec - Transfera jucatorul la Spectatori
Cvar-uri (se adauga in server.cfg)
- sm_transfer_cooldown - Odata la cate runde isi poate schimba jucatorul echipa (default: 2 | 0 dezactiveaza cooldown )
- sm_transfer_max_players - Numarul maxim de jucatori permisi intr-o echipa (valabil doar pentru T&CT) (default: 12)
- sm_transfer_max_specs - Numarul maxim de spectatori permisi (default: 5)
Poze:
- Nu sunt momentan, daca cineva foloseste acest plugin si vrea sa lase cateva screenuri sunt binevenite !
Instalare:
1. Fisierul
SayTransfer.sp se adauga in
addons/sourcemod/scripting
2. Fisierul
SayTransfer.smx se adauga in
addons/sourcemod/plugins
3. Fisierul
csgocolors.inc se adauga in
addons/sourcemod/scripting/include
Extra Info:
- Jucatorii care sunt spectatori pot reveni oricand la joc.
- Atunci cand te connectezi si alegi echipa din meniu primesti automat cooldown (daca este activ cooldown-ul)
- Acest plugin nu blocheaza si mutarile din Team Menu, doar cele care sunt facute din comenzile in chat (t/ct/spec), deci jucatorii tot isi pot schimba echipa din Team Menu
Nu ofer modificari private prin PM, orice modificare se ofera in topic.
-
SupaHotFire
- Utilizator neserios (tepar)
- Posts: 224
- Joined: 03 Oct 2016, 19:59
- Detinator Steam: Da
- Reputatie: Utilizator neserios ( tepar )
- Fond eXtream: 0
20 Dec 2016, 01:23
Sefane nu ai colorat pluginul cum trebuia.
Pluginul colorat de tine
- Poza | Afiseaza codul
Pluginul colorat de mine
- Poza | Afiseaza codul
Poftim si sursa
- | Afiseaza codul
/* Plugin Template generated by Pawn Studio */
#include <sourcemod>
#include <cstrike>
#include <csgocolors>
#include <sdktools>
new Handle: Cooldown
new Handle: TeamMax
new Handle: MaxSpecs
new iRoundsPassed[ MAXPLAYERS+1 ]
bool: CanTransfer[ MAXPLAYERS+1 ]
public Plugin:myinfo = {
name = "Say Transfer",
author = "tre3fla",
description = "Trasfer catre alta echipa in chat",
version = "1.0",
url = "http://extreamcs.com/forum"
}
public OnPluginStart( ) {
Cooldown = CreateConVar( "sm_transfer_cooldown", "2", "La cate runde se poate transfera un jucator" )
TeamMax = CreateConVar( "sm_transfer_max_players", "12", "Numarul maxim de jucator permis intr-o echipa" )
MaxSpecs = CreateConVar( "sm_transfer_max_specs", "5", "Numarul maxim de spectatori permisi" )
RegConsoleCmd( "t", Transfer_Tero )
RegConsoleCmd( "ct", Transfer_CT )
RegConsoleCmd( "spec", Transfer_Spec )
HookEvent( "round_start", Event_RoundStart, EventHookMode_PostNoCopy )
HookEvent( "round_end", Event_RoundEnd, EventHookMode_PostNoCopy )
}
public OnClientPutInServer( client ) {
if( !IsFakeClient( client ) && GetConVarInt( Cooldown ) > 0 ) {
CanTransfer[ client ] = false
iRoundsPassed[ client ] = 0
}
}
public OnClientDisconnect( client ) {
if( !IsFakeClient( client ) && GetConVarInt( Cooldown ) > 0 ) {
CanTransfer[ client ] = false
iRoundsPassed[ client ] = 0
}
}
public void Event_RoundStart( Event ev, const char[ ] name, bool dontBroadcast ) {
for( new i = 1; i <= MaxClients; i++ ) {
if( IsClientInGame( i ) && !IsFakeClient( i ) ) {
if( !CanTransfer[ i ] && GetConVarInt( Cooldown ) > 0 ) {
iRoundsPassed[ i ] ++
if( iRoundsPassed[ i ] >= GetConVarInt( Cooldown ) ) {
CanTransfer[ i ] = true
iRoundsPassed[ i ] = 0
}
}
}
}
}
public void Event_RoundEnd( Handle event, const char[ ] name, bool dontBroadcast ) {
for( new i = 1; i <= MaxClients; i++ ) {
if( IsClientInGame( i ) && !IsFakeClient( i ) && !CanTransfer[ i ] && GetConVarInt( Cooldown ) > 0 && iRoundsPassed[ i ] >= GetConVarInt( Cooldown ) ) {
CanTransfer[ i ] = true
iRoundsPassed[ i ] = 0
PrintToChat( i, "\x04Acum poti schimba echipa ! ! !" )
}
}
}
public Action: Transfer_Tero( client, args ) {
if( !CanTransfer[ client ] && GetConVarInt( Cooldown ) > 0 && GetClientTeam( client ) != CS_TEAM_SPECTATOR ) {
CPrintToChat( client, "\x04[Transfer]\x01 Te-ai alaturat recent unei echipe. Poti schimba echipa odata la\x02 %d \x01runde", GetConVarInt( Cooldown ) )
return Plugin_Handled
}
if( GetClientTeam( client ) == CS_TEAM_T ) {
CPrintToChat( client, "\x04[Transfer]\x01 Esti deja\x02 terorist !" )
return Plugin_Handled
}
int iNum
for( new i = 1; i < MaxClients; i++ ) {
if( IsClientInGame( i ) && GetClientTeam( i ) == CS_TEAM_T ) {
iNum++
}
}
if( iNum > GetConVarInt( TeamMax ) ) {
CPrintToChat( client, "\x04[Transfer]\x01 Nu te poti transfera ! Sunt deja prea multi\x02 Teroristi !" )
return Plugin_Handled
}
CS_SwitchTeam( client, CS_TEAM_T )
if( GetConVarInt( Cooldown ) > 0 ) {
CanTransfer[ client ] = false
}
if( IsPlayerAlive( client ) ) {
ForcePlayerSuicide( client )
}
CPrintToChat( client, "\x04[Transfer]\x01 Ai fost transferat la echipa\x02 Terrorists !" )
return Plugin_Handled
}
public Action: Transfer_CT( client, args ) {
if( !CanTransfer[ client ] && GetConVarInt( Cooldown ) > 0 && GetClientTeam( client ) != CS_TEAM_SPECTATOR ) {
CPrintToChat( client, "\x04[Transfer]\x01 Te-ai alaturat recent unei echipe. Poti schimba echipa odata la\x02 %d \x01runde", GetConVarInt( Cooldown ) )
return Plugin_Handled
}
if( GetClientTeam( client ) == CS_TEAM_CT ) {
CPrintToChat( client, "\x04[Transfer]\x01 Esti deja\x02 Counter-Terorist !" )
return Plugin_Handled
}
int iNum
for( new i = 1; i < MaxClients; i++ ) {
if( IsClientInGame( i ) && GetClientTeam( i ) == CS_TEAM_CT ) {
iNum++
}
}
if( iNum > GetConVarInt( MaxSpecs ) ) {
CPrintToChat( client, "\x04[Transfer]\x01 Nu te poti transfera ! Sunt deja prea multi\x02 Counter-Teroristi !" )
return Plugin_Handled
}
CS_SwitchTeam( client, CS_TEAM_CT )
if( GetConVarInt( Cooldown ) > 0 ) {
CanTransfer[ client ] = false
}
if( IsPlayerAlive( client ) ) {
ForcePlayerSuicide( client )
}
CPrintToChat( client, "\x04[Transfer]\x01 Ai fost transferat la echipa\x02 Counter-Terrorists !" )
return Plugin_Handled
}
public Action: Transfer_Spec( client, args ) {
if( !CanTransfer[ client ] && GetConVarInt( Cooldown ) > 0 ) {
CPrintToChat( client, "\x04[Transfer]\x01 Te-ai alaturat recent unei echipe. Poti schimba echipa odata la\x02 %d \x01runde", GetConVarInt( Cooldown ) )
return Plugin_Handled
}
if( GetClientTeam( client ) == CS_TEAM_SPECTATOR ) {
CPrintToChat( client, "\x04[Transfer]\x01 Esti deja\x02 Spectator !" )
return Plugin_Handled
}
int iNum
for( new i = 1; i < MaxClients; i++ ) {
if( IsClientInGame( i ) && GetClientTeam( i ) == CS_TEAM_SPECTATOR ) {
iNum++
}
}
if( iNum > GetConVarInt( TeamMax ) ) {
CPrintToChat( client, "\x04[Transfer]\x01 Nu te poti transfera ! Sunt deja prea multi\x02 spectatori !" )
return Plugin_Handled
}
ChangeClientTeam( client, CS_TEAM_SPECTATOR )
if( GetConVarInt( Cooldown ) > 0 ) {
CanTransfer[ client ] = false
}
if( IsPlayerAlive( client ) ) {
ForcePlayerSuicide( client )
}
CPrintToChat( client, "\x04[Transfer]\x01 Ai fost transferat la\x02 Spectators !" )
return Plugin_Handled
}
ti-am spus sa nu mai folosesti codurile de culori cu acolada, nu merg toate. La fel si admin chat colors e prost colorat.
Foloseste aceste coduri pe viitor.
- poza | Afiseaza codul
-
Users browsing this forum: No registered users and 12 guests