Raised This Month: $32 Target: $400
 8% 

go and bring plugin


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
The RaiD.
Member
Join Date: Jul 2019
Old 09-05-2021 , 13:00   go and bring plugin
Reply With Quote #1

Hello there is a bug with this menu /go and if i choose players on SECOND page. (next page) its not work it choose a random player from first page can someone help to fix it?
Code:
#include <amxmodx>
#include <amxmisc>
#include <fakemeta>

#define PLUGIN "Isinlanma Eklentisi"
#define VERSION "2.0"
#define AUTHOR "Fatih ~ EjderYa"

#define Isinlanma_Yetkisi ADMIN_KICK

new const Menu_Filitleri[] = "ac"
	
//	İsteğe bağlı filtreleme bayrakları listesi:
//	  "a" - Ölü müşterileri dahil etmeyin
//	  "b" - Canlı müşterileri dahil etmeyin
//	  "c" - botlara yer verme
//	  "d" - insan istemcileri dahil etmeyin
//	  "e" - takımla eşleşme
//	  "f" - adın bir kısmıyla eşleşme
//	  "g" - harf büyüklüğüne duyarsız olarak eşleşme
//	  "h" - HLTV vekillerini içermeyin
//	  "i" - müşterileri birleştirmeyi içeriyor
//	  KAYNAK --->  http://www.amxmodx.org/api/amxmodx/get_players

public plugin_init() {
	register_plugin(PLUGIN, VERSION, AUTHOR)
	
	register_clcmd("say /go","git")
	register_clcmd("say .go","git")
	register_clcmd("say /bring","getir")
	register_clcmd("say .bring","getir")
}
public git(id) Isinlama_Menusu(id,2)
public getir(id) Isinlama_Menusu(id,1)

public Isinlama_Menusu(id,TUR){
	
	if( access(id,Isinlanma_Yetkisi) ){
	
		new Menu_Basligi[128]
		if ( TUR != 1 )	formatex(Menu_Basligi,charsmax(Menu_Basligi),"\r*** \wGo to Player \r***")
		else		formatex(Menu_Basligi,charsmax(Menu_Basligi),"\r*** \wBring the Player \r***")
		
		
		
		new Menu = menu_create(Menu_Basligi, "Menu_devam")
		
		
		new Oyuncular[32] , Num , Uid = -1
		get_players(Oyuncular,Num,Menu_Filitleri)
		
		for ( new i ; i < Num ; i++ ){
			
			
			if(  id != Oyuncular[i] && (!access(Oyuncular[i],ADMIN_IMMUNITY)) ){	
				
				Uid = Oyuncular[i]
				new isim[36] , numara[4] , Kimlik
				if ( TUR != 1 )	Kimlik = Uid * 100
				else		Kimlik = Uid
				num_to_str(Kimlik,numara,charsmax(numara))
				get_user_name(Uid,isim,charsmax(isim))
				menu_additem(Menu, isim, numara)
				
			}
			
			
			
			
		}
		
		
		if ( Uid == -1 ) client_print_color(id,print_team_default,"^3Player not found.")
		else
		{
		
			menu_setprop(Menu, MPROP_NEXTNAME, "Next");  
			menu_setprop(Menu, MPROP_BACKNAME, "Back");
			menu_setprop(Menu,MPROP_EXITNAME,"\wExit")
			menu_setprop(Menu,MPROP_EXIT, MEXIT_NORMAL)
			menu_display(id,Menu)
			
		}
		
	}
	
	else client_print_color(id,print_team_default,"^3U havent access.")
	
	
	return PLUGIN_HANDLED
	
	
}
public Menu_devam(id, Oylama_menu , item){
	new data[6], iName[64]
	new acces, callback
	menu_item_getinfo(Oylama_menu, item, acces, data,5, iName, 63, callback)
	
	new Veri = str_to_num(data)
	
	if ( Veri != 0 ){
		if ( Veri >= 100 )	Yanina_Getir(Veri/100,id,id) , Isinlama_Menusu(id,2)
		else			Yanina_Getir(id,Veri,id) , Isinlama_Menusu(id,1)
	}
	
	
}
public Yanina_Getir(cagiran_id,gelen_id,yetkili){

	
	client_cmd(cagiran_id,"spk ^"events/enemy_died^"")
	client_cmd(gelen_id,"spk ^"events/enemy_died^"")
	new Float:Konum[3]
	pev(cagiran_id,pev_origin,Konum)
	Konum[2] += 75
	set_pev(gelen_id,pev_origin,Konum)
	
	new Isim_yetkili[36] , Isim_Uid[36]
	get_user_name(yetkili,Isim_yetkili,charsmax(Isim_yetkili))
	
	if ( yetkili == cagiran_id ){
		get_user_name(gelen_id,Isim_Uid,charsmax(Isim_Uid))
		client_print_color(0,print_team_default,"^4%s ^3used go/bring command on ^4 %s ^3Player",Isim_yetkili,Isim_Uid)
	}
	else
	{
		get_user_name(cagiran_id,Isim_Uid,charsmax(Isim_Uid))
		client_print_color(0,print_team_default,"^4%s ^3used go/bring command on ^4 %s ^3Player",Isim_yetkili,Isim_Uid)
	}
	set_task(0.5,"ziplat",gelen_id)

}

public ziplat(id)	client_cmd(id,"+jump;wait;wait;wait;wait;wait;wait;wait;wait;wait;wait;-jump")
/* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
*{\\ rtf1\\ ansi\\ deff0{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ lang1055\\ f0\\ fs16 \n\\ par }
*/
The RaiD. is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 09-05-2021 , 16:33   Re: go and bring plugin
Reply With Quote #2

I've looked through the code, translated it and cleaned up and I can't see how what you're describing is possible. Are you sure that this is the actual code that is running on your server?
__________________
fysiks is offline
The RaiD.
Member
Join Date: Jul 2019
Old 09-06-2021 , 13:05   Re: go and bring plugin
Reply With Quote #3

yep iam 100% sure that iam using this plugin on /bring it works all second page too but on /go second page where u can choose the players not work it choose players from first page.. example: on second page player nick: player1 i click on it but it teleports me to 1 player from first page.
The RaiD. is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 09-06-2021 , 21:16   Re: go and bring plugin
Reply With Quote #4

I'm not sure why it would be doing that but I've refactored the code that was doing the differentiation between the go and bring menus (the go menu was the one that was doing things differently). Hopefully, it will have removed the bug.

You will need to compile it yourself since the forums haven't been updated to use 1.9.0 yet.
Attached Files
File Type: sma Get Plugin or Get Source (custom_admin_teleport.sma - 86 views - 3.8 KB)
__________________
fysiks is offline
The RaiD.
Member
Join Date: Jul 2019
Old 09-07-2021 , 14:22   Re: go and bring plugin
Reply With Quote #5

works thanks a lot fysiks.
The RaiD. is offline
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 12:43.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode