Cerere plugin VIP deathrun...

Categoria cu cereri de pluginuri si nu numai.

Moderators: Moderatori ajutatori, Moderatori, Echipa eXtreamCS.com

Forum rules
Accesează link-ul pentru a putea vedea regulile forumului

Daca doriti sa vi se modifice un plugin, va rugam postati aici .
Post Reply
User avatar
Neb1
Membru, skill 0
Membru, skill 0
Posts: 93
Joined: 02 Jul 2012, 13:59
Detinator Steam: Da
CS Status: vitan.rimoff@Yahoo.com
SteamID: vitan_rimoff
Location: Arad
Has thanked: 21 times
Contact:

24 Dec 2013, 12:20

Salut, as dorii acest plugin:
Sa deie VIP la toti jucatorii.
Nu vreau daca se poate modelele de vip.. vreau sa fie modelele implicite CT si T.. nu Smith sau altceva..
Image

k1d0x a facut asta:

Code: Select all

/* Plugin generated by AMXX-Studio */

#include <amxmodx>
#include <amxmisc>
#include <cstrike>
#include <hamsandwich>
#include <fun>

#define PLUGIN "New Plug-In"
#define VERSION "1.0"
#define AUTHOR "K!D()X"

#define SCOREATTRIB_NONE    0
#define SCOREATTRIB_DEAD    (1 << 0)
#define SCOREATTRIB_BOMB    (1 << 1)
#define SCOREATTRIB_VIP  (1 << 2)

new gVipMenu;
new bool:gSpeed[33];
new bool:gMenu[33];

public plugin_init() {
	register_plugin(PLUGIN, VERSION, AUTHOR)
	
	RegisterHam(Ham_Spawn, "player", "ham_PlayerSpawn", 1);
	register_event("CurWeapon","EventCurWeapon", "be", "1=1")
	register_message(get_user_msgid("ScoreAttrib"), "MessageScoreAttrib");
	
	iBuildMenu();
	server_cmd("sv_maxspeed 450");
}

public client_putinserver(id) {
	gSpeed[id] = false;
	gMenu[id] = false;
}

public client_disconnect(id) {
	gSpeed[id] = false;
	gMenu[id] = false;
}

public ham_PlayerSpawn(id) {
	if(is_user_bot(id))
		return 1;

	set_user_gravity(id, 1.0);
	set_user_maxspeed(id, 320.0);
	gSpeed[id] = false;
	gMenu[id] = false;
	
	new iPlayers[32], iNum, i;
	get_players(iPlayers, iNum, "aceh", "CT");
	
	for(i = 0; i < iNum; i++) {
		id = iPlayers[i];
		
		if(gMenu[id] == false) {
			menu_display(id, gVipMenu);
			gMenu[id] = true;
		}
	}
	
	return 1;
}

iBuildMenu() {
	gVipMenu = menu_create("\yVIP Menu", "iContent");
	
	menu_additem(gVipMenu, "\w+50 HP \r(\yEnergie\r)", "1");
	menu_additem(gVipMenu, "\w+100 AP \r(\yArmura\r)", "2");
	menu_additem(gVipMenu, "\wGravitatie \r(\y2x\r)", "3");
	menu_additem(gVipMenu, "\wViteza \r(\y2x\r)", "4");
	menu_setprop(gVipMenu, MPROP_EXIT, MEXIT_ALL);
}

public iContent(id, szMenu, szItem) {
	if(szItem < 0)
		return 0;
 
	new szKey[3], szName[64];
	new szAccess, szCallback;
	menu_item_getinfo(szMenu, szItem, szAccess, szKey, 2, _, _, szCallback);
	get_user_name(id, szName, 63);
	
	new szChoose = str_to_num(szKey);
 
	switch(szChoose) {
		case 1: {
			set_user_health(id, get_user_health(id) + 50);
		}

		case 2: {
			cs_set_user_armor(id, get_user_armor(id) + 100, CS_ARMOR_VESTHELM);
		}

		case 3: {
			set_user_gravity(id, 0.5);
		}
		
		case 4: {
			gSpeed[id] = true;
		}
	}
	
	menu_destroy(gVipMenu);
	
	return 1;
}

public MessageScoreAttrib(iMsgID, iDest, iReceiver) {
	new iPlayer = get_msg_arg_int(1);
	if(is_user_connected(iPlayer)) {
		set_msg_arg_int(2, ARG_BYTE, is_user_alive(iPlayer) ? SCOREATTRIB_VIP : SCOREATTRIB_DEAD);
	}
}

public EventCurWeapon(id) {
	new Weapon = read_data(2)
	
	if(Weapon) {
		if(gSpeed[id] == true) {
			client_cmd(id, "cl_backspeed 450")
			client_cmd(id, "cl_sidespeed 450")
			client_cmd(id, "cl_forwardspeed 450")
			set_user_maxspeed(id, 450.0);
		}
	}
}
dar le face in asa fel sa umple log-urile de erori.....

