ZSkills: cleaning
This commit is contained in:
		
							parent
							
								
									6fb88daab2
								
							
						
					
					
						commit
						abd942438a
					
				| @ -38,10 +38,10 @@ public Plugin myinfo = | ||||
| //---------------------------------------------------------------------------------------------------- | ||||
| public void OnPluginStart() | ||||
| { | ||||
| 	g_hCVar_ZAmmo_Enabled 			= CreateConVar("zr_zammo_enabled", "1", "", FCVAR_NONE, true, 0.0, true, 1.0); | ||||
| 	g_hCVar_ZAmmo_Enabled			= CreateConVar("zr_zammo_enabled", "1", "", FCVAR_NONE, true, 0.0, true, 1.0); | ||||
| 	g_hCVar_ZAmmo_Duration			= CreateConVar("zr_zammo_duration", "6", "", FCVAR_NONE, true, 1.0); | ||||
| 	g_hCVar_ZAmmo_Cost				= CreateConVar("zr_zammo_cost", "4500", "", FCVAR_NONE, true, 1.0); | ||||
| 	g_bZAmmo_Enabled 				= g_hCVar_ZAmmo_Enabled.BoolValue; | ||||
| 	g_bZAmmo_Enabled				= g_hCVar_ZAmmo_Enabled.BoolValue; | ||||
| 	if (g_bZAmmo_Enabled) | ||||
| 		HookEvent("weapon_fire", Event_WeaponFire); | ||||
| 	g_hCVar_ZAmmo_Enabled.AddChangeHook(ConVarChanged); | ||||
| @ -57,8 +57,6 @@ public void OnPluginStart() | ||||
| 	RegConsoleCmd("sm_zcleanse", Command_ZCleanse); | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 	HookEvent("round_start", Event_RoundStart); | ||||
| 	AutoExecConfig(); | ||||
| } | ||||
| @ -68,6 +66,7 @@ public void OnPluginStart() | ||||
| //---------------------------------------------------------------------------------------------------- | ||||
| public void OnMapStart() | ||||
| { | ||||
| 	PrecacheSound("items/ammopickup.wav"); | ||||
| 	PrecacheSound("unloze/extinguish.wav"); | ||||
| 	AddFileToDownloadsTable("sound/unloze/extinguish.wav"); | ||||
| } | ||||
| @ -133,6 +132,7 @@ public Action Command_ZAmmo(int client, int args) | ||||
| 
 | ||||
| 	g_bZAmmo_Active[client] = true; | ||||
| 	PrintToChat(client, "[ZAmmo] Enabling Infinite Ammo for %d seconds in exchange for %d$.", iDuration, iCost); | ||||
| 	EmitSoundToAll("items/ammopickup.wav", .entity=client, .volume=0.4); | ||||
| 	return Plugin_Handled; | ||||
| } | ||||
| 
 | ||||
| @ -182,7 +182,6 @@ public Action Command_ZCleanse(int client, int args) | ||||
| 	g_bZCleanse_Active[client] = true; | ||||
| 	g_bZCleanse_Uses[client]++; | ||||
| 	PrintToChat(client, "[ZCleanse] You are immune against napalm for the next %d seconds. (%d/%d) uses.", iDuration, g_bZCleanse_Uses[client], iMaxUses); | ||||
| 	//EmitSoundToClient(client, "unloze/extinguish.wav", .volume=1.0); | ||||
| 	EmitSoundToAll("unloze/extinguish.wav", .entity=client, .volume=0.4); | ||||
| 	return Plugin_Handled; | ||||
| } | ||||
| @ -280,11 +279,11 @@ public void NapalmExtinguishEntity(int client) | ||||
| { | ||||
| 	int iFire = GetEntPropEnt(client, Prop_Data, "m_hEffectEntity"); | ||||
| 	if (IsValidEntity(iFire)) | ||||
|     { | ||||
| 	{ | ||||
| 		char sClassName[64]; | ||||
| 		GetEdictClassname(iFire, sClassName, sizeof(sClassName)); | ||||
| 		if (StrEqual(sClassName, "entityflame", false)) | ||||
| 			SetEntPropFloat(iFire, Prop_Data, "m_flLifetime", 0.0); | ||||
| 		SetEntPropFloat(iFire, Prop_Data, "m_flLifetime", 0.0); | ||||
| 	} | ||||
| } | ||||
| 
 | ||||
|  | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user
	 neon
						neon