SA-MP Forums Archive
About editors ... - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: About editors ... (/showthread.php?tid=127900)



About editors ... - Universal - 15.02.2010

Hey everyone, i have one question:
Код:
dcmd_kick(playerid, params[])
{
    new index = 0;
  tmp = strtok(params, index);
    if (!IsPlayerAdmin(playerid))
    {
    SystemMessage(playerid, "Jus ne esate Administratorius.");
    return 1;
    }
  if(!strlen(tmp))
    {
    SystemMessage(playerid, "Correct usage: '/kick [playername] [reason]'");
    return 1;
    }
    new string[MAX_STRING];
    new second, minute, hour, day, month, year;
  giveplayerid = ReturnUser(tmp);
    if (IsPlayerConnected(giveplayerid))
    {
  format(string, sizeof(string), "You have been kicked by Administrator %s. (Reason: '%s')", PlayerName(playerid), params);
  SystemMessage(giveplayerid, string);
  format(string, sizeof(string), "Player %s has been kicked by Administrator %s. (Reason: '%s')", PlayerName(giveplayerid), PlayerName(playerid), params);
  SystemMessageToAll(string);
    format(string, sizeof(string), "%s has been kicked by Administrator %s. (Reason: '%s')", PlayerName(giveplayerid), PlayerName(playerid), params);
    print(string);
    gettime(hour, minute, second);
    getdate(year, month, day);
    format(string, sizeof(string), "Player %s kicked player %s on %d/%d/%d at %d:%d:%d. (Reason: '%s')", PlayerName(playerid), PlayerName(giveplayerid), month, day, year, hour, minute, second, params);
    ServerLog(string);
    KickPlayer(giveplayerid, "");
  }
    else
  {
    format(string, sizeof(string), "That player is not active.");
    SystemMessage(playerid, string);
    }
  return 1;
}
^ here you see how code is arrange automaticaly, all spaces and stuff. How is that done ? Do i have to do that manually by myself all the time or there is Editor which does this automaticaly ?


Re: About editors ... - dice7 - 15.02.2010

Notepad++ has automatic indentation, don't know about other editors, but pawno doesn't


Re: About editors ... - Universal - 15.02.2010

Quote:
Originally Posted by dice7
Notepad++ has automatic indentation, don't know about other editors, but pawno doesn't
Cool, any other editors does that ?