puteti va rog sa mi`l faceti sa nu deie erori?

Run time error 10 (plugin "vip.amxx") (native "menu_display") - debug not enabled!

L 12/24/2013 - 12:32:51: Invalid menu id 0(1)
L 12/24/2013 - 12:32:51: [AMXX] Displaying debug trace (plugin "vip.amxx")
L 12/24/2013 - 12:32:51: [AMXX] Run time error 10: native error (native "menu_display")
L 12/24/2013 - 12:32:51: [AMXX] [0] vip.sma::ham_PlayerSpawn (line 59)
Image
Rapidserver
Cosmin
Fost moderator
Fost moderator
Posts: 9366
Joined: 06 Jul 2013, 21:08
Detinator Steam: Da
Detinator server CS: Nu
Reputatie: Fost eXtream Mod
Fost Scripter eXtreamCS
Nume anterior: scosmynnnn
Has thanked: 492 times
Been thanked: 546 times

24 Dec 2013, 13:25

| Afiseaza codul
#include <amxmodx>
#include <amxmisc>
#include <cstrike>
#include <hamsandwich>
#include <fun>

#define PLUGIN "New Plug-In"
#define VERSION "1.0"
#define AUTHOR "K!D()X"

#define SCOREATTRIB_NONE    0
#define SCOREATTRIB_DEAD    (1 << 0)
#define SCOREATTRIB_BOMB    (1 << 1)
#define SCOREATTRIB_VIP  (1 << 2)

new gVipMenu;
new bool:gSpeed[33];
new bool:gMenu[33];

public plugin_init() {
	register_plugin(PLUGIN, VERSION, AUTHOR)
	
	RegisterHam(Ham_Spawn, "player", "ham_PlayerSpawn", 1);
	register_event("CurWeapon","EventCurWeapon", "be", "1=1")
	register_message(get_user_msgid("ScoreAttrib"), "MessageScoreAttrib");
	
	iBuildMenu();
	server_cmd("sv_maxspeed 450");
}

public client_putinserver(id) {
	gSpeed[id] = false;
	gMenu[id] = false;
}

public client_disconnect(id) {
	gSpeed[id] = false;
	gMenu[id] = false;
}

public ham_PlayerSpawn(id) {
	if(!is_user_alive(id) || is_user_bot(id))
		return 1;
	
	set_user_gravity(id, 1.0);
	set_user_maxspeed(id, 320.0);
	gSpeed[id] = false;
	gMenu[id] = false;
	
	new iPlayers[32], iNum, i;
	get_players(iPlayers, iNum, "aceh", "CT");
	
	for(i = 0; i < iNum; i++) {
		id = iPlayers;
		
		if(gMenu[id] == false) {
			menu_display(id, gVipMenu);
			gMenu[id] = true;
		}
	}
	
	return 1;
}

iBuildMenu() {
	gVipMenu = menu_create("\yVIP Menu", "iContent");
	
	menu_additem(gVipMenu, "\w+50 HP \r(\yEnergie\r)", "1");
	menu_additem(gVipMenu, "\w+100 AP \r(\yArmura\r)", "2");
	menu_additem(gVipMenu, "\wGravitatie \r(\y2x\r)", "3");
	menu_additem(gVipMenu, "\wViteza \r(\y2x\r)", "4");
	menu_setprop(gVipMenu, MPROP_EXIT, MEXIT_ALL);
}

public iContent(id, szMenu, szItem) {
	if(szItem < 0)
		return 0;
	
	new szKey[3], szName[64];
	new szAccess, szCallback;
	menu_item_getinfo(szMenu, szItem, szAccess, szKey, 2, _, _, szCallback);
	get_user_name(id, szName, 63);
	
	new szChoose = str_to_num(szKey);
	
	switch(szChoose) {
		case 1: {
			set_user_health(id, get_user_health(id) + 50);
		}
		
		case 2: {
			cs_set_user_armor(id, get_user_armor(id) + 100, CS_ARMOR_VESTHELM);
		}
		
		case 3: {
			set_user_gravity(id, 0.5);
		}
		
		case 4: {
			gSpeed[id] = true;
		}
	}
	
	menu_destroy(gVipMenu);
	
	return 1;
}

public MessageScoreAttrib(iMsgID, iDest, iReceiver) {
	new iPlayer = get_msg_arg_int(1);
	if(is_user_connected(iPlayer)) {
		set_msg_arg_int(2, ARG_BYTE, is_user_alive(iPlayer) ? SCOREATTRIB_VIP : SCOREATTRIB_DEAD);
	}
}

public EventCurWeapon(id) {
	new Weapon = read_data(2)
	
	if(Weapon) {
		if(gSpeed[id] == true) {
			client_cmd(id, "cl_backspeed 450")
			client_cmd(id, "cl_sidespeed 450")
			client_cmd(id, "cl_forwardspeed 450")
			set_user_maxspeed(id, 450.0);
		}
	}
}
User avatar
Neb1
Membru, skill 0
Membru, skill 0
Posts: 93
Joined: 02 Jul 2012, 13:59
Detinator Steam: Da
CS Status: vitan.rimoff@Yahoo.com
SteamID: vitan_rimoff
Location: Arad
Has thanked: 21 times
Contact:

24 Dec 2013, 14:43

nu e bun al tau... e tot ala lu` k1d0x, oricum m-a rezolvat unu Gabriel.

Puteti da t/c
Image
Cosmin
Fost moderator
Fost moderator
Posts: 9366
Joined: 06 Jul 2013, 21:08
Detinator Steam: Da
Detinator server CS: Nu
Reputatie: Fost eXtream Mod
Fost Scripter eXtreamCS
Nume anterior: scosmynnnn
Has thanked: 492 times
Been thanked: 546 times

24 Dec 2013, 18:22

Am spus eu ca e al meu? si da este bun,nu verificase daca e in viata !
Post Reply

Return to “Cereri”

  • Information
  • Who is online

    Users browsing this forum: Google [Bot] and 9 guests