cerere pugin human race

Cauți un plugin și nu găsești? Încearcă-ți norocul în această categorie!

Moderators: Moderatori ajutatori, Moderatori

Post Reply
User avatar
CatalinACS
Membru, skill 0
Membru, skill 0
Posts: 26
Joined: 06 Jun 2017, 12:29
Detinator Steam: Da
Detinator server CS: 193.203.39.187:28015
SteamID: CatalinACS
Fond eXtream: 0
Contact:

14 May 2019, 19:58

Salut ! vreau si eu sa imi modifice cineva pluginul de mai jos ca la clasa VIP si clasa SURVIVOR sa adauge gravity, si comanda race / sau changerace sa poata fi folosite decat o data pe runda ( pana iei respawn) , iar clasa predator sa aiba x2 dmg
iar la clasele 2-3si 4 sa aiba acces doar adminii cu flagul "c"

Code: Select all

#include <amxmodx>
#include <amxmisc>
#include <cstrike>
#include <engine>
#include <fakemeta_util>
#include <hamsandwich>

#pragma semicolon 1;
#define VIP_LEVEL ADMIN_LEVEL_H
new menu;
new jumpznum[33] = 0;
new bool:dozjump[33] = false;
new ReloadTime[33];
new Mesaj, CvarHealth, CvarArmor, CvarDamage,CvarInvis, CvarInvisKnife, CvarVipJumps, CvarVipHealth;
new Race[33];

public plugin_init() {
	register_plugin("Human Race", "1.0", "Aragon*");
	register_clcmd("changerace","cmdrace");
	register_clcmd("say /changerace","cmdrace");
	register_clcmd("say_team /changerace","cmdrace");
	register_clcmd("say changerace","cmdrace");
	register_clcmd("say_team changerace","cmdrace");
	register_clcmd("race","cmdrace");
	register_clcmd("say /race","cmdrace");
	register_clcmd("say_team /race","cmdrace");
	register_clcmd("say race","cmdrace");
	register_clcmd("say_team race","cmdrace");
	register_event( "Damage", "Damage", "be" );
	register_event("CurWeapon","CurWeapon","be","1=1");
	RegisterHam(Ham_Spawn, "player", "Spawm");
	Mesaj = register_cvar("race_hudmessage_delay", "420");		//| Intervarul de timp la care sa apara mesajul HUD Deffault:420 |//
	CvarHealth = register_cvar("race_human_health","150");		//| Human Health Deffault: 250 |//
	CvarArmor = register_cvar("race_human_armor","150");		//| Human Armor Deffault: 250 |//
	CvarDamage = register_cvar("race_predator_damage", "3");		//| Damage Deffault: 3 |//
	CvarInvis = register_cvar("race_efl_invis","100");		//| 0 Total Invizibility -> 255 Total Vizibility Deffault:30 |//
	CvarInvisKnife = register_cvar("race_efl_invis_knife","100");	//| 0 Total Invizibility -> 255 Total Vizibility white Knife Deffault:20 |//
	CvarVipJumps = register_cvar("race_vip_multijump","2");		//| De cate ori poate sari VIP +1 |//
	CvarVipHealth = register_cvar("race_vip_health","250");		//| VIP Health Deffault:; 150 |//
	}
public plugin_precache() { 
	precache_model("models/player/bb_hero/bb_hero.mdl");
	precache_model("models/player/bb_surv/bb_surv.mdl");
	precache_model("models/player/bb_preda/bb_preda.mdl");
	precache_model("models/player/bb_elf/bb_elf.mdl");
	precache_model("models/player/bb_VIP/bb_VIP.mdl");
	} 
