Jump to content

- Advertisement -
Photo

Intrebare[ Rezolvat ]


  • This topic is locked This topic is locked
4 replies to this topic

#1
old thE GOD

old thE GOD

    Addicted Member

  • Membru
  • 284 posts
  • 31 topics
  • Joined 16-March 14
  • Country: Country Flag
/* Plugin generated by AMXX-Studio */

#include <amxmodx>
#include <amxmisc>

#define PLUGIN "Clan List"
#define VERSION "1.0"
#define AUTHOR "old'"

new maxplayers
new gmsgSayText

public plugin_init() {
	register_plugin(PLUGIN, VERSION, AUTHOR)
	
	register_clcmd("say /clan", "print_adminlist", 1)
	
	maxplayers = get_maxplayers()
	gmsgSayText = get_user_msgid("SayText")
}
public print_adminlist(user)
{
	new adminnames[33][32]
	new message[256]
	new contactinfo[256], contact[112]
	new id, count, x, len
	
	for(id = 1 ; id <= maxplayers ; id++)
		if(is_user_connected(id))
		if(get_user_flags(id))
		get_user_name(id, adminnames[count++], 31)
	
	len = format(message, 255, "%s Membri Clan Online: ",COLOR)
	if(count > 0) {
		for(x = 0 ; x < count ; x++) {
			len += format(message[len], 255-len, "%s%s ", adminnames[x], x < (count-1) ? ", ":"")
			if(len > 96 ) {
				print_message(user, message)
				len = format(message, 255, "%s ",COLOR)
			}
		}
		print_message(user, message)
	}
	else {
		len += format(message[len], 255-len, " No one !")
		print_message(user, message)
	}
	
	get_cvar_string("amx_contactinfo", contact, 63)
	if(contact[0])  {
		format(contactinfo, 111, "%s Y!M -- %s", COLOR, contact)
		print_message(user, contactinfo)
	}
}

print_message(id, msg[]) {
	message_begin(MSG_ONE, gmsgSayText, {0,0,0}, id)
	write_byte(id)
	write_string(msg)
	message_end()
}
 

Este un prototip modificat dupa unul de "vip online" , intrebarea mea este:

Daca modificarea este buna , nu mai stiu eu prea multe despre pluginuri si as dorii sa stabilesti flagurile celor care apar in lista respectiv "bitj" .


Edited by old thE GOD, 29 August 2014 - 11:49 AM.


#2
Andrei;

Andrei;

    Administrator

  • Administrator
  • 3201 posts
  • 398 topics
  • Joined 16-December 12
  • Country: Country Flag
if(get_user_flags(id))

->

if(get_user_flags(id) & read_flags( "bitj" ) )

Doar cei cu flagurile bitj vor aparea, daca mai au altceva infara de bitj nu vor aparea.


Edited by Artick ;, 29 August 2014 - 01:15 PM.


#3
old thE GOD

old thE GOD

    Addicted Member

  • Topic Starter

  • Membru
  • 284 posts
  • 31 topics
  • Joined 16-March 14
  • Country: Country Flag

Nu poti seta ca cei ce au bitj in accese (indiferent daca mai sunt altele sa apara?)  de exemplu am cdehijklmnopqrst si sa apar deoarece am acele flaguri , mai concret toti playerii care au inclus in acces bitj sa apara.



#4
Andrei;

Andrei;

    Administrator

  • Administrator
  • 3201 posts
  • 398 topics
  • Joined 16-December 12
  • Country: Country Flag
if(get_user_flags(id) & ADMIN_RESERVATION & ADMIN_CHAT & ADMIN_LEVEL_H & AMX_VOTE )

Daca am gresit eu cumva la flaguri, corectezi tu( cred ca ai prins ideea ).



#5
old thE GOD

old thE GOD

    Addicted Member

  • Topic Starter

  • Membru
  • 284 posts
  • 31 topics
  • Joined 16-March 14
  • Country: Country Flag

Inteles :) , ty de ajutor daca vrei il inchizi si iti las pm daca nu merge sa-l redeschizi :).






1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users