Skocz do zawartości

Witamy w Nieoficjalnym polskim support'cie AMX Mod X

Witamy w Nieoficjalnym polskim support'cie AMX Mod X, jak w większości społeczności internetowych musisz się zarejestrować aby móc odpowiadać lub zakładać nowe tematy, ale nie bój się to jest prosty proces w którym wymagamy minimalnych informacji.
  • Rozpoczynaj nowe tematy i odpowiedaj na inne
  • Zapisz się do tematów i for, aby otrzymywać automatyczne uaktualnienia
  • Dodawaj wydarzenia do kalendarza społecznościowego
  • Stwórz swój własny profil i zdobywaj nowych znajomych
  • Zdobywaj nowe doświadczenia

Dołączona grafika Dołączona grafika

Guest Message by DevFuse
 

Wklejka 131988342715387 dodana przez fdrest, 29.10.2011 11:17
Typ:


131988342715387
1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.
12.
13.
14.
15.
16.
17.
18.
19.
20.
21.
22.
23.
24.
25.
26.
27.
28.
29.
30.
31.
32.
33.
34.
35.
36.
37.
38.
39.
40.
41.
42.
43.
44.
45.
46.
47.
48.
49.
50.
51.
52.
53.
54.
55.
56.
57.
58.
59.
60.
61.
62.
63.
64.
65.
66.
67.
68.
69.
70.
71.
72.
73.
74.
75.
76.
77.
78.
79.
80.
81.
82.
83.
84.
85.
86.
87.
88.
89.
90.
91.
92.
93.
94.
95.
96.
97.
98.
99.
100.
101.
102.
103.
104.
105.
106.
107.
108.
109.
110.
111.
112.
113.
114.
115.
116.
117.
118.
119.
120.
121.
122.
123.
124.
125.
126.
127.
128.
129.
130.
131.
132.
133.
134.
135.
136.
137.
//Bf2 Rank Mod forwards File
//Contains all the standard forwarded functions
 
#if defined bf2_forward_included
#endinput
#endif
#define bf2_forward_included
 
public plugin_precache()
{
	new tempSound[64];
	formatex(tempSound, charsmax(tempSound), "sound/%s", gSoundRank);
	if ( !file_exists(tempSound) )
	{
		copy(gSoundRank, charsmax(gSoundRank), "buttons/bell1.wav");
	}
 
	formatex(tempSound, charsmax(tempSound), "sound/%s", gSoundBadge);
	if ( !file_exists(tempSound) )
	{
		copy(gSoundBadge, charsmax(gSoundBadge), "fvox/bell.wav");
	}
 
	precache_sound(gSoundRank);
	precache_sound(gSoundBadge);
	precache_model("models/w_medkit.mdl");
 
	new bool:error = false;
	new spriteFile[26];
 
	for ( new counter; counter < MAX_RANKS+5; counter++)
	{
		spriteFile[0] = '^0';
		formatex(spriteFile, charsmax(spriteFile), "sprites/bf2rankspr/%d.spr", counter);
 
		//Done this way so that a message is logged for each missing file
		if ( !file_exists( spriteFile ) )
		{
			log_amx("[ERROR] Brakujacy plik sprite: ^"%s^"", spriteFile);
			error = true;
		}
		else {
			gSprite[counter] = precache_model(spriteFile);
		}
	}
 
	if ( error )
	{
		set_fail_state("Brakuje plikow sprite , zaladowanie pluginu niemozliwe! Sprawdz Logi AMXX");
	}
}
 
public plugin_cfg()
{
	get_configsdir(configsdir, charsmax(configsdir));
 
	//SQL
	#if defined SQL
	SQLenabled = false;
	set_task(1.0, "sql_init");
	#else
	vault_init();
	#endif
 
	set_cvar_string("bf2_version", gPluginVersion);
 
	if ( gPlayerName != -1 && get_xvar_num(gPlayerName) )
	{
		log_amx("miscstats.amxx ^"PlayerName^" opcja jest wlaczona, BF2 aim info nie będzie pokazywane.");
	}
 
	//set_task(10.0, "ranking_officer_disconnect");
}
 
public client_putinserver(id)
{
        // Find a czero bot to register Ham_Spawn
        if ( !gCZBotRegisterHam && gPcvarBotQuota && get_pcvar_num(gPcvarBotQuota) > 0 && is_user_bot(id) )
        {
                // Delay for private data to initialize
                set_task(0.1, "RegisterHam_CZBot", id);
        }
 
        g_imobile[id] = false;
        newplayer[id] = true;
        gStatsLoaded[id] = 0;
 
        get_save_key(id);
 
        if (!get_pcvar_num(gPcvarWymus))
        {
                client_cmd(id,"hud_centerid 0");
                client_cmd(id,"cl_shadows 0");
                set_task(20.0, "Announcement", id);
        }
        else
        {
                set_task(20.0, "Announcement", id);
        }
 
        RemoveHUD(id);
}
 
public client_disconnect(id)
{
        save_badges(id);
 
        if ( id == highestrankid )
        {
                set_task(2.0, "ranking_officer_disconnect");
        }
 
        clear_stat_globals(id);
        gStatsLoaded[id] = 0;
        RemoveHUD(id);
}
public plugin_end()
{
	server_save();
 
	#if defined SQL
	if ( SQLenabled )
	{
		//Free the handle thingy..
		SQL_FreeHandle(g_SqlTuple);
	}
	#else
	new pruneDelay = (NEGATIVE_SECONDSINDAY * get_pcvar_num(gPcvarPruneDays));
	nvault_prune(g_Vault, 0, get_systime(pruneDelay));
 
	nvault_close(g_Vault);
	#endif
}
/* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
*{\\ rtf1\\ ansi\\ deff0{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ lang1045\\ f0\\ fs16 \n\\ par }
*/