public cmdrace(id) { 
	if(cs_get_user_team(id) == CS_TEAM_CT) {
	menu = menu_create("\r[BaseBuilder] \wAlege-ti \yRasa", "SetRace");
	
	menu_additem(menu, "\yHero \w- \y150 \rHp \wsi \y150 \rArmura", "1", 0);
	menu_additem(menu, "\ySurvivor \w- \rGloate infinite", "2", 0);
	menu_additem(menu, "\yPredator \w- \rDamage \yx3", "3", 0);
	menu_additem(menu, "\yElf  \w- \rInvizibilitate", "4", 0);
	menu_additem(menu, "\rVIP  \w- \y250HP \w/ \yMultiJump \rX3 \w/ \r \w/", "5", 0);   
	
	menu_setprop(menu, MPROP_EXIT, MEXIT_ALL);
	menu_display(id, menu, 0);
	return PLUGIN_CONTINUE;
	}
	return PLUGIN_CONTINUE;
	}
	
public SetRace(id, menu, item) {
	if (item == MENU_EXIT) {
	menu_destroy(menu);
	return PLUGIN_HANDLED;
	}
	new data[6], iName[64];
	new access, callback;
	menu_item_getinfo(menu, item, access, data,5, iName, 63, callback);
	new key = str_to_num(data);
	switch(key) {
	case 1: {
	Race[id] = 1;
	if(is_user_alive(id)) {
	fm_set_user_health(id, get_pcvar_num(CvarHealth));
	set_user_invizibility(id,0);
	cs_set_user_model(id, "bb_hero");
	}
	}
	case 2: {
	Race[id] = 2;
	if(is_user_alive(id)) {
	fm_set_user_health(id, 100);
	set_user_invizibility(id,0);
	cs_set_user_model(id, "bb_surv");
	}
	}
	case 3: {
	Race[id] = 3;
	if(is_user_alive(id)) {
	fm_set_user_health(id, 100);
	set_user_invizibility(id,0);
	cs_set_user_model(id, "bb_preda");
	}
	}
	case 4: {
	Race[id] = 4;
	if(is_user_alive(id)) {
	fm_set_user_health(id, 100);
	set_user_invizibility(id,1);
	cs_set_user_model(id, "bb_elf");
	}
	}
	case 5: {
	if(get_user_flags(id) & VIP_LEVEL) {
	Race[id] = 5;
	if(is_user_alive(id)) {
	set_user_invizibility(id,0);
	fm_set_user_health(id, get_pcvar_num(CvarVipHealth));
	cs_set_user_model(id, "bb_VIP");
	}
	}
	}
	}
	menu_destroy(menu);
	return PLUGIN_HANDLED;
	}
	
public Damage(id) {
	if(cs_get_user_team(id) == CS_TEAM_CT) {
	new victim_id = id;
	if( !is_user_connected( victim_id ) ) return PLUGIN_CONTINUE;
	new dmg_take = read_data(2);
	new Float:multiplier = get_pcvar_float(CvarDamage);
	new Float:damage = dmg_take * multiplier;
	new health = get_user_health( victim_id );
	new iWeapID, attacker_id = get_user_attacker( victim_id, iWeapID );
	
	if( !is_user_connected( attacker_id ) || !is_user_alive( victim_id ) ) {
	return PLUGIN_HANDLED;
	}
	if(Race[attacker_id] == 3 || Race[attacker_id] == 5 && get_user_flags(id) & VIP_LEVEL) {
	if( floatround(damage) >= health ) {
	if( victim_id == attacker_id ) {
	return PLUGIN_CONTINUE;
	}   
	else {
	log_kill( attacker_id, victim_id, "weaponbox", 0 );
	}   
	return PLUGIN_CONTINUE;
	}
	}
	return PLUGIN_CONTINUE;
	}
	return PLUGIN_CONTINUE;
	}

