Nu mai inteleg ce se intampla..

Discutii legate de instalarea, configurarea si modificarea unui server de Counter-Strike.

Moderators: Moderatori ajutatori, Moderatori

Post Reply
L1oN98
Membru, skill 0
Membru, skill 0
Posts: 93
Joined: 26 Nov 2018, 19:52
Detinator Steam: Nu
CS Status: Citesc forumul eXtreamCS.com...!
Fond eXtream: 0
Contact:

30 Nov 2018, 02:09

Salut tuturor, dupa cum spune si titlul, chiar nu mai inteleg ce se intampla cu acest plugin..

Acum cateva ore mergea perfect tot pluginul, acum merge doar pe jumatate, cand mor sau cand scriu /respawn nu se mai intampla nimic..
desi cand sunt tero sau spectator si scriu /respawn imi apar acele mesaje "Atunci cand esti Terrorist nu poti folosi comanda /respawn" respectiv "Tasteaza /ct apoi foloseste comanda /respawn ".

Are cineva idee care ar fi cauza?
| Afiseaza codul
[code]
/* Plugin generated by AMXX-Studio */

#include <amxmodx>
#include <hamsandwich>
#include <cstrike>
#include <fun>

#define PLUGIN 		"ADVANCED - Respawn"
#define VERSION 		"1.0"
#define AUTHOR 		"K!D()X"

#pragma semicolon 1
new bool:g_Joined[33];

public plugin_init() {
	register_plugin(PLUGIN, VERSION, AUTHOR);
	
	register_event("DeathMsg", "iDeathMsg", "a");
	register_clcmd("say /respawn", "RespawnFunction");
	RegisterHam(Ham_Spawn, "player", "ham_PlayerSpawn", 1);

	register_cvar("sv_respawn", "1");
}

public RespawnFunction(id) {
	

	if(cs_get_user_team(id) == CS_TEAM_SPECTATOR) {
		K1d0x_C_Color(id, "#tTasteaza #g/ct #tapoi foloseste comanda #g/respawn #t!");
		return 1;
	}

	if(cs_get_user_team(id) == CS_TEAM_T) {
		K1d0x_C_Color(id, "#gAtunci cand esti #tTerrorist #gnu poti folosi comanda #t/respawn #g!");
		return 1;
	}
	
	set_task(1.0, "CheckFunction", id);
	
	return 0;
}

public iDeathMsg(){
	new id = read_data(2);
   
	set_task(1.0, "CheckFunction", id);
}

public client_putinserver(id) {
	g_Joined[id] = true;
	
	if(g_Joined[id]) {
		set_task(4.0, "CheckFunction", id);
		g_Joined[id] = false;
	}
}

public CheckFunction(id){
	if(get_cvar_num("sv_respawn") == 0 || is_user_bot(id))
		return 0;
	
	new iPlayers[32], iNum;
	
	if(g_Joined[id] || cs_get_user_team(id) == CS_TEAM_SPECTATOR) {
		return 0;
	} else if(cs_get_user_team(id) == CS_TEAM_T) {
		get_players(iPlayers, iNum, "aeh", "TERRORIST");
	} else if(cs_get_user_team(id) == CS_TEAM_CT) {
		get_players(iPlayers, iNum, "aeh", "CT");
	}
	
	
		if(cs_get_user_team(id) == CS_TEAM_CT) {
			ExecuteHamB(Ham_CS_RoundRespawn, id);
		}
	

	return 1;
}

stock K1d0x_C_Color(const id, const input[], any:...) {
	new szNumber = 1, szPlayers[32];
	
	static szMsg[191];
	vformat(szMsg, 190, input, 3);
	
	replace_all(szMsg, 190, "#g", "^4");         /*    Green color                                     */
	replace_all(szMsg, 190, "#c", "^1");        /*    Color of chat                                   */
	replace_all(szMsg, 190, "#t", "^3");       /*    Color of team CT = Blue | TERRORIST = Red       */
	replace_all(szMsg, 190, "#dt", "^0");     /*    Default color of team                           */
	
	if(id)
		szPlayers[0] = id;
	else
	
	get_players(szPlayers, szNumber, "ch"); {
		for(new i = 0; i < szNumber; i++) {
			if(is_user_connected(szPlayers)) {
				message_begin(MSG_ONE_UNRELIABLE, get_user_msgid("SayText"), _, szPlayers);
				write_byte(szPlayers);
				write_string(szMsg);
				message_end();
			}
		}
	}
}
[/code]
Last edited by Mădălin on 11 Dec 2018, 11:59, edited 1 time in total.
Reason: Foloseste codul sursa.
User avatar
Laurentiu P.
Super moderator
Super moderator
Posts: 2097
Joined: 10 Jul 2013, 20:26
Detinator Steam: Da
CS Status: Activitate scazuta !
Detinator server CS: Da
SteamID: trust_ro
Reputatie: Moderator > Super moderator
Nume anterior: Do[N]e ;3
Fond eXtream: 1
Location: Constanta
Has thanked: 4 times
Been thanked: 3 times

30 Nov 2018, 10:07

Si cei asa greu de inteles? Comanda functioneaza doar daca esti CT. Daca este SPECTATOR te muti la CT prin comanda "/ct" si apoi iti dai respawn.
Image
L1oN98
Membru, skill 0
Membru, skill 0
Posts: 93
Joined: 26 Nov 2018, 19:52
Detinator Steam: Nu
CS Status: Citesc forumul eXtreamCS.com...!
Fond eXtream: 0
Contact:

30 Nov 2018, 12:40

Stiu asta, dar problema e ca nu mai functioneaza comanda /respawn si respawn automat cand un CT moare, desi inainte mergea
Post Reply

Return to “Probleme la servere dedicate de Counter-Strike”

  • Information