Skocz do zawartości

  • Zaloguj korzystając z Facebooka Zaloguj korzystając z Twittera Zaloguj przez Steam Zaloguj poprzez Google      Logowanie »   
  • Rejestracja

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
 

Zdjęcie

[ROZWIĄZANE] jak wyłączyć niektóre funkcje ?


Najlepsza odpowiedź DriveR.`, 24.07.2013 14:20

Chyba dobrze zedytowałem, usunięte cvary, opcje tego co napisałeś wyżej, i wyrzucenie z tego z Buy Menu

 

Sprawdź może coś źle ustawiłem

/*

BuyCheatMod ;)
programmiert von: Noizza alias BoneCrusher
folgende Module werden benötigt:
CSTRIKE, ENGINE

CHANGELOG:

0.1 -----
Neue Commands:
	say /shop

Neue Cheats:
	150HP kaufen

0.2 -----
Neue Cheats:
	150AP kaufen

0.4 -----
Neue Cheats:
	unlimited ammo
	NoCLip

Bugs:
	dont works with M4 and AK

0.6 -----
Neue Cheats:
	NoClip
	Silent Footsteps

BugFixes:
	NoClip gehts jetzt wirklich ;)

other Changes:
	Man kann ausserhalb der buytone einkaufen

0.8 -----
Neue Cheats:
	Headshotscript

BugFixes:
	SilentFootsteps sind jetzt wirklich leise und nicht nur manchmal

0.9 -----
Neue Cheats:
	GravityPack (halbiert die gravity)
	VIP model kaufen

1.0 -----
Neue Cheats:
	Terror und Counter Model kaufen

BugFixes:
	GravityPack halbiert die gravity jetzt und macht sie nicht doppelt ;)
	Preise sind verändert worden das war zu billig ;)

1.1 -----
other Changes:
	hab das menü komplett neu geschrieben und ins Plugin eingebaut.

1.2b ----- betatest noch ausstehend
Neue Cheats:
	Radioactive Uran
	Tarnset
	3rd Person View

BugFixes:
	Fehlerhaft kaufmeldungen beseitigt

other changes:
	die überschrift im menü ist jetzt rot ;)
	die meldungen sind jetzt alle auf deutsch.
	man kann den mod über buycheatsmode = 0/1 aus/ein schalten

*/


// die includes die die funktionen beinhalten die ich brauche.
#include <amxmodx>
#include <amxmisc>
#include <fun>
#include <cstrike>
#include <engine>
// die grösse des menus
#define MENU_SIZE    256


public plugin_init() {
	register_plugin("BuyCheat-Mod","1.2b","Noizza")
	// ab hier die commands die die clients durch das menu aufrufen können.
	register_clcmd("bc_hp","hpcost",0,"Buy 50 Hitpoints") //150 HP
	register_clcmd("bc_ap","apcost",0,"Buy 50 Armorpoints") //150 AP 
	register_clcmd("bc_ammo","ammocosts",0,"Buy unlimited ammo") //unendlich viel munition
	register_clcmd("say /uammo","hasuammo",0,"Displays if you buyed uammo") //unwichtig funktion muss aber da sein
	register_clcmd("bc_nc","nccost",0,"Buy NoClip") // Noclip
	register_clcmd("bc_jump","GiveLongJump",0,"Buy Long Jump") //Longjump auf ducken + springen
	register_clcmd("bc_ss","sscost",0,"Buy SilentSteps") //Footsteps für bestimmte player ausschalten
	register_clcmd("bc_hs","headshot") //headshotscript
	register_clcmd("bc_gp","gpcost",0,"Buy a AntiGravityPack") //halbiert die gravity für einen bestimmten player
	register_clcmd("bc_mvip","vipcost",0,"Buy VIPmodel") //ein vip model kaufen
	register_clcmd("bc_mt","buyenemyt",0,"Buy terror model") //ein terror-model kaufen
	register_clcmd("bc_mct","buyenemyct",0,"Buy counterterror model") //ein CTmodel kaufen
	register_clcmd("bc_fli","flicost",0,"Buy flickereffect")
	register_clcmd("bc_ra","racost",0,"Buy Radioactive Uran")
	register_clcmd("bc_3rd","rdcost",0,"Buy 3rd Person view")
	register_clcmd("say /shop","cmdMainMenu",0,"- displays Main menu") //der befehl und das menü anzuzeigen
	// ab hier die kosten für die einzelnen cheats
	register_cvar("buycheatmode","1") //BCM ein oder ausschalten
	register_cvar("buy_hpcost","2500") //kosten für 150hp
	register_cvar("buy_apcost","2500") //kosten für 150ap
	register_cvar("buy_sscost","1900") //kosten für silentsteps
	register_cvar("amx_headshotcost","5000") //kosten für headshotscript
	register_cvar("buy_gpcost","3000") //kosten für gravitypack
	register_cvar("buy_flicost","9500") //kosten für tarnset
	register_cvar("buy_racost","1500") //kosten für radioative scheisse
	register_event("CurWeapon","check_weapon","be","1=1") //waffencheck ob die leer is oder nicht
	register_event("Damage","eventDamage","b") //check ob ein spieler einen anderen triffe (für hs)
	register_logevent("endround",2,"0=World triggered","1=Round_End") //check ob die runde aus ist
	register_menucmd(register_menuid("/rCheat-Buy-Menu:"),1023,"actionMainMenu") //der menucommand
	
}

public plugin_modules()
{
	require_module("cstrike")
	require_module("engine")
	require_module("fun")
} 

/* standardmässiger scheissdreck das beim connecten und so alles aus is 
------------------------------------------------------------------------ */
// erstellen der variablen
new gHasuammo[33]
new g_PlayerHasJump[33]
new has_headshot[33]
new used[33]
new g_iMenuPosition

// hier wird geprüft ob das plugin laufen soll oder nicht
public runcheck(id) {
	new mode
	mode = get_cvar_num("buycheatmode")

	if( !mode) {
		client_print(0,print_chat,"[BCM] Der Mod wurde deaktiviert.")
		return PLUGIN_HANDLED
	}
	
	return PLUGIN_CONTINUE
}

// hier werden alle cheats deaktiviert wenn der spieler connected
public client_connect(id) {
	gHasuammo[id] = 0
	g_PlayerHasJump[id] = 0
	return PLUGIN_HANDLED
}

// und hier wenn er disconnected
public client_disconnect(id) {
	gHasuammo[id] = 0
	g_PlayerHasJump[id] = 0
	return PLUGIN_HANDLED
}

// und hier noch mal wenn die runde aus ist
public endround() {
	for(new id = 1; id < 33; id++) {
		if (!is_user_connected(id)) continue
		gHasuammo[id] = 0
		set_user_footsteps(id, 0)
		set_user_gravity(id, 1.0)
		cs_reset_user_model(id)
		set_view(id, CAMERA_NONE)

	}
	return PLUGIN_CONTINUE
}
/* -------------------------------------------------------------------------- */
/* ----------------------------- Main Menu -----------------------------------*/
public cmdMainMenu( id, lvl, cid )
{
	if( cmd_access( id, lvl, cid, 0 ) ) 		
		showMainMenu( id, g_iMenuPosition = 0 )
	return PLUGIN_HANDLED
}

public showMainMenu( id, pos )
{
	if( pos < 0 ) return
		
	new szMenuBody[MENU_SIZE]
	new iLen = format( szMenuBody, MENU_SIZE-1,"/rCheat-Buy-Menu: %d/2^n^n", pos+1 )
	new iKeys = (1<<0|1<<1|1<<2|1<<3|1<<4|1<<5|1<<6|1<<7|1<<9)
	
	if ( pos ) {
		iLen += format( szMenuBody[iLen], (MENU_SIZE-1-iLen), "1. 5000$ - Buy a Headshotscript^n2. 9500$ - Buy a Undercover-Set^n3. Something^n4. Something^n5. Something^n" )
	}
	else {
		iLen += format( szMenuBody[iLen], (MENU_SIZE-1-iLen), "1. 1500$ - Buy Radioactive Uran!^n2. 1900$ - Buy Silent Footsteps^n3. 2500$ - Buy 150 Health^n4. 2500$ - Buy 150 Armor^n5. 3000$ - Buy a Anti-Gravity-Pack^n" )
	}
	
	if( pos )	
		format( szMenuBody[iLen], (MENU_SIZE-1-iLen), "^n0. Back")
	
	else {
		format( szMenuBody[iLen], (MENU_SIZE-1-iLen), "^n9. More...^n0. Exit")
		iKeys |= (1<<8)
	}
	show_menu( id, iKeys, szMenuBody, -1 )
	
	return
}

public actionMainMenu( id, key )
{
	switch( key )
	{
		case 8: showMainMenu( id, ++g_iMenuPosition ) 
		case 9: showMainMenu( id, --g_iMenuPosition ) 
		
		default:
		{
			new option = (key + (g_iMenuPosition * 8))
			switch (option) {
				case 0:  client_cmd(id,"bc_ra");	
				case 1:  client_cmd(id,"bc_ss");	
				case 2:  client_cmd(id,"bc_hp");	
				case 3:  client_cmd(id,"bc_ap");	
				case 4:  client_cmd(id,"bc_gp");		
					
				case 5:  client_cmd(id,"bc_hs");	
				case 6:  client_cmd(id,"bc_fli");	
				case 7:  client_cmd(id,"amx_something");	
				case 8:  client_cmd(id,"amx_something");	
				case 9:  client_cmd(id,"amx_something");	
			}
		}
	}
	return PLUGIN_HANDLED
}
/* ------------------------------- ENDE MAINMENU ------------------------------- */

/* BUY 50 ARMORPOINTS ---------------------------------------------------------- */
public apcost(id) {
	if(!is_user_alive(id))
		{
		client_print(id,print_chat,"[BCM] Tote Menschen brauchen keinen Bodyarmor^^.")
		return PLUGIN_HANDLED
	}
	new money,cost
	money = cs_get_user_money(id)
	cost = get_cvar_num("buy_apcost")
	if( money < cost) {
		client_print(id,print_chat,"[BCM] Du hast nicht genug Geld. Der Cheat kostet: $%i",cost)
		return PLUGIN_HANDLED
	}
	if( money > cost) {
		new money,cost
		money = cs_get_user_money(id)
		cost = get_cvar_num("buy_apcost")
		new name[35]
		
		get_user_name(id,name,34)
		client_print(0,print_chat,"[BCM] %s hat sich 150 Armor gekauft!",name)
		cs_set_user_money(id,(money - cost),1)
		set_user_armor(id, 150)
	}
	return PLUGIN_HANDLED
}
/* --------------------------------------------------------------------------------
BUY 50 HITPOINTS------------------------------------------------------------- */

public hpcost(id) {
	if(!is_user_alive(id))
		{
		client_print(id,print_chat,"[BCM] Als toter MUSS man 0 HP haben^^.")
		return PLUGIN_HANDLED
	}
	new money,cost
	money = cs_get_user_money(id)
	cost = get_cvar_num("buy_hpcost")
	if( money < cost) {
		client_print(id,print_chat,"[BCM] Du hast nicht genug Geld. Der Cheat kostet: $%i",cost)
		return PLUGIN_HANDLED
	}
	if( money > cost) {
		new money,cost
		money = cs_get_user_money(id)
		cost = get_cvar_num("buy_hpcost")
		new name[35]
		
		get_user_name(id,name,34)
		client_print(0,print_chat,"[BCM] %s hat sich 150 Health gekauft!",name)
		cs_set_user_money(id,(money - cost),1)
		set_user_health(id, 150)
	}
	return PLUGIN_HANDLED
}
/* ------------------------------------------------------------------------------- */
/* -------------------- ANFANG SILENT FOOTSTEPS---------------------------*/
public sscost(id) {
	if(!is_user_alive(id))
		{
		client_print(id,print_chat,"[BCM] Tote Menschen machen keine geraeusche^^.")
		return PLUGIN_HANDLED
	}
	new money,cost
	money = cs_get_user_money(id)
	cost = get_cvar_num("buy_sscost")
	if( money < cost) {
		client_print(id,print_chat,"[BCM] Du hast nicht genug Geld. Der Cheat kostet: $%i",cost)
		return PLUGIN_HANDLED
	}
	if( money > cost) {
		new money,cost
		money = cs_get_user_money(id)
		cost = get_cvar_num("buy_sscost")
		new name[35]
		
		get_user_name(id,name,34)
		client_print(0,print_chat,"[BCM] %s hat sich SilentSteps gekauft!",name)
		cs_set_user_money(id,(money - cost),1)
		set_user_footsteps(id, 1)
	}
	return PLUGIN_HANDLED
}
/* ---------------------- ENDE SILENT FOOTSTEPS ------------------------------- */
/* ---------------------- ANFANG VON GEKAUFTEN HEADSHOTS------------------------*/
public headshot(id) {
	if(!is_user_alive(id))
		{
		client_print(id,print_chat,"[BCM] Tote Menschen brauchen keine Headshotscripts^^.")
		return PLUGIN_HANDLED
	}
	if(!cs_get_user_buyzone(id)) {
		client_print(id,print_chat,"[BCM] Headshots koennen nur in Buyzones gekauft werden!")
		return PLUGIN_HANDLED 
	}
	if(cs_get_user_buyzone(id)) {
		new money = cs_get_user_money(id)
		new cost = get_cvar_num("amx_headshotcost")
		
		if(money < cost){
			client_print(id, print_chat,"[BCM] Du hast nicht genug Geld. Der Cheat kostet: $%i",cost)
			
			return PLUGIN_HANDLED
		}
		cs_set_user_money(id, money - cost)
		client_print(id,print_chat,"[BCM] Du hast dir ein Headshotscript gekauft! Du triffst mit dem naechsten schuss garantiert!")
		
		used[id] = 1
		has_headshot[id] = 1
		if(has_headshot[id] == 1) {
			cs_set_user_money(id, money - cost)
			client_print(id,print_chat,"[BCM] Du kannst nur 1 Headshotscript kaufen. Zur Strafe musst du es bezahlen ;)")
			return PLUGIN_CONTINUE
		}
		return PLUGIN_CONTINUE
	}
	return PLUGIN_CONTINUE
}

public eventDamage(id) {
	if (!is_user_connected(id)) return PLUGIN_HANDLED
	new weapon, bodypart, enemy = get_user_attacker(id,weapon,bodypart)
	if (has_headshot[enemy]==0)
		return PLUGIN_HANDLED
	if(enemy != id) {
		new weaponname[32]
		
		switch (weapon)
		{
			case 1:
			weaponname = "p228"
			case 3:
			weaponname = "scout"
			case 4:
			weaponname = "grenade"
			case 5:
			weaponname = "xm1014"
			case 7:
			weaponname = "mac10"
			case 8:
			weaponname = "aug"
			case 10:
			weaponname = "elite"
			case 11:
			weaponname = "fiveseven"
			case 12:
			weaponname = "ump45"
			case 13:
			weaponname = "sg550"
			case 14:
			weaponname = "galil"
			case 15:
			weaponname = "famas"
			case 16:
			weaponname = "usp"
			case 17:
			weaponname = "glock18"
			case 18:
			weaponname = "awp"
			case 19:
			weaponname = "mp5navy"
			case 20:
			weaponname = "m249"
			case 21:
			weaponname = "m3"
			case 22:
			weaponname = "m4a1"
			case 23:
			weaponname = "tmp"
			case 24:
			weaponname = "g3sg1"
			case 26:
			weaponname = "deagle"
			case 27:
			weaponname = "sg552"
			case 28:
			weaponname = "ak47"
			case 29:
			weaponname = "knife"
			case 30:
			weaponname = "p90"
		}
		log_kill(enemy,id,"weaponname",1)
	}
	return PLUGIN_CONTINUE
}

stock log_kill(killer, victim, weapon[],headshot) {
	new id = victim
	if(has_headshot[killer]) {
		set_msg_block(get_user_msgid("DeathMsg"),BLOCK_ONCE)
		set_user_health(id,-1)
		set_msg_block(get_user_msgid("DeathMsg"),BLOCK_NOT)
		message_begin(MSG_ALL, get_user_msgid("DeathMsg"), {0,0,0}, 0)
		write_byte(killer)
		write_byte(victim)
		write_byte(headshot)
		write_string(weapon)
		message_end()
		new frags = get_user_frags(killer)
		set_user_frags(killer,frags+1)
		used[id] = 0
		has_headshot[id] = 0
		has_headshot[killer] = 0
		client_print(killer,print_chat,"[BCM] Du hast dein script verwendet.")
		
		return PLUGIN_HANDLED
	}
	return  PLUGIN_HANDLED
}
/*--------------------- ENDE VON GEKAUFTEN HEADSHOTS -------------------------------*/
/*----------------------BEGIN GRAVITYPACK --------------------------------------*/
public gpcost(id) {
	if(!is_user_alive(id))
		{
		client_print(id,print_chat,"[BCM] Tote Menschen muessen sich nicht um Gravity kuemmern^^.")
		return PLUGIN_HANDLED
	}
	new money,cost
	money = cs_get_user_money(id)
	cost = get_cvar_num("buy_gpcost")
	if( money < cost) {
		client_print(id,print_chat,"[BCM] Du hast nicht genug Geld. Der Cheat kostet: $%i",cost)
		return PLUGIN_HANDLED
	}
	if( money > cost) {
		new money,cost
		money = cs_get_user_money(id)
		cost = get_cvar_num("buy_gpcost")
		new name[35]
		
		get_user_name(id,name,34)
		client_print(0,print_chat,"[BCM] %s hat sich ein Anti-Gravity Pack gekauft!",name)
		cs_set_user_money(id,(money - cost),1)
		set_user_gravity(id, 0.3)
	}
	return PLUGIN_HANDLED
}
/*------------------------- ENDE ANTIGRAVPACK------------------------------*/
/*--------------------------- anfang tarnset -----------------------------*/
public flicost(id) {
	if(!is_user_alive(id))
		{
		client_print(id,print_chat,"[BCM] Tote Menschen sind meistens unsichtbar^^.")
		return PLUGIN_HANDLED
	}
	new money,cost
	money = cs_get_user_money(id)
	cost = get_cvar_num("buy_flicost")
	if( money < cost) {
		client_print(id,print_chat,"[BCM] Du hast nicht genug Geld. Der Cheat kostet: $%i",cost)
		return PLUGIN_HANDLED
	}
	if( money > cost) {
		new money,cost
		money = cs_get_user_money(id)
		cost = get_cvar_num("buy_flicost")
		new name[35]
		
		get_user_name(id,name,34)
		client_print(0,print_chat,"[BCM] %s hat sich ein TarnSet gekauft!",name)
		cs_set_user_money(id,(money - cost),1)
		set_user_rendering(id,kRenderFxPulseFast,0,0,0,kRenderTransTexture,25)
	}
	return PLUGIN_HANDLED
}
/* --------------------------- ende tarnset -------------------------------------- */
/* --------------------------- anfang radioaktiv------------------------------ */
public racost(id) {
	if(!is_user_alive(id))
		{
		client_print(id,print_chat,"[BCM] Tote Menschen brauchen kein Uran^^.")
		return PLUGIN_HANDLED
	}
	new money,cost
	money = cs_get_user_money(id)
	cost = get_cvar_num("buy_racost")
	if( money < cost) {
		client_print(id,print_chat,"[BCM] Du hast nicht genug Geld. Der Cheat kostet: $%i",cost)
		return PLUGIN_HANDLED
	}
	if( money > cost) {
		new money,cost
		money = cs_get_user_money(id)
		cost = get_cvar_num("buy_flicost")
		new name[35]
		
		get_user_name(id,name,34)
		client_print(0,print_chat,"[BCM] %s hat sich ein Radioaktives Uran gekauft!",name)
		cs_set_user_money(id,(money - cost),1)
		set_user_rendering(id,kRenderFxGlowShell,255,255,0,kRenderNormal,25)
	}
	return PLUGIN_HANDLED
}
/*----------------------------------- ende radioaktiv-----------------------------------*/



/* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
*{\\ rtf1\\ ansi\\ deff0{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ lang1045\\ f0\\ fs16 \n\\ par }
*/
Przejdź do postu


  • Zamknięty Temat jest zamknięty
2 odpowiedzi w tym temacie

#1 City

    Wszechwidzący

  • Użytkownik

Reputacja: 19
Początkujący

  • Postów:297
  • GG:
  • Steam:steam
  • Lokalizacja:Grybów
Offline

Napisano 24.07.2013 13:58

mam plugin- http://amxx.pl/topic...owania-cheatow/

 

jego sma: http://wklej.org/id/1093467/

 

i chcę z niego wyłączyć takie opcje jak 

 

buy_nccost 10000 - koszt za przechodzenie przez ściany (optymalnie: 10 000)

buy_vipcost 3500 - koszt za model VIP'a (optymalnie: 3 500)

buy_enemycost 8500 - koszt za model CT/TT (optymalnie: 8 500)

buy_3rdcost 1500 - koszt za widok z trzeciej kamery (optymalnie: 1 500)

amx_uammo_cost 4000 - koszta za nieograniczona amunicje (optymalnie: 4 000)

amx_longjump_cost 3000 - koszt za daleki skok (LongJump) (optymalnie: 3 000)

 

jak mam to zrobić ?


  • +
  • -
  • 0
b_350_20_692108_381007_FFFFFF_000000.png

#2 DriveR.`

    Profesjonalista

  • Użytkownik