public Spawm(id) {
	if(get_user_team(id) == 2) {
	//1.Human
	if(Race[id] == 1) {
	fm_set_user_health(id, get_pcvar_num(CvarHealth));
	fm_set_user_armor(id, get_pcvar_num(CvarArmor));
	set_user_invizibility(id,0);
	cs_set_user_model(id, "bb_hero");
	}
	//2.Surviver
	if (Race[id] == 2) {
	set_user_invizibility(id,0);
	cs_set_user_model(id, "bb_surv");
	fm_set_user_health(id, 100);
	}
	//3.Predator
	if (Race[id] == 3) {
	set_user_invizibility(id,0);
	cs_set_user_model(id, "bb_preda");
	fm_set_user_health(id, 100);
	}
	//4.Elf
	if (Race[id] == 4) {
	set_user_invizibility(id,1);
	cs_set_user_model(id, "bb_elf");
	fm_set_user_health(id, 100);
	}
	//5.VIP
	if (Race[id] == 5 && get_user_flags(id) & VIP_LEVEL) {
	set_user_invizibility(id,0);
	fm_set_user_health(id, get_pcvar_num(CvarVipHealth));
	cs_set_user_model(id, "bb_VIP");
	}
	if(Race[id] == 0) {
	cmdrace(id);
	}
	}
	else {
	set_user_invizibility(id,0);
	set_task(0.1, "reset_model",id);
	Race[id] = 0;
	}
	}

public CurWeapon(id) {
	if(cs_get_user_team(id) == CS_TEAM_CT) {
	new wpnid = read_data(2);
	new clip = read_data(3);
	
	//2.Surviver
	if (Race[id] == 2 || Race[id] == 5  && get_user_flags(id) & VIP_LEVEL) {
	if (wpnid == CSW_C4 || wpnid == CSW_KNIFE) {}
	if (wpnid == CSW_HEGRENADE || wpnid == CSW_SMOKEGRENADE || wpnid == CSW_FLASHBANG) {}
	if (clip == 1) reloadAmmo(id);
	}
	//4.Elf
	if (Race[id] == 4) {
	static iInvisLevel;
	if(!IsHoldingKnife(id)) {
	iInvisLevel = get_pcvar_num(CvarInvis);
	fm_set_user_rendering(id, kRenderFxNone, 0, 0, 0, kRenderTransTexture, iInvisLevel);
	}
	else if(IsHoldingKnife(id)) {
	InvKnife(id);
	}
	}
	else {
	fm_set_user_rendering(id);
	}
	if(Race[id] == 0) {
	cmdrace(id);
	}
	return PLUGIN_HANDLED;
	}
	return PLUGIN_HANDLED;
	}

stock log_kill(killer, victim, weapon[],headshot) {
	user_silentkill( victim );
	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 kfrags = get_user_frags( killer );
	fm_set_user_frags( killer, kfrags++ );
	new vfrags = get_user_frags( victim );
	fm_set_user_frags( victim, vfrags++ );
	return  PLUGIN_CONTINUE;
	} 

stock set_user_invizibility(id, invizibility = 1) {
	static iInvisLevel;
	if(invizibility){
	if(IsHoldingKnife(id)) {
	InvKnife(id);
	}
	if(is_user_alive(id)) {
	iInvisLevel = get_pcvar_num(CvarInvis);
	fm_set_user_rendering(id, kRenderFxNone, 0, 0, 0, kRenderTransTexture, iInvisLevel);
	}
	}
	else {
	fm_set_user_rendering(id);
	}
	}

public IsHoldingKnife(id) {
	new iClip, iAmmo, iWeapon;
	iWeapon = get_user_weapon(id, iClip, iAmmo);
	if(iWeapon == CSW_KNIFE) {
	return true;
	}
	return false;
	}

public InvKnife(id) {
	static iInvisLevel;
	if(IsHoldingKnife(id)) {
	iInvisLevel = get_pcvar_num(CvarInvisKnife);
	fm_set_user_rendering(id, kRenderFxNone, 0, 0, 0, kRenderTransTexture, iInvisLevel);
	}
	else {
	iInvisLevel = get_pcvar_num(CvarInvis);
	fm_set_user_rendering(id, kRenderFxNone, 0, 0, 0, kRenderTransTexture, iInvisLevel);
	}
	}

