Raised This Month: $ Target: $400
 0% 

Help Functions


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
pepe_thugs
Senior Member
Join Date: Aug 2010
Location: Portugal , Braga
Old 12-11-2011 , 22:09   Help Functions
Reply With Quote #1

Hello guys i have two bugs in this codes.
I'm not understanding if the error is funtions or the code complete itself.


The first error is the funtion don't get user name (admin), the motd appears but shows as admin always offline.
Image : http://**************/photo/my-images/6/firsterror.png/

Code:
public print_leaderlist(id) 
{
 static motd[1501],name[32] 
 new i, count, x, len
 
 for(i = 1 ; i <= maxplayers ; i++)
  if(is_user_connected(i))
   if(get_user_flags(i) & LEADER_CHECK)
    get_user_name(i,name,sizeof name - 1)
 
 
 len = format(motd[len], 1500-len,"<body bgcolor=#000000><font color=#000000><pre>")
 len += format(motd[len],1500-len,"<center><img src=^"http://mysite.com/images/Admin_image...</center></img>") 
 len += format(motd[len],1500- len,"%L",id,"<body bgcolor=#000000><font color=^"green^"><h4>[LEADER ADMIN]<font color=^"red^">ACTIVE:</h4><br>")  
 len += format(motd[len],sizeof motd - 1 - len,"<h3><font color=^"blue^"><b>%s</b><br></h3>", name, count)
 if(count > 0) {
  for(x = 0 ; x < count ; x++) {
   len += format(motd[len],sizeof motd - 1 -len, "<body bgcolor=#000000><font color=#000000><pre>", name[x], x < (count-1) ? ", ":"")
   if(len > 96 ) {
    show_motd(id, motd)
   }
  }
 }
 else {
  len = format(motd[len], 1500-len,"<body bgcolor=#000000><font color=#000000><pre>")
  len += format(motd[len], 1500-len,"<center><img src=^"http://mysite.com/images/Admin_image...</center></img>")
  len += format(motd[len], 1500-len, "<h3><font color=^"red^">NO<font color=^"green^">[LEADER ADMIN]<font color=^"red^">ACTIVE</h3>")
  len += format(motd[len],1500- len,"<h3><font color=^"red^">Contacto Admin --><font color=^"blue^"> http://mysite.com/Contact</h3>")
  show_motd(id, motd)
 }
 
}
The second error is the motd repeats the image, and shows as online admin, but the name of the admin don't shows.
Image: http://**************/photo/my-images...conderror.png/


Code:
public print_adminlist(id) 
{
 static motd[1501],name[32]
 new i, count, x, len
 
 for(i = 1 ; i <= maxplayers ; i++)
  if(is_user_connected(id))
   if(get_user_flags(id) & ADMIN_CHECK)
    get_user_name(i,name,sizeof name - 1)
 
 
 len = format(motd[len], 1500-len,"<body bgcolor=#000000><font color=#000000><pre>")
 len += format(motd[len], 1500-len,"<center><img src=^"http://mysite.com/images/Admin_image.png^"></center></img>") 
 len += format(motd[len],1500- len,"%L",id,"<body bgcolor=#000000><font color=^"green^"><h4>[MOD]<font color=^"red^">ACTIVE:</h4><br>") 
 len += format(motd[len],sizeof motd - 1 - len,"<h3><font color=^"blue^"><b>%s</b><br></h3>", name, count)
 if(count > 0) {
  for(x = 0 ; x < count ; x++) {
   len += format(motd[len],sizeof motd - 1 -len, "<body bgcolor=#000000><font color=#000000><pre>", name[x], x < (count-1) ? ", ":"")
   if(len > 96 ) {
    show_motd(id, motd)
   }
  }
 }
 else {
  len += format(motd[len], 1500-len,"<center><img src=^"http://mysite.com/images/Admin_image.png^"></center></img>")
  len += format(motd[len], 1500-len, "<h3><font color=^"red^">NO<font color=^"green^">[MOD]<font color=^"red^">ACTIVE</h3>")
  len += format(motd[len],1500- len,"<h3><font color=^"red^">Contact Admin --><font color=^"blue^"> http://mysite.com/Contact</h3>")
  show_motd(id, motd)
 }
}
Someone can help me please.
pepe_thugs is offline
pepe_thugs
Senior Member
Join Date: Aug 2010
Location: Portugal , Braga
Old 12-18-2011 , 09:10   Re: Help Functions
Reply With Quote #2

Any suggestion ?
pepe_thugs 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:00.


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