Hello Guys! Just Some Help

Started by Mohamed Boubekri, Oct 18, 2017, 08:37 PM

Previous topic - Next topic

Mohamed Boubekri

I am Have Announcement Commands /ann Oke.
Now i am need to go ingame and do/setlevel Name.player Eventstaff
or /setlevel Name admin
Head admin : Can Do /kick And /ann And /setweather And /settime After me do
/setlevel Name eventstaff Send Him Message For Player: admin has give you eventstaff team.
Really Dude Me commands
Here You Go
1 : Announcement
    else if (cmd == "ann")
    {
if ( player.Name == "[MCO]We3da" || player.Name == "SdS.3laWi" || player.Name == "MahmoudTornado" )   // You Must Change Them To You Admins Names
    {
        if (!text) return ClientMessage("[#FF0000][Syntax]/ann <ID> <All/Nick/ID> <Text>", player, 0, 0, 0);
        local v = split(text, " ");
        if (v.len() < 3) return ClientMessage("[#FF0000][Syntax]/ann <ID> <All/Nick/ID> <Text>", player, 0, 0, 0);
        if (v[1].tolower() == "all") AnnounceAll(text.slice(v[0].len() + v[1].len() + 2), v[0].tointeger());
        else Announce(text.slice(v[0].len() + v[1].len() + 2), FindPlayer(v[1]), v[0].tointeger());
    }
        else MessagePlayer( "[#FF0000] You're not allowed to use this command. " , player )
}
2 : Kick
    else if ( cmd == "kick" )
    {
if ( player.Name == "[MCO]We3da" || player.Name == "SdS.3laWi" || player.Name == "New Name #2" )   // You Must Change Them To You Admins Names
        {
            if ( text )
            {
                local plr = FindPlayer( text );
                if ( plr )
                {
                    KickPlayer( plr );
                }
                else MessagePlayer( "[#ff0000]Cannot find player "+text+"." , player );
            }
            else MessagePlayer( "[#ff0000]Usage: /"+cmd+" <player>" , player );
        }
        else MessagePlayer( "[#ff0000]You are not allowed to use this command." , player )
    }
3 : Set Time
else if ( cmd == "settime" )
    {
if ( player.Name == "[MCO]We3da" || player.Name == "SdS.3laWi" || player.Name == "New Name #2" )   // You Must Change Them To You Admins Names
{
     if ( !text ) MessagePlayer( "[#ff0000]Correct syntax : /settime <hr> <min>", player );
      else if ( split(text, " ").len() < 2) return MessagePlayer("[#ff0000]Correct syntax : /settime <hr> <min>", player )
      else
   {
   local a = split(text, " ");
      if ( !IsNum( a[0] )) MessagePlayer( "[#ffbb00]Format: /settime <hr> <min>", player );
      else if ( !IsNum( a[1] )) MessagePlayer( "[#ffbb00]Format: /settime <hr> <min>", player );
      else SetTime( a[0].tointeger(), a[1].tointeger() ) ; 
      }
   }
        else MessagePlayer( "[#FF0000] You're not allowed to use this command. " , player )
}
4 SetWeather
else if ( cmd == "setweather" )
{
if ( player.Name == "[MCO]We3da" || player.Name == "SdS.3laWi" || player.Name == "New Name #2" )   // You Must Change Them To You Admins Names
{
if ( !text ) return MessagePlayer( "[#ff0000]Usage: setweather [Weather/ID]", player );
if ( !IsNum(text) ) return MessagePlayer( "[#ff0000]Use integers/numbers", player );
SetWeather( text.tointeger() );
Message( "[#4acc0a] Admin "+ player.Name +" Set The Weather To "+GetWeatherName());
return;
}
        else MessagePlayer( "[#FF0000] You're not allowed to use this command. " , player )
}

Note : Sorry For My Bad eNGLISH i need Helppp Just Got it to me for ann or settime as example and me i iwill made other.
| What now ? | Not yet ! |
Morrocan:- [ 🇲🇦 ].

Mahmoud Tornado

#1
setlevel command not working in this commands Becuz you must be have register server than level stats than change commands ;D ;D

Mohamed Boubekri

Quote from: Mahmoud Tornado on Oct 18, 2017, 09:02 PMsetlevel command not working in this commands Becuz you must be have register server than level stats than change commands ;D ;D
Registration Do You Know Any System registration niice save stats?
| What now ? | Not yet ! |
Morrocan:- [ 🇲🇦 ].

D4rkR420R

In other words, you must have an account system, in which the PlayerStats class stores a variable named Level. We use that variable to identify if the player is using the command with the appropiate level.
if( cmd == "kick" ) { if( Stats[ player.ID].Level >= 3) // Your code here }

Mohamed Boubekri

Quote from: KuRiMi on Oct 19, 2017, 02:37 PMIn other words, you must have an account system, in which the PlayerStats class stores a variable named Level. We use that variable to identify if the player is using the command with the appropiate level.
if( cmd == "kick" ) { if( Stats[ player.ID].Level >= 3) // Your code here }
Bro @KuRiMi Do You Know Any Account System very NIICE Tell me?
| What now ? | Not yet ! |
Morrocan:- [ 🇲🇦 ].