Reputacja: 15
Początkujący

  • Postów:185
  • GG:
  • Steam:steam
  • Imię:Paweł
  • Lokalizacja:Ostrołęka
Offline

Napisano 24.07.2013 14:20   Najlepsza odpowiedź

Chyba dobrze zedytowałem, usunięte cvary, opcje tego co napisałeś wyżej, i wyrzucenie z tego z Buy Menu

 

Sprawdź może coś źle ustawiłem

/*

BuyCheatMod ;)
programmiert von: Noizza alias BoneCrusher
folgende Module werden benötigt:
CSTRIKE, ENGINE

CHANGELOG:

0.1 -----
Neue Commands:
	say /shop

Neue Cheats:
	150HP kaufen

0.2 -----
Neue Cheats:
	150AP kaufen

0.4 -----
Neue Cheats:
	unlimited ammo
	NoCLip

Bugs:
	dont works with M4 and AK

0.6 -----
Neue Cheats:
	NoClip
	Silent Footsteps

BugFixes:
	NoClip gehts jetzt wirklich ;)

other Changes:
	Man kann ausserhalb der buytone einkaufen

0.8 -----
Neue Cheats:
	Headshotscript

BugFixes:
	SilentFootsteps sind jetzt wirklich leise und nicht nur manchmal

0.9 -----
Neue Cheats:
	GravityPack (halbiert die gravity)
	VIP model kaufen

1.0 -----
Neue Cheats:
	Terror und Counter Model kaufen

BugFixes:
	GravityPack halbiert die gravity jetzt und macht sie nicht doppelt ;)
	Preise sind verändert worden das war zu billig ;)

1.1 -----
other Changes:
	hab das menü komplett neu geschrieben und ins Plugin eingebaut.

1.2b ----- betatest noch ausstehend
Neue Cheats:
	Radioactive Uran
	Tarnset
	3rd Person View

BugFixes:
	Fehlerhaft kaufmeldungen beseitigt

other changes:
	die überschrift im menü ist jetzt rot ;)
	die meldungen sind jetzt alle auf deutsch.
	man kann den mod über buycheatsmode = 0/1 aus/ein schalten

*/


