Cmd problem

Started by Karthik, Jan 03, 2016, 06:21 AM

Previous topic - Next topic

Karthik

else if ( ( cmd == "admin" ) || ( cmd == "admins" ) )
   {
      local plr, b;
      for( local i = 0; i <= GetMaxPlayers(); i++ )
      {
       plr = FindPlayer( i );
      if ( ( plr ) && ( status[ plr.ID ].Level >= 5 ) )
       {
      if ( b ) b = b + ", " + plr.Name + " (Level: " + status[ plr.ID ].Level + ")"
      else b = plr.Name + " (Level: " + status[ plr.ID ].Level + ")"
       }
      }
      if ( b ) eMessage(GREEN+"Information : "+WHITE+"Admins Online: [ " + b + " ]" );
      else eMessage(GREEN+"Information : "+WHITE+"No Admins Online." );
   }
cmd isnt working when admins are in server still no adins online appear

KAKAN

Maybe their level is not 5 or up.
oh no

Karthik

dude cmd  is bug plz fix or help

[VM_U]Spectra.PhantoM^

You probably would've tryed to modify it here ya go:
else if ( ( cmd == "admin" ) || ( cmd == "admins" ) )
{
if (status[ player.ID ].IsReg == false) MessagePlayer("[#00ff00][INFO] [#ffffff]You Need To Register First!",player);
else if ( status[ player.ID ].IsLogged == false ) MessagePlayer("[#00ff00][INFO] [#ffffff]You Need To Log-In First!",player);
else {
local plr, b;
for( local i = 0; i <= GetMaxPlayers(); i++ )
{
plr = FindPlayer( i );
if ( ( plr ) && ( GetLevel(plr) >= 3 ) && ( status[plr.ID].hide_admin == false ) )
{
if ( b ) b = b + ", " + plr.Name + " (Level: " + GetLevel(plr) + ")"
else b = GREEN+"[ "+ plr.Name + " ] (" + GetLevel(plr) + ") [ " + GetLevelTag(plr) +""+GREEN+ " ]"
}
}
if ( b ) MessagePlayer(ORANGE+"** >> Admins Online:[ "+b+" ].",player);
else  MessagePlayer(YELLOW+"** >> No Admins Online In Server.",player);
}
}
Wanna Talk To Me? Come At Irc #Jugo@LUNet

Karthik

u mad ultimate u dont know even the little bit scripting
this cmd u simply pasted here from dnus leaked script i want my cmd to be fixed

Mashreq

#5
Karthik, the command which you posted is working fine. Maybe your level is lower than 5.
Try to find your level using
print( status[ FindPlayer("karthik"). ID ].Level );
(add this somewhere, in a command or execute from irc.. )

[VM_U]Spectra.PhantoM^

#6
Quote from: Karthik on Jan 03, 2016, 08:13 AMu mad ultimate u dont know even the little bit scripting
this cmd u simply pasted here from dnus leaked script i want my cmd to be fixed
Excuse me.. but i certainly know a lot more than u u nab. Your telling that to me like u know a lot more than me well for the last time stop calling someone else a nab just cuz u dont know urself
Wanna Talk To Me? Come At Irc #Jugo@LUNet

Karthik

Mashreq my lvl is this only i dont know why isnt wprking
plz give me another cmd its isnt working

Williams

use this:

else if ( ( cmd == "admin" ) || ( cmd == "admins" ) )
{
local plr, b;
for( local i = 0; i <= GetMaxPlayers(); i++ )
{
    plr = FindPlayer( i );
if ( ( plr ) && ( GetLevel(plr) >= 3 ) && ( status[plr.ID].hide_admin == false ) )
    {
if ( b ) b = b + ", " + plr.Name + " (Level: " + GetLevel(plr) + ")"
else b = GREY+" "+ plr.Name + " " + GetLevel(plr) + "."
    }
}
if ( b ) Message(GREY+" Admins Online: " + b + "" );
else  Message(GREY+" No Admins Online." );
}

hope it's work..!
Hey, i m always at IRC and Forum you can comtact me at IRC channel :- #GDM @LUNet and Forum :- http://pro-fighter.tk/index.php

Thijn

Your cmd works fine. Just make sure you actually have the right level, which you clearly don't.

Karthik