1
Script Discussion / Re: Starting server problem
« on: September 21, 2014, 09:37:39 am »
big thanks
This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
Which is line 2617 ?Line 2617
else if (cmd == "setrank")
{
if (PlayerInfo[playerid].Logged == 0) ClientMessage("You are not log in!", player, 255, 0, 0);
else if (!IsPlayerExistsClan(player)) ClientMessage("You have not clan!", player, 255, 0, 0);
else if (!text) ClientMessage("Enter: /c setrank [Nick] [1-5]", player, 255, 0, 0);
else if (GetPlayerDetailsValue(player, "clan_rank") < 3) ClientMessage("You need clan rank [3]", player, 255, 0, 0);
else
{
local tmp = split(text, " "); //Разбиваем исходную команду по пробелам и пишем в массив cmd
if (tmp.len() != 2) ClientMessage("Enter: /c setrank [Nick] [1-5]", player, 255, 0, 0);
else if ( !IsClanRegistered(tmp[0]) ) ClientMessage("This clan does not exists", player, 255, 0, 0);
else if (!IsNum(tmp[1] || tmp[1].tointeger() < 1 || tmp[1].tointeger() > 5) ClientMessage("Enter: /c setrank [Nick] [1-5]", player, 255, 0, 0);
else
{
SetPlayerDetailsValue(player, "clan_rank", tmp[1].tointeger() );
msg = format("%s [%i] set clan rank: [%i]", player.Name, GetPlayerLevel(player), tmp[1].tointeger() );
ClientMessage(msg, player, 255, 0, 0);
}
}
}