Se repeta hartile la plugin-ul /harti

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

Moderators: Moderatori ajutatori, Moderatori, Echipa eXtreamCS.com

Post Reply
User avatar
Edi.
eXtream Mod
eXtream Mod
Posts: 5391
Joined: 08 Jul 2009, 08:38
Detinator Steam: Da
SteamID: Hozzakwaz
Reputatie: Nume anterior: Eddy ;X
eXtream Mod
Fost Intermediar
Location: Botoşani / Iaşi
Has thanked: 109 times
Been thanked: 247 times
Contact:

23 Mar 2013, 05:15

Salut, am tot schimbat pluginu`l asta pana mi-a iesit pe ochii.

cand dau /harti se repeta hartile gen: fy_snow fy_snow dust2 dust2 infeno

Si ele au fost doar odata, oare cum pot rezolva asta ?
Image
RoyalServer
User avatar
Edi.
eXtream Mod
eXtream Mod
Posts: 5391
Joined: 08 Jul 2009, 08:38
Detinator Steam: Da
SteamID: Hozzakwaz
Reputatie: Nume anterior: Eddy ;X
eXtream Mod
Fost Intermediar
Location: Botoşani / Iaşi
Has thanked: 109 times
Been thanked: 247 times
Contact:

24 Mar 2013, 19:39

Careva ??
Image
User avatar
cyby
Scripter eXtreamCS
Scripter eXtreamCS
Posts: 1777
Joined: 16 Jul 2011, 21:46
Detinator Steam: Da
Detinator server CS: Da
Reputatie: Scripter eXtreamCS
Fost Moderator ajutator
Has thanked: 146 times
Been thanked: 396 times

25 Mar 2013, 00:59

Verifica asta:

Code: Select all

#include <amxmodx>

#define MAX_MAPS	5

new g_MapNames[MAX_MAPS][34]

public plugin_init() {
	register_plugin("last played maps", "0.2", "ConnorMcLeod")
	register_clcmd("amx_lastmaps", "lastmapsCmd")
	register_clcmd("say /lastmaps", "lastmapsSayCmd")
}

public plugin_cfg() {
	new szLastMapsFile[64]
	
	get_localinfo("amxx_configsdir", szLastMapsFile, 63)
	format(szLastMapsFile, 63, "%s/lastmaps.txt", szLastMapsFile)

	new File = fopen(szLastMapsFile, "rt")
	new i
	new Temp[34]
	if(File)
	{
		for(i=0; i<MAX_MAPS; i++)
		{
			if(!feof(File))
			{
				fgets(File, Temp, 33)
				replace(Temp, 33, "^n", "")
				formatex(g_MapNames[i], 33, Temp)
			}
		}
		fclose(File)
	}

	delete_file(szLastMapsFile)

	new CurrentMap[34]
	get_mapname(CurrentMap, 33)

	File = fopen(szLastMapsFile, "wt")
	if(File)
	{
		formatex(Temp, 33, "%s^n", CurrentMap)
		fputs(File, Temp)
		for(i=0; i<MAX_MAPS-1; i++)
		{
			CurrentMap = g_MapNames[i]
			if(!CurrentMap[0])
				break
			formatex(Temp, 33, "%s^n", CurrentMap)
			fputs(File, Temp)
		}
		fclose(File)
	}
}

public lastmapsCmd(id) {
	new LastMaps[256], n
	n += formatex(LastMaps[n], 255-n, "Ultimele harti jucate :")
	for(new i; i<MAX_MAPS; i++)
	{
		if(!g_MapNames[i][0])
			break
		n += formatex(LastMaps[n], 255-n, "^n%s", g_MapNames[i])
	}
	client_print(id, print_console, LastMaps)
	return PLUGIN_HANDLED
}

public lastmapsSayCmd(id) {
	new LastMaps[192], n
	n += formatex(LastMaps[n], 191-n, "Ultimele harti jucate :")
	for(new i; i<MAX_MAPS; i++)
	{
		if(!g_MapNames[i][0])
		{
			n += formatex(LastMaps[n-1], 191-n+1, ".")
			break
		}
		n += formatex(LastMaps[n], 191-n, " %s%s", g_MapNames[i], i+1 == MAX_MAPS ? "." : ",")
	}
	client_print(id, print_chat, LastMaps)
	return PLUGIN_CONTINUE
}
93.114.82.17:27015 - Monster Invasion CO-OP Mod
Post Reply

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

  • Information