// die includes die die funktionen beinhalten die ich brauche.
#include <amxmodx>
#include <amxmisc>
#include <fun>
#include <cstrike>
#include <engine>
// die grösse des menus
#define MENU_SIZE    256


public plugin_init() {
	register_plugin("BuyCheat-Mod","1.2b","Noizza")
	// ab hier die commands die die clients durch das menu aufrufen können.
	register_clcmd("bc_hp","hpcost",0,"Buy 50 Hitpoints") //150 HP
	register_clcmd("bc_ap","apcost",0,"Buy 50 Armorpoints") //150 AP 
	register_clcmd("bc_ammo","ammocosts",0,"Buy unlimited ammo") //unendlich viel munition
	register_clcmd("say /uammo","hasuammo",0,"Displays if you buyed uammo") //unwichtig funktion muss aber da sein
	register_clcmd("bc_nc","nccost",0,"Buy NoClip") // Noclip
	register_clcmd("bc_jump","GiveLongJump",0,"Buy Long Jump") //Longjump auf ducken + springen
	register_clcmd("bc_ss","sscost",0,"Buy SilentSteps") //Footsteps für bestimmte player ausschalten
	register_clcmd("bc_hs","headshot") //headshotscript
	register_clcmd("bc_gp","gpcost",0,"Buy a AntiGravityPack") //halbiert die gravity für einen bestimmten player
	register_clcmd("bc_mvip","vipcost",0,"Buy VIPmodel") //ein vip model kaufen
	register_clcmd("bc_mt","buyenemyt",0,"Buy terror model") //ein terror-model kaufen
	register_clcmd("bc_mct","buyenemyct",0,"Buy counterterror model") //ein CTmodel kaufen
	register_clcmd("bc_fli","flicost",0,"Buy flickereffect")
	register_clcmd("bc_ra","racost",0,"Buy Radioactive Uran")
	register_clcmd("bc_3rd","rdcost",0,"Buy 3rd Person view")
	register_clcmd("say /shop","cmdMainMenu",0,"- displays Main menu") //der befehl und das menü anzuzeigen
	// ab hier die kosten für die einzelnen cheats
	register_cvar("buycheatmode","1") //BCM ein oder ausschalten
	register_cvar("buy_hpcost","2500") //kosten für 150hp
	register_cvar("buy_apcost","2500") //kosten für 150ap
	register_cvar("buy_sscost","1900") //kosten für silentsteps
	register_cvar("amx_headshotcost","5000") //kosten für headshotscript
	register_cvar("buy_gpcost","3000") //kosten für gravitypack
	register_cvar("buy_flicost","9500") //kosten für tarnset
	register_cvar("buy_racost","1500") //kosten für radioative scheisse
	register_event("CurWeapon","check_weapon","be","1=1") //waffencheck ob die leer is oder nicht
	register_event("Damage","eventDamage","b") //check ob ein spieler einen anderen triffe (für hs)
	register_logevent("endround",2,"0=World triggered","1=Round_End") //check ob die runde aus ist
	register_menucmd(register_menuid("/rCheat-Buy-Menu:"),1023,"actionMainMenu") //der menucommand
	
}

