Unde gresesc?

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
denis_dnl
Membru, skill 0
Membru, skill 0
Posts: 14
Joined: 04 Feb 2009, 18:18
Detinator Steam: Nu
CS Status: Citesc forumul eXtreamCS.com!
Been thanked: 1 time

07 Sep 2010, 18:36

Bun....am incercat sa fac un plugin gen xredirect dar mai simplu(decat un meniu+niste mesaje) si nu am reusit...puteti va rog sa-mi spuneti unde gresesc?
| Afiseaza codul
#include <amxmisc>

#define PLUGIN "community_servers"
#define VERSION "1.0"
#define AUTHOR "daniel_San"


public plugin_init() {
	register_plugin(PLUGIN, VERSION, AUTHOR)
	register_clcmd("say /servers","showMenu")
	register_clcmd("say /server","showMenu")
	register_clcmd("say /comunitate","showMenu")
	register_clcmd("say /servere","showMenu")
	register_clcmd("say_team /servers","showMenu")
	register_clcmd("say_team /server","showMenu")
	register_clcmd("say_team /comunitate","showMenu")
	register_clcmd("say_team /servere","showMenu")
	set_task(5,"adver",0);
	register_menucmd(register_menuid("\r CxR-xxxxx Servers:"), 1023, "MenuCommand" )
}


public adver(){
	new players[32],inum,Buffer[256];
	get_players(players,inum)
	
	formatex(Buffer,sizeof Buffer-1, "^x03[CxR-ReSpawN] ^x04Scrieti ^x01/servers ^x04pentru a vedea toate serverele comunitatii")
	for(new i=0;i<inum;i++) {
		message_begin(MSG_ONE, get_user_msgid("SayText"), _, players);
		write_byte(players);
		write_string(Buffer);
		message_end();
	}
	
}


public showMenu(id) {
	new zMenu[256],keys;
	new nLen = formatex(zMenu[nLen],charsmax(zMenu)-nLen,"\r CxR-HighSkill Servers:^n");
	nLen+=formatex(zMenu[nLen],255-nLen,"\y 1. Cs.xxxxxxxxxxxx.com---------Clasic^n");
	nLen+=formatex(zMenu[nLen],255-nLen,"\y 2. ReSpawN.xxxxxl.com----Respawn^n");
	nLen+=formatex(zMenu[nLen],255-nLen,"\y 0. Exit");
	keys = (1<<0|1<<1|1<<2|1<<3|1<<4|1<<5|1<<6|1<<9)
	show_menu( id, keys, zMenu, -1 ) 
	
	return PLUGIN_CONTINUE;
}

public MenuCommand(id, key) {
	
	switch(key) 
	{
		case 0:  client_cmd(id,"connect ip") 
			case 1:  client_cmd(id,"connect ip") 
			case 9:  {client_print(id,print_chat,"[CxR-Menu]Menu closed") 
			           return PLUGIN_HANDLED;
				 }
	}
	
	
}


unde apare xxxx sau ip am inlocuit pentru a nu face reclama.Multumesc
User avatar
KronoS eXtream
Fost administrator
Fost administrator
Posts: 4380
Joined: 02 Apr 2009, 18:18
Detinator Steam: Da
Reputatie: Fost administrator
Fost detinator Zombie-Land.eXtream.Ro
Contribuitor
Fost Scripter eXtreamCS
Dezvoltator al listei de seriozitate eXtreamCS
Location: Bucharest
Has thanked: 543 times
Been thanked: 820 times
Contact:

07 Sep 2010, 19:10

Nu ai inclus Amxmodx.
Sfat: foloseste new_menus
Nu efectuez tranzactii pe mess, skype etc. Aveti grija la indivizii care se dau drept mine!
Nu mai ofer suport asa ca nu imi mai trimiteti mesaje in legatura cu asta!


Zombie Plague Shade 1.2-debug1 [with Item Limiter] (12 September 2015) - Bombardier Branch
denis_dnl
Membru, skill 0
Membru, skill 0
Posts: 14
Joined: 04 Feb 2009, 18:18
Detinator Steam: Nu
CS Status: Citesc forumul eXtreamCS.com!
Been thanked: 1 time

07 Sep 2010, 21:43

Amxmodx era inclus am uitat sa copiez si acea linie(amxxStudio il include automat)
2: Ms pentru idee a functionat cu new menus:)
compaq
Fost moderator
Fost moderator
Posts: 2598
Joined: 01 Dec 2008, 15:32
Detinator Steam: Da
Reputatie: Fost eXtream Mod
Fost contribuitor
Fost manager
Fost Scripter eXtreamCS
Has thanked: 15 times
Been thanked: 150 times

08 Sep 2010, 11:58

La set_task pune primul parametru cu zecimale ( 5 -> 5.0 ).
Post Reply

Return to “Cereri”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 28 guests