|
Problem ze /slot
MisieQ - 29.09.2008 15:37
Problem ze /slot
Witam :) mam problem z pluginem :/ przerobiłem go i dalej pokazuje tylko adminów a osoby z tylko flaga "b" sa pomijane :/
Przerobione SMA: Kod:
/* Plugin generated by AMXX-Studio
*
* -= English =-
* Based on Admin Check 1.51 by OneEyed
* Edited by MisieQ
*
* -= Polski =-
* Plugin w calosci bazuje na Admin Check w wersji 1.51 stworzeniej przez OneEyed
* Lekko zmodyfikowany przez MisieQ
*/
#include <amxmodx>
#define ADMIN_CHECK ADMIN_RESERVATION
static const COLOR[] = "^0x03" //kolor teamu
static const CONTACT[] = ""
new maxplayers
new gmsgSayText
public plugin_init() {
register_plugin("Slot Check", "1.6", "OneEyed Edited by MisieQ")
maxplayers = get_maxplayers()
gmsgSayText = get_user_msgid("SayText")
register_clcmd("say", "handle_say")
register_cvar("amx_contactinfo", CONTACT, FCVAR_SERVER)
}
public handle_say(id) {
new said[192]
read_args(said,192)
if( ( containi(said, "who") != -1 && containi(said, "slot") != -1 ) || contain(said, "/slot") != -1 )
set_task(0.1,"print_adminlist",id)
return PLUGIN_CONTINUE
}
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) & ADMIN_CHECK)
get_user_name(id, adminnames[count++], 31)
len = format(message, 255, "%s Osoby ze slotem: ",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, "Brak osob ze slotem online.")
print_message(user, message)
}
get_cvar_string("amx_contactinfo", contact, 63)
if(contact[0]) {
format(contactinfo, 111, "%s Kontakt z adminem serwera -- %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()
}
!~* eMo SeBu$ *~! - 07.10.2008 14:01
To musi działać oO
MisieQ - 11.10.2008 22:40
Seba, działa jak kopiowalem do kompilatora to nie skopiowało ostatniego } i nie wiem czemu dbg nie wywalao :D
zanotowane.pldoc.pisz.plpdf.pisz.plqup.pev.pl
|