public plugin_modules()
{
	require_module("cstrike")
	require_module("engine")
	require_module("fun")
} 

/* standardmässiger scheissdreck das beim connecten und so alles aus is 
------------------------------------------------------------------------ */
// erstellen der variablen
new gHasuammo[33]
new g_PlayerHasJump[33]
new has_headshot[33]
new used[33]
new g_iMenuPosition

// hier wird geprüft ob das plugin laufen soll oder nicht
public runcheck(id) {
	new mode
	mode = get_cvar_num("buycheatmode")

	if( !mode) {
		client_print(0,print_chat,"[BCM] Der Mod wurde deaktiviert.")
		return PLUGIN_HANDLED
	}
	
	return PLUGIN_CONTINUE
}

// hier werden alle cheats deaktiviert wenn der spieler connected
public client_connect(id) {
	gHasuammo[id] = 0
	g_PlayerHasJump[id] = 0
	return PLUGIN_HANDLED
}

// und hier wenn er disconnected
public client_disconnect(id) {
	gHasuammo[id] = 0
	g_PlayerHasJump[id] = 0
	return PLUGIN_HANDLED
}

// und hier noch mal wenn die runde aus ist
public endround() {
	for(new id = 1; id < 33; id++) {
		if (!is_user_connected(id)) continue
		gHasuammo[id] = 0
		set_user_footsteps(id, 0)
		set_user_gravity(id, 1.0)
		cs_reset_user_model(id)
		set_view(id, CAMERA_NONE)

	}
	return PLUGIN_CONTINUE
}
/* -------------------------------------------------------------------------- */
/* ----------------------------- Main Menu -----------------------------------*/
public cmdMainMenu( id, lvl, cid )
{
	if( cmd_access( id, lvl, cid, 0 ) ) 		
		showMainMenu( id, g_iMenuPosition = 0 )
	return PLUGIN_HANDLED
}