public reloadAmmo(id) {
	if (!is_user_connected(id)) return;
	if (ReloadTime[id] >= get_systime() - 1) return;
	ReloadTime[id] = get_systime();
	
	new clip, ammo, wpn[32];
	new wpnid = get_user_weapon(id, clip, ammo);
	
	if (wpnid == CSW_C4 || wpnid == CSW_KNIFE || wpnid == 0) return;
	if (wpnid == CSW_HEGRENADE || wpnid == CSW_SMOKEGRENADE || wpnid == CSW_FLASHBANG) return;
	
	if (clip == 0) {
	get_weaponname(wpnid,wpn,31);
	new iWPNidx = -1;
	while((iWPNidx = fm_find_ent_by_class(iWPNidx, wpn)) != 0) {
	if(id == pev(iWPNidx, pev_owner)) {
	cs_set_weapon_ammo(iWPNidx, getMaxClipAmmo(wpnid));
	break;
	}
	}
	}
	}

stock getMaxClipAmmo(wpnid) {
	new clipammo = 0;
	switch (wpnid) {
	case CSW_P228 : clipammo = 13;
	case CSW_SCOUT : clipammo = 10;
	case CSW_HEGRENADE : clipammo = 0;
	case CSW_XM1014 : clipammo = 7;
	case CSW_C4 : clipammo = 0;
	case CSW_MAC10 : clipammo = 30;
	case CSW_AUG : clipammo = 30;
	case CSW_SMOKEGRENADE : clipammo = 0;
	case CSW_ELITE : clipammo = 15;
	case CSW_FIVESEVEN : clipammo = 20;
	case CSW_UMP45 : clipammo = 25;
	case CSW_SG550 : clipammo = 30;
	case CSW_GALI : clipammo = 35;
	case CSW_FAMAS : clipammo = 25;
	case CSW_USP : clipammo = 12;
	case CSW_GLOCK18 : clipammo = 20;
	case CSW_AWP : clipammo = 10;
	case CSW_MP5NAVY : clipammo = 30;
	case CSW_M249 : clipammo = 100;
	case CSW_M3 : clipammo = 8;
	case CSW_M4A1 : clipammo = 30;
	case CSW_TMP : clipammo = 30;
	case CSW_G3SG1 : clipammo = 20;
	case CSW_FLASHBANG : clipammo = 0;
	case CSW_DEAGLE : clipammo = 7;
	case CSW_SG552 : clipammo = 30;
	case CSW_AK47 : clipammo = 30;
	case CSW_KNIFE : clipammo = 0;
	case CSW_P90 : clipammo = 50;
	}
	return clipammo;
	}
	
public client_PreThink(id) {
	if(!is_user_alive(id) || Race[id] != 5) return PLUGIN_CONTINUE;
    
	new nzbut = get_user_button(id);
	new ozbut = get_user_oldbutton(id);
	if((nzbut & IN_JUMP) && !(get_entity_flags(id) & FL_ONGROUND) && !(ozbut & IN_JUMP)) {
	if (jumpznum[id] < get_pcvar_num(CvarVipJumps)) {
	dozjump[id] = true;
	jumpznum[id]++;
	return PLUGIN_CONTINUE;
	}
	}
	if((nzbut & IN_JUMP) && (get_entity_flags(id) & FL_ONGROUND)) {
	jumpznum[id] = 0;
	return PLUGIN_CONTINUE;
	}    
	return PLUGIN_CONTINUE;
	}

public client_PostThink(id) {
	if(!is_user_alive(id) || Race[id] != 5) return PLUGIN_CONTINUE;
    
	if(dozjump[id] == true) {
	new Float:vezlocityz[3];
	entity_get_vector(id,EV_VEC_velocity,vezlocityz);
	vezlocityz[2] = random_float(265.0,285.0);
	entity_set_vector(id,EV_VEC_velocity,vezlocityz);
	dozjump[id] = false;
	return PLUGIN_CONTINUE;
	}    
	return PLUGIN_CONTINUE;
	}  
	
