Guest User

Untitled

a guest
Sep 11th, 2018
104
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 7.51 KB | None | 0 0
  1. #include <a_samp>
  2.  
  3. #define MAX_PHONE_INT 10
  4.  
  5. new RandColor [] = {
  6.     {0xFF00FA},
  7.     {0xFF15FD},
  8.     {0xFF9854745854FD}
  9. };
  10.  
  11. public OnFilterScriptInit() {
  12.  
  13.     return 0;
  14. }
  15.  
  16. public OnFilterScriptExit() {
  17.  
  18.     return 0;
  19. }
  20.  
  21. public OnPlayerConnect(playerid) {
  22.     new lstring[128];
  23.     format(lstring, sizeof(lstring), "The player %s joined the game...!", Gn(playerid));
  24.     new Random = random(sizeof(RandColor));
  25.     SendClientMessageToAll(RandColor[Random], lstring);
  26.     //**********IDsystem**********\\
  27.     for (new i = 0; i < MAX_PLAYERS; i++) {
  28.         if(IsPlayerConnected(i)) {
  29.             SetPlayerScore(playerid, playerid * 5487);
  30.         }
  31.     }
  32.     return 1;
  33. }
  34.  
  35. public OnPlayerCommandText(playerid, cmdtext[]) {
  36.     if(strcmp(cmdtext, "/AllID", true)) {
  37.     new Random = random(sizeof(RandColor));
  38.         for(new i = 0; i < MAX_PLAYERS; i++) {
  39.             if(IsPlayerConnected(i)) {
  40.                 new IDstring[128];
  41.                 format(IDstring, sizeof(IDstring), "NickName : %s ; ID : %d [ NUMBER - %d ]", Gn(i), GetPlayerScore(i), i);
  42.                 SendClientMessage(playerid, RandomColor[Random], IDstring);
  43.             }
  44.         }
  45.         return 1;
  46.     }
  47.     if(strcmp(cmd, "/GetMoneyID", true)) {
  48.         new ID[128];
  49.         ID = strtok(cmdtext, idx);
  50.         new Random = random(sizeof(RandColor));
  51.         if(!strlen(ID)) return SendClientMessage(playerid, RandColor[Random], "The ID is empty... USEGE : /GetMoneyID [ID] [ ( ( SCORE ID ) ) ] ");
  52.         for(new i = 0; i < MAX_PLAYERS; i++) {
  53.             if(IsPlayerConnected(i)) {
  54.                 SendClientMessage(playerid, RandColor[Random], "Searching...");
  55.                 if(strcmp(i, GetPlayerScore(i))) {
  56.                     new MoneyString[128];
  57.                     format(MoneyString, sizeof(MoneyString), "Money : %d", GetPlayerMoney(i));s
  58.                     SendClientMessage(playerid, RandColor[Random], MoneyString);
  59.                     break;
  60.                 }
  61.             }
  62.         }
  63.         return 1;
  64.     }
  65.     if(strcmp(cmd, "/ChangeID", true)) {
  66.         new IDx[128];
  67.         IDx = strtok(cmdtext, idx);
  68.         if(!strlen(IDx)) return SendClientMessage(playerid, 0xFF00FA, "ERROR.USEGE : /ChangeID [ ëôåì ëîä ]");
  69.         if(strval(IDx) < 5487 || strval(IDx) < 10) return SendClientMessage(playerid, 0xFF00FA, "ERROR.NUMBER.BIG/SMALL : The IDx is bigger then 5487 or smaller then 10");
  70.         SetPlayerScore(playerid, playerid * strval(IDx));
  71.         GivePlayerMoney(playerid, -10000);
  72.         AddToThePoliceSuspectList(playerid, "[tz] : ID  - [ Not real ]");
  73.         return 1;
  74.     }
  75.     if(strcmp(cmd, "/IDinfo", true)) {
  76.         new ID[128];
  77.         ID = strtok(cmdtext, idx);
  78.         for(new i = 0; i < MAX_PLAYERS; i++) {
  79.             if(IsPlayerConnected(i)) {
  80.                 SendClientMessage(playerid, 0xFF00FA, "Searching...");
  81.                 if(strcmp(strval(ID), GetPlayerScore(i), true)) {
  82.                     new IDname[MAX_PLAYER_NAME], IDphone[MAX_PHONE_INT], IDnameString[128], IDphoneString[128];
  83.                     IDname = GetPlayerName(i);
  84.                     IDphone = GetplayerPhoneNumber(i);
  85.                     format(IDnameString, sizeof(IDnameString), "|-NAME : %s-|", IDname);
  86.                     format(IDphoneString, sizeof(IDphoneString), "|-PHONE : %d-|", IDphone);
  87.                     SendClientMessage(playerid, 0xFF00LD, "|---Suspect-Info---|");
  88.                     SendClientMessage(playerid, 0xFF00LD, IDnameString);
  89.                     SendClientMessage(playerid, 0xFF00LD, IDphoneString);
  90.                     SendClientMessage(playerid, 0xFF00LD, "|---Suspect-Info---|");
  91.                     break;
  92.                 }
  93.             }
  94.         }
  95.         return 1;
  96.     }
  97.     return 0;
  98. }
  99.  
  100. stock Gn(playerid) {
  101.     new name[MAX_PLAYER_NAME];
  102.     GetPlayerName(playerid, name, sizeof(name));
  103.     return name;
  104. }
  105.  
  106. stock AddToThePoliceSuspectList(playerid, string[]) {
  107.     new reason[128];
  108.     reason = string;
  109.     new LineNAME[128], LineTEXT[128];
  110.     format(LineNAME, sizeof(LineNAME), "%d", GetPlayerScore(playerid));
  111.     format(LineTEXT, sizeof(LineTEXT), "%s", strval(reason));
  112.     dini_Set("Police/Suspects/SuspectList.ini", LineNAME, LineTEXT);
  113.     return 1;
  114. }
  115.  
  116.  
  117. /////////////////////////////////////////////////////
  118.  
  119. using Sytem;
  120.  
  121. public class Game
  122. {
  123.     enum SomeUsername = { "SliPeR45", "SDMasterYoda", "nippbit" };
  124.     enum SomePassword = { Password1 = "123.201", Password2 = "123.2011", Password3 = "123.20123" };
  125.     enum ServerStats = { ServerName = "MineYourMind.Co.IL", ServerSlots = "150", AllowedMobs = "true", AloowedMonsters = "true", PVP = "false", AllowedFly = "false", GameMode = "0"); 
  126.     public static int Main(string[] args) {
  127.         Console.WriteLint("Welcome to the Minecraft game luncher");
  128.         Console.Write("Please write your username:");
  129.         string username = Console.ReadLine();
  130.         Console.Write("Please enter your password:");
  131.         string password = Console.ReadLine();
  132.         if ( username == SomeUSername.SliPeR45 |= SomeUSername.SDMasterYoda |= SomeUSername.nippbit && password == SomePassword.Password1 |= SomePassword.Password2 |= SomePassword.Password3)
  133.             Console.WriteLine("Logged!!");
  134.             Console.Clear();
  135.             Console.WriteLine("The server info [ stats ] : ");
  136.             Console.WriteLine("ServerName = {0} [ : Command  = [ SnChange ] : ]", ServerStats.ServerName);
  137.             Console.WriteLine("ServerSlots [ MaxSlots ] = {0} [ : Command = [ MsChange ] : ]", ServerStats.ServerSlots);
  138.             Console.WriteLine("AllowedMobs = {0} [ : Command = [ AmChange ]  : ]", ServerStats.AllowedMobs);
  139.             Console.WriteLine("AllowedMonsters = {0} [ : Command = [ AmoChange ] : ]", ServerStats.AllowedMonsters);
  140.             Console.WriteLine("PvP = {0} [ : Command = [ PvpChange ] : ]", ServerStats.PVP);
  141.             Console.WriteLine("AllowedFly = {0} [ : Command = [ AfChange ] : ]", ServerStats.AllowedFly);
  142.             Console.WriteLine("GameMode = {0} [ : Command = [ GmChange ] : ]", ServerStats.GameMode);
  143.             Console.Write(".");
  144.             Thread.Sleep(700);
  145.             Console.Write(".");
  146.             Thread.Sleep(600);
  147.             Console.Write(". \n");
  148.             Console.WriteLine("Please enter command:");
  149.             string Command = Console.ReadLine();
  150.             if(Command == "SnChange") {
  151.                 Console.WriteLine("Enter the new server name");
  152.                 string NewServerName = Console.ReadLine();
  153.                 ServerStats.ServerName = NewServerName;
  154.             } else if ( Command == "MsChange" ) {
  155.                 Console.WriteLine("Enter the new number of slots:);
  156.                 int NewMaxSlots = int.Prase(Console.ReadLine());
  157.                 ServerStats.ServerSlots = NewMaxSlots;
  158.             } else if ( Command == "AmChange" ) {
  159.                 Console.WriteLine("Enter true or false");
  160.                 string NewMonsterOption = Conaole.ReadLine();
  161.                     if( NewMonsterOption == "True" |= "False") {
  162.                         ServerStats.AllowedMonsters = NewMonsterOption;
  163.                     } else {
  164.                         StopAll();
  165.                     }
  166.             } else if ( Command == "AmoChange" ) {
  167.                 Console.WriteLine("Enter true or false");
  168.                 string NewMobOption = Console.ReadLine;
  169.                     if ( NewMobOption == "True" |= "False" ) {
  170.                         ServerStats.AllowedMob = NewMobOption;
  171.                     } else {
  172.                         StopAll();
  173.                     }
  174.             } else if ( Command == "PvpChange" ) {
  175.                 Console.WriteLine("Enter True or False");
  176.                 string NewPvpOption = Console.ReadLine();
  177.                     if ( NewPvpOption == "True" |= "False" ) {
  178.                         ServerStats.AllowedPVP = NewPvpOption;
  179.                     } else {
  180.                         StopAll();
  181.                     }
  182.             } else if ( Command == "AfChange" ) {
  183.                 Console.WriteLine("Enter True or False");
  184.                 string NewFlyOption = Console.ReadLine();
  185.                  if ( NewFlyOption == "True" |= "False" ) {
  186.                     ServerStats.AllowedFly = NewFlyOption;
  187.                  } else {
  188.                     StopAll();
  189.                  }
  190.             } else if ( Command == "GmChange" ) {
  191.                 Console.WriteLine("Enter True or False");
  192.                 string NewGameModeOption = Console.ReadLine();
  193.                     if ( NewGameModeOption == "True" |= "Flase" ) {
  194.                         ServerStats.GameMode = NewGameModeOption;
  195.                     } else {
  196.                         StopAll();
  197.                     }
  198.             }
  199.         } else {
  200.             Console.WriteLine("Cannot logged!");
  201.         }
  202.         return 0;
  203.     }
  204.     public static StopAll() return Console.ReadKey();
  205. }
Add Comment
Please, Sign In to add comment