public showMainMenu( id, pos )
{
	if( pos < 0 ) return
		
	new szMenuBody[MENU_SIZE]
	new iLen = format( szMenuBody, MENU_SIZE-1,"/rCheat-Buy-Menu: %d/2^n^n", pos+1 )
	new iKeys = (1<<0|1<<1|1<<2|1<<3|1<<4|1<<5|1<<6|1<<7|1<<9)
	
	if ( pos ) {
		iLen += format( szMenuBody[iLen], (MENU_SIZE-1-iLen), "1. 5000$ - Buy a Headshotscript^n2. 9500$ - Buy a Undercover-Set^n3. Something^n4. Something^n5. Something^n" )
	}
	else {
		iLen += format( szMenuBody[iLen], (MENU_SIZE-1-iLen), "1. 1500$ - Buy Radioactive Uran!^n2. 1900$ - Buy Silent Footsteps^n3. 2500$ - Buy 150 Health^n4. 2500$ - Buy 150 Armor^n5. 3000$ - Buy a Anti-Gravity-Pack^n" )
	}
	
	if( pos )	
		format( szMenuBody[iLen], (MENU_SIZE-1-iLen), "^n0. Back")
	
	else {
		format( szMenuBody[iLen], (MENU_SIZE-1-iLen), "^n9. More...^n0. Exit")
		iKeys |= (1<<8)
	}
	show_menu( id, iKeys, szMenuBody, -1 )
	
	return
}