public reset_model(id) cs_reset_user_model(id);

public client_disconnect(id) {  
	Race[id] = 0;
	set_user_invizibility(id,0);
	}

public client_putinserver(id) {
	set_task(get_pcvar_float(Mesaj), "MesajHud", 0, _, _, "b");
	Race[id] = 0;
	set_user_invizibility(id,0);
	}
	
public MesajHud(id) {
	set_hudmessage(0, 100, 200, -1.0, 0.17, 0, 6.0, 12.0, 0.01, 0.1, 10);
	show_hudmessage(id, "Fondatorul Serverului este Catalin !");
	}

stock ColorChat(const id, const input[], any:...) {
	new count = 1, players[32];
	static msg[191];
	vformat(msg, 190, input, 3);
	
	replace_all(msg, 190, "^x04", "^4");
	replace_all(msg, 190, "^x01", "^1");
	replace_all(msg, 190, "^x03", "^3");
	
	if(id) players[0] = id;
	else get_players(players, count, "ch"); {
	for(new i = 0; i < count; i++) {
	if(is_user_connected(players[i])) {
	message_begin(MSG_ONE_UNRELIABLE, get_user_msgid("SayText"), _, players[i]);
	write_byte(players[i]);
	write_string(msg);
	message_end();
	}
	}
	}
	}
/* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
*{\\ rtf1\\ ansi\\ deff0{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ lang1033\\ f0\\ fs16 \n\\ par }
*/
IG-BOOST.org - Instagram Followers Best, Cheap, Reliable
User avatar
CatalinACS
Membru, skill 0
Membru, skill 0
Posts: 26
Joined: 06 Jun 2017, 12:29
Detinator Steam: Da
Detinator server CS: 193.203.39.187:28015
SteamID: CatalinACS
Fond eXtream: 0
Contact:

15 May 2019, 13:33

Uppp... Nimeni?
User avatar
PorcusorulMagic
Membru, skill +1
Membru, skill +1
Posts: 314
Joined: 12 Sep 2017, 16:41
Detinator Steam: Da
CS Status: Starter Scripter
Detinator server CS: OLDCS.USP.RO
SteamID: STEAM_0:0:102123053
Fond eXtream: 0
Location: Piatra Neamt
Has thanked: 6 times
Been thanked: 1 time
Contact:

15 May 2019, 15:58

CatalinACS wrote:
15 May 2019, 13:33
Uppp... Nimeni?
tu ai vazut unde postezi?
User avatar
CatalinACS
Membru, skill 0
Membru, skill 0
Posts: 26
Joined: 06 Jun 2017, 12:29
Detinator Steam: Da
Detinator server CS: 193.203.39.187:28015
SteamID: CatalinACS
Fond eXtream: 0
Contact:

15 May 2019, 16:28

PorcusorulMagic wrote:
15 May 2019, 15:58
CatalinACS wrote:
15 May 2019, 13:33
Uppp... Nimeni?
tu ai vazut unde postezi?
La cereri. Nu e bine aici?
User avatar
CatalinACS
Membru, skill 0
Membru, skill 0
Posts: 26
Joined: 06 Jun 2017, 12:29
Detinator Steam: Da
Detinator server CS: 193.203.39.187:28015
SteamID: CatalinACS
Fond eXtream: 0
Contact:

16 May 2019, 17:08

Uppppppppppp
User avatar
NoNameAcs
Membru, skill 0
Membru, skill 0
Posts: 26
Joined: 05 May 2016, 10:19
Detinator Steam: Da
CS Status: Stau , ma uit ce ii pe aici!
Fond eXtream: 0
Location: cstrike/addons/amxmodx
Contact:

22 May 2019, 19:11

Daca tu esti cam chior , esti la cereri csgo nu 1.6 domnule catalin.
Image
Image
Image
Post Reply

Return to “Cereri”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 0 guests