public actionMainMenu( id, key )
{
	switch( key )
	{
		case 8: showMainMenu( id, ++g_iMenuPosition ) 
		case 9: showMainMenu( id, --g_iMenuPosition ) 
		
		default:
		{
			new option = (key + (g_iMenuPosition * 8))
			switch (option) {
				case 0:  client_cmd(id,"bc_ra");	
				case 1:  client_cmd(id,"bc_ss");	
				case 2:  client_cmd(id,"bc_hp");	
				case 3:  client_cmd(id,"bc_ap");	
				case 4:  client_cmd(id,"bc_gp");		
					
				case 5:  client_cmd(id,"bc_hs");	
				case 6:  client_cmd(id,"bc_fli");	
				case 7:  client_cmd(id,"amx_something");	
				case 8:  client_cmd(id,"amx_something");	
				case 9:  client_cmd(id,"amx_something");	
			}
		}
	}
	return PLUGIN_HANDLED
}
/* ------------------------------- ENDE MAINMENU ------------------------------- */

/* BUY 50 ARMORPOINTS ---------------------------------------------------------- */
public apcost(id) {
	if(!is_user_alive(id))
		{
		client_print(id,print_chat,"[BCM] Tote Menschen brauchen keinen Bodyarmor^^.")
		return PLUGIN_HANDLED
	}
	new money,cost
	money = cs_get_user_money(id)
	cost = get_cvar_num("buy_apcost")
	if( money < cost) {
		client_print(id,print_chat,"[BCM] Du hast nicht genug Geld. Der Cheat kostet: $%i",cost)
		return PLUGIN_HANDLED
	}
	if( money > cost) {
		new money,cost
		money = cs_get_user_money(id)
		cost = get_cvar_num("buy_apcost")
		new name[35]
		
		get_user_name(id,name,34)
		client_print(0,print_chat,"[BCM] %s hat sich 150 Armor gekauft!",name)
		cs_set_user_money(id,(money - cost),1)
		set_user_armor(id, 150)
	}
	return PLUGIN_HANDLED
}
/* --------------------------------------------------------------------------------
BUY 50 HITPOINTS------------------------------------------------------------- */

public hpcost(id) {
	if(!is_user_alive(id))
		{
		client_print(id,print_chat,"[BCM] Als toter MUSS man 0 HP haben^^.")
		return PLUGIN_HANDLED
	}
	new money,cost
	money = cs_get_user_money(id)
	cost = get_cvar_num("buy_hpcost")
	if( money < cost) {
		client_print(id,print_chat,"[BCM] Du hast nicht genug Geld. Der Cheat kostet: $%i",cost)
		return PLUGIN_HANDLED
	}
	if( money > cost) {
		new money,cost
		money = cs_get_user_money(id)
		cost = get_cvar_num("buy_hpcost")
		new name[35]
		
		get_user_name(id,name,34)
		client_print(0,print_chat,"[BCM] %s hat sich 150 Health gekauft!",name)
		cs_set_user_money(id,(money - cost),1)
		set_user_health(id, 150)
	}
	return PLUGIN_HANDLED
}
/* ------------------------------------------------------------------------------- */
/* -------------------- ANFANG SILENT FOOTSTEPS---------------------------*/
public sscost(id) {
	if(!is_user_alive(id))
		{
		client_print(id,print_chat,"[BCM] Tote Menschen machen keine geraeusche^^.")
		return PLUGIN_HANDLED
	}
	new money,cost
	money = cs_get_user_money(id)
	cost = get_cvar_num("buy_sscost")
	if( money < cost) {
		client_print(id,print_chat,"[BCM] Du hast nicht genug Geld. Der Cheat kostet: $%i",cost)
		return PLUGIN_HANDLED
	}
	if( money > cost) {
		new money,cost
		money = cs_get_user_money(id)
		cost = get_cvar_num("buy_sscost")
		new name[35]
		
		get_user_name(id,name,34)
		client_print(0,print_chat,"[BCM] %s hat sich SilentSteps gekauft!",name)
		cs_set_user_money(id,(money - cost),1)
		set_user_footsteps(id, 1)
	}
	return PLUGIN_HANDLED
}
/* ---------------------- ENDE SILENT FOOTSTEPS ------------------------------- */
/* ---------------------- ANFANG VON GEKAUFTEN HEADSHOTS------------------------*/
public headshot(id) {
	if(!is_user_alive(id))
		{
		client_print(id,print_chat,"[BCM] Tote Menschen brauchen keine Headshotscripts^^.")
		return PLUGIN_HANDLED
	}
	if(!cs_get_user_buyzone(id)) {
		client_print(id,print_chat,"[BCM] Headshots koennen nur in Buyzones gekauft werden!")
		return PLUGIN_HANDLED 
	}
	if(cs_get_user_buyzone(id)) {
		new money = cs_get_user_money(id)
		new cost = get_cvar_num("amx_headshotcost")
		
		if(money < cost){
			client_print(id, print_chat,"[BCM] Du hast nicht genug Geld. Der Cheat kostet: $%i",cost)
			
			return PLUGIN_HANDLED
		}
		cs_set_user_money(id, money - cost)
		client_print(id,print_chat,"[BCM] Du hast dir ein Headshotscript gekauft! Du triffst mit dem naechsten schuss garantiert!")
		
		used[id] = 1
		has_headshot[id] = 1
		if(has_headshot[id] == 1) {
			cs_set_user_money(id, money - cost)
			client_print(id,print_chat,"[BCM] Du kannst nur 1 Headshotscript kaufen. Zur Strafe musst du es bezahlen ;)")
			return PLUGIN_CONTINUE
		}
		return PLUGIN_CONTINUE
	}
	return PLUGIN_CONTINUE
}

public eventDamage(id) {
	if (!is_user_connected(id)) return PLUGIN_HANDLED
	new weapon, bodypart, enemy = get_user_attacker(id,weapon,bodypart)
	if (has_headshot[enemy]==0)
		return PLUGIN_HANDLED
	if(enemy != id) {
		new weaponname[32]
		
		switch (weapon)
		{
			case 1:
			weaponname = "p228"
			case 3:
			weaponname = "scout"
			case 4:
			weaponname = "grenade"
			case 5:
			weaponname = "xm1014"
			case 7:
			weaponname = "mac10"
			case 8:
			weaponname = "aug"
			case 10:
			weaponname = "elite"
			case 11:
			weaponname = "fiveseven"
			case 12:
			weaponname = "ump45"
			case 13:
			weaponname = "sg550"
			case 14:
			weaponname = "galil"
			case 15:
			weaponname = "famas"
			case 16:
			weaponname = "usp"
			case 17:
			weaponname = "glock18"
			case 18:
			weaponname = "awp"
			case 19:
			weaponname = "mp5navy"
			case 20:
			weaponname = "m249"
			case 21:
			weaponname = "m3"
			case 22:
			weaponname = "m4a1"
			case 23:
			weaponname = "tmp"
			case 24:
			weaponname = "g3sg1"
			case 26:
			weaponname = "deagle"
			case 27:
			weaponname = "sg552"
			case 28:
			weaponname = "ak47"
			case 29:
			weaponname = "knife"
			case 30:
			weaponname = "p90"
		}
		log_kill(enemy,id,"weaponname",1)
	}
	return PLUGIN_CONTINUE
}

stock log_kill(killer, victim, weapon[],headshot) {
	new id = victim
	if(has_headshot[killer]) {
		set_msg_block(get_user_msgid("DeathMsg"),BLOCK_ONCE)
		set_user_health(id,-1)
		set_msg_block(get_user_msgid("DeathMsg"),BLOCK_NOT)
		message_begin(MSG_ALL, get_user_msgid("DeathMsg"), {0,0,0}, 0)
		write_byte(killer)
		write_byte(victim)
		write_byte(headshot)
		write_string(weapon)
		message_end()
		new frags = get_user_frags(killer)
		set_user_frags(killer,frags+1)
		used[id] = 0
		has_headshot[id] = 0
		has_headshot[killer] = 0
		client_print(killer,print_chat,"[BCM] Du hast dein script verwendet.")
		
		return PLUGIN_HANDLED
	}
	return  PLUGIN_HANDLED
}
/*--------------------- ENDE VON GEKAUFTEN HEADSHOTS -------------------------------*/
/*----------------------BEGIN GRAVITYPACK --------------------------------------*/
public gpcost(id) {
	if(!is_user_alive(id))
		{
		client_print(id,print_chat,"[BCM] Tote Menschen muessen sich nicht um Gravity kuemmern^^.")
		return PLUGIN_HANDLED
	}
	new money,cost
	money = cs_get_user_money(id)
	cost = get_cvar_num("buy_gpcost")
	if( money < cost) {
		client_print(id,print_chat,"[BCM] Du hast nicht genug Geld. Der Cheat kostet: $%i",cost)
		return PLUGIN_HANDLED
	}
	if( money > cost) {
		new money,cost
		money = cs_get_user_money(id)
		cost = get_cvar_num("buy_gpcost")
		new name[35]
		
		get_user_name(id,name,34)
		client_print(0,print_chat,"[BCM] %s hat sich ein Anti-Gravity Pack gekauft!",name)
		cs_set_user_money(id,(money - cost),1)
		set_user_gravity(id, 0.3)
	}
	return PLUGIN_HANDLED
}
/*------------------------- ENDE ANTIGRAVPACK------------------------------*/
/*--------------------------- anfang tarnset -----------------------------*/
public flicost(id) {
	if(!is_user_alive(id))
		{
		client_print(id,print_chat,"[BCM] Tote Menschen sind meistens unsichtbar^^.")
		return PLUGIN_HANDLED
	}
	new money,cost
	money = cs_get_user_money(id)
	cost = get_cvar_num("buy_flicost")
	if( money < cost) {
		client_print(id,print_chat,"[BCM] Du hast nicht genug Geld. Der Cheat kostet: $%i",cost)
		return PLUGIN_HANDLED
	}
	if( money > cost) {
		new money,cost
		money = cs_get_user_money(id)
		cost = get_cvar_num("buy_flicost")
		new name[35]
		
		get_user_name(id,name,34)
		client_print(0,print_chat,"[BCM] %s hat sich ein TarnSet gekauft!",name)
		cs_set_user_money(id,(money - cost),1)
		set_user_rendering(id,kRenderFxPulseFast,0,0,0,kRenderTransTexture,25)
	}
	return PLUGIN_HANDLED
}
/* --------------------------- ende tarnset -------------------------------------- */
/* --------------------------- anfang radioaktiv------------------------------ */
public racost(id) {
	if(!is_user_alive(id))
		{
		client_print(id,print_chat,"[BCM] Tote Menschen brauchen kein Uran^^.")
		return PLUGIN_HANDLED
	}
	new money,cost
	money = cs_get_user_money(id)
	cost = get_cvar_num("buy_racost")
	if( money < cost) {
		client_print(id,print_chat,"[BCM] Du hast nicht genug Geld. Der Cheat kostet: $%i",cost)
		return PLUGIN_HANDLED
	}
	if( money > cost) {
		new money,cost
		money = cs_get_user_money(id)
		cost = get_cvar_num("buy_flicost")
		new name[35]
		
		get_user_name(id,name,34)
		client_print(0,print_chat,"[BCM] %s hat sich ein Radioaktives Uran gekauft!",name)
		cs_set_user_money(id,(money - cost),1)
		set_user_rendering(id,kRenderFxGlowShell,255,255,0,kRenderNormal,25)
	}
	return PLUGIN_HANDLED
}
/*----------------------------------- ende radioaktiv-----------------------------------*/



/* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
*{\\ rtf1\\ ansi\\ deff0{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ lang1045\\ f0\\ fs16 \n\\ par }
*/

  • +
  • -
  • 1

#3 City

    Wszechwidzący

  • Autor tematu
  • Użytkownik

Reputacja: 19
Początkujący

  • Postów:297
  • GG:
  • Steam:steam
  • Lokalizacja:Grybów
Offline

Napisano 24.07.2013 15:53

nie musiałeś usuwać , ja się pytam tylko jak to zrobić,  przed czym mam dać "//" itd


  • +
  • -
  • 0
b_350_20_692108_381007_FFFFFF_000000.png




Użytkownicy przeglądający ten temat: 0

0 użytkowników, 0 gości, 0 anonimowych