Jump to content

Recommended Posts

"Mai usor" nu e. Singurele 2 modalitati sunt de a scripta constant/de a citi cod(si intelege). Totu depinde de capacitatea ta de a invata si intelege

Edit: Si ce a zis stalker, intelegerea conceptelor de baza universale aplicate oricarui limbaj e important. Cel mai usor le intelegi din C/C++/C#/Java

 

Edited by Banditul
  • Thanks 1
Link to post
Share on other sites

Ca sa poti coda la un nivel decent, iar prin decent ma refer sa faci ceva sa mearga si sa aiba sens, iti recomand sa urmezi niste tutoriale cu fundamentele programarii, sa inveti ce e o conditie, un loop, o variabila, structuri de date, etc., mai precis cauta ce se invata in clasele a 9-a si a 10-a la liceu, dar poti sa te descurci si cu ce inveti in a 9-a (de preferat ce se invata la un liceu de informatica intensiv). Dupa asta, joaca-te putin cu limbajele C sau C++, acomodeaza-te cu sintaxa si cu diferite functii predefinite in ele, ca mai apoi sa ai o cale mai usoara catre Pawn care e un derivat din C. 
Cum zice si Banditul, cale usoara nu e, programarea nu o inveti de azi pe maine si o sa dureze o perioada de cateva saptamani, poate chiar luni bune sa intelegi anumite concepte, asta daca nu vrei sa faci ceva de pomana si doar sa arunci niste liniute de cod copiate sperand ca merg. 
Un sfat, nu lua ca exemplu copierea mot-a-mot a tututor sistemelor publicate pe diferite site-uri, incearca sa faci tu singur cateva micute la inceput, de la a face un timer, la a crea un sistem precum racing cu masini create, etc.
Daca stii engleza bine, iti recomand canalul "thenewboston", ai extrem de multe tutoriale fundamentale pentru programare si te vor ajuta sigurat, dar sa nu uiti ca nu se va intampla peste noapte sa stii sa "scriptezi".

Sa ai spor! 😁

Edited by Stalker1
  • Thanks 1
Link to post
Share on other sites
  • 4 weeks later...

Nu poti invata repede să scriptezi. Trebuie sa iti dedici timpul si rabdarea pentru a invata. Iti recomand sa urmezi tutoriale de a le lui Edison Tuts, si sa incerci sa inveti ceva din tutorialele acelea.

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Similar Content

    • By Flint
      *** NU DAU PRIMUL ***
      AVETI MAI JOS DETALII DESPRE CONTURILE DE VANZARE
      * DE PREFERAT PAYPAL
      DISCORD: Flint#0883
       
      1. CROWLAND
      {
      Cont Premium
      232.000.000$ (kk)
      80 Premium Points
      Nivel 10 (1800+ / 38 Respect Points)
      iPhone
      FH: Los Santos Taxi (rank 5) demis la cerere, motiv: Cerere de demisie
      LP: kick de la admbot pe motiv Fly Hack pe timpu cand crowland era pe dreapta cu anticheatu ( * nu se i a in considerare * )
      atat..
      }
      2. RUBY NEPHRITE
      {
      iPhone
      Nivel 10 (100%)
      90+ rubine
      1.000.000$ (kk)
      Skins: 46 (gold)
      Accesorii: militarel & casca lu lolecs
      }
      3. RUBY NEPHRITE
      {
      Nivel 13
      iPhone
      30+ rubine
      81.000.000$ (kk)
      Skins: 115 (gold) | 173 (gold) | 272 (gold) | 110 (silver) | 97 (bronze) 
      Accesorii: Palarie $ casca lu lolecs
      170+ Rob Points
      18.000+ materilae
      }
    • By Dennis12.
      Username: Dennis12
      Ce vinzi?: Sistem speedometer samp, unic
      Dovada (că sunteti in posesia produsului) OBLIGATORIU: https://imgur.com/a/yrjag0s
      Pret: 5 EUR (25RON)
      Detalii de contact: Discord: Dennis12#6604
      Alte precizari: Implementarea pe gamemode-ul dumneavoastra este inclusa in pret. 
      Singura metoda de plata acceptata este PayPal in momentul de fata.
      Tot ce se vede in poze se updateaza, inclusiv bulinele de la fuel, viteza, statusul usii, luminilor si engine-ului, cat si cutia de viteze. 
    • By Alex Hrapciuc
      pentru detalii mesaj la [email protected]
      Pret: 5




    • By AlexandruBHD
      Bun deci lucrez la un gm de la 0 si am intampiat erorile astea, si sunt la inceput cu scripting-ul...
      C:\Users\Acer\Desktop\GamemodeDeLa0\gamemodes\eureka.pwn(530) : error 037: invalid string (possibly non-terminated string)
      C:\Users\Acer\Desktop\GamemodeDeLa0\gamemodes\eureka.pwn(530) : error 017: undefined symbol "Admin"
      C:\Users\Acer\Desktop\GamemodeDeLa0\gamemodes\eureka.pwn(530) : error 017: undefined symbol "level"
      C:\Users\Acer\Desktop\GamemodeDeLa0\gamemodes\eureka.pwn(530) : fatal error 107: too many error messages on one line
      Compilation aborted.Pawn compiler 3.2.3664              Copyright (c) 1997-2006, ITB CompuPhase

      4 Errors.
       
      Gamemode
      // Tranium RPG - Summer Project
      // Started on: 01.06.2017 (by AlexandruBHD)
      // Edited by -
      /*
      ===================================================================
      ----------------------- Informations -----------------------
      ===================================================================
      // Group Types
      type 1: Police
      type 2: Hitman
      type 3: Gangs
      */
      #define MAILER_URL "l0k3d-demo.tk/mail.php"
      #include <a_samp>
      #include <a_mysql>
      #include <fixes>
      #include <foreach>
      #include <sscanf2>
      #include <streamer>
      #include <regex>
      #include <YSI\y_master>
      #include <YSI\y_commands>
      #include <YSI\y_timers>
      #include <YSI\y_iterate>
      #include <YSI\y_stringhash>
      #include <YSI\y_bit>
      #include <define>
      #include <fly>
      #include <sendmail>
      #include <mSelection>

      // Natives
      native WP_Hash(buffer[], len, const str[]);
      // MySQL Configuration
      new handle, rows, fields;
      new 
          BitArray:pLogged<MAX_PLAYERS>,
          BitArray:flyingStatus<MAX_PLAYERS>,
          
          loginTries[MAX_PLAYERS], 
          playerHashedPass[MAX_PLAYERS][129],
          enteredCode[MAX_PLAYERS]
      ;
      new
          para,
          para2,
          strPara[30],
          gMsg[128]
      ;
      new 
          Text:Logo[2], 
          PlayerText:SkinLogo[MAX_PLAYERS],
          Text:ClockTime, Text:ClockDate
      ;
      new 
          Iterator:Admins<MAX_PLAYERS>
      ;
      enum playerInfo {
          pSQLID, pName[MAX_PLAYER_NAME + 1], pPassword[130], pSerialCode[41],
          pSkin,
          pLevel,
          pAdmin,
          pAge, pSex, pEmail[100],
          pCash, pBank,
          pMember, pRank
          
      };
      new pInfo[MAX_PLAYERS][playerInfo];
      enum groupInfo {
          gID,
          gName[50],
          gMotd[128],
          Float:geX,
          Float:geY,
          Float:geZ,
          Float:giX,
          Float:giY,
          Float:giZ,
          gRankname1[20],
          gRankname2[20],
          gRankname3[20],
          gRankname4[20],
          gRankname5[20],
          gRankname6[20],
          gRankname7[20],
          gType,
          gInterior,
          gDoor,
          gLeadskin,
          gPickup,
          Text3D:gLabel
          
      };
      new gInfo[MAX_GROUPS][groupInfo];
      enum vehInfo {
          vID,
          vModel,
          vGroup,
          vColor1,
          vColor2,
          vCarPlate[11],
          Float:vX,
          Float:vY,
          Float:vZ,
          Float:vA
      };
      new vInfo[MAX_VEHICLES][vehInfo], vehID[MAX_VEHICLES];
      main() {
          print("\n----------------------------------");
          print(" Tranium RPG Gamemode by AlexandruBHD ");
          print("----------------------------------\n");
      }
      //timers
      task OneSecond[1000]() {
          new hour, minutes, seconds, day, month, year, mstr[20];
          gettime(hour, minutes, seconds), getdate(year, month, day);
          format(gMsg, 128,"%02d:%02d", hour, minutes), TextDrawSetString(ClockTime, gMsg);
          switch(month) { case 1: mstr="january"; case 2: mstr="february"; case 3: mstr="march"; case 4: mstr="april"; case 5: mstr="may"; case 6: mstr="june"; case 7: mstr="iuly"; case 8: mstr="august";  case 9: mstr="september";  case 10: mstr="octomber"; case 11: mstr="november"; case 12: mstr="december"; }
          format(gMsg, 128,"%02d %s %02d", day, mstr, year), TextDrawSetString(ClockDate, gMsg);
          
          foreach(new x: Player) {
              ResetPlayerMoney(x), GivePlayerMoney(x, pInfo[x][pCash]);
          }
      }
      task FiveMinutes[1000 * (60*5)]() {
          for(new v; v < MAX_VEHICLES; v++) { if(vInfo[v][vID] > 0 ) { saveVeh(v); } }
          for(new i; i < MAX_GROUPS; i++) { saveGroup(i); }
          
          foreach(new p : Player) {
              saveAccount(p);
          }
          sendAdmins(COLOR_RED, "AdmData: "WHITE"Toate datele server-ului au fost salvate.");
      }
      timer kickTimer[500](playerid) {
          Kick(playerid);
      }
      timer securityKick[1000 * 120](playerid) {
          if(enteredCode[playerid] == 0) { Kick(playerid); }
      }
      timer setVehicleZAngle[700](vehicleid) {
          SetVehicleZAngle(vehicleid, vInfo[vehID[vehicleid]][vA]);
      }
      public OnGameModeInit() {
          handle = mysql_connect("localhost", "root", "eureka", "");
          
          if(handle && mysql_errno(handle) == 0) { print("[MYSQL] Baza de date sa conectat cu succes!"); }
          else print("[MYSQL] Connection not found.");
          
          mysql_tquery(handle, "SELECT * FROM `groups`", "loadGroups", "");
          mysql_tquery(handle, "SELECT * FROM `cars`", "loadCars", "");
          
          EnableStuntBonusForAll(0);
          ShowPlayerMarkers(0);
          UsePlayerPedAnims();
          DisableInteriorEnterExits();
          
          SendRconCommand("language English");
          SetGameModeText("E:RPG v1");
          
          
          Logo[0] = TextDrawCreate(638.400085, 431.573303, "tranium");
          TextDrawLetterSize(Logo[0], 0.354799, 1.704532);
          TextDrawAlignment(Logo[0], 3);
          TextDrawColor(Logo[0], -1);
          TextDrawSetShadow(Logo[0], 0);
          TextDrawSetOutline(Logo[0], 1);
          TextDrawBackgroundColor(Logo[0], 51);
          TextDrawFont(Logo[0], 3);
          TextDrawSetProportional(Logo[0], 1);
          Logo[1] = TextDrawCreate(602.000915, 423.359893, "rpg");
          TextDrawLetterSize(Logo[1], 0.161597, 0.975287);
          TextDrawAlignment(Logo[1], 1);
          TextDrawColor(Logo[1], -1);
          TextDrawSetShadow(Logo[1], 0);
          TextDrawSetOutline(Logo[1], 1);
          TextDrawBackgroundColor(Logo[1], 51);
          TextDrawFont(Logo[1], 2);
          TextDrawSetProportional(Logo[1], 1);
          
          ClockTime = TextDrawCreate(577.599548, 21.653348, "23:45");
          TextDrawLetterSize(ClockTime, 0.449999, 1.600000);
          TextDrawAlignment(ClockTime, 2);
          TextDrawColor(ClockTime, -1);
          TextDrawSetShadow(ClockTime, 0);
          TextDrawSetOutline(ClockTime, 1);
          TextDrawBackgroundColor(ClockTime, 51);
          TextDrawFont(ClockTime, 3);
          TextDrawSetProportional(ClockTime, 1);
          ClockDate = TextDrawCreate(579.200256, 7.466676, "23 octombrie 2017");
          TextDrawLetterSize(ClockDate, 0.177200, 1.712000);
          TextDrawAlignment(ClockDate, 2);
          TextDrawColor(ClockDate, -1);
          TextDrawSetShadow(ClockDate, 0);
          TextDrawSetOutline(ClockDate, 1);
          TextDrawBackgroundColor(ClockDate, 51);
          TextDrawFont(ClockDate, 2);
          TextDrawSetProportional(ClockDate, 1);
          return 1;
      }
      public OnGameModeExit() {
          for(new v; v < MAX_VEHICLES; v++) { if(vInfo[v][vID] > 0 ) { saveVeh(v); } }
          
          for(new i; i < MAX_GROUPS; i++) { saveGroup(i); }
          
          foreach(new p : Player) {
              saveAccount(p);
          }
          
          mysql_close(handle);
          return 1;
      }
      public OnPlayerRequestClass(playerid, classid) {
          SetPlayerPos(playerid, -1410.8655,-298.9116,14.1484);
          SetPlayerCameraPos(playerid, 1958.3783, 1343.1572, 15.3746);
          SetPlayerCameraLookAt(playerid, 1958.3783, 1343.1572, 15.3746);
          return 1;
      }
      public OnPlayerConnect(playerid) {
          new query[128];
          mysql_format(handle, query, 128, "SELECT * FROM `players` WHERE `username` = '%e'", GetName(playerid));
          mysql_tquery(handle, query, "accountCheck", "i", playerid);
          
          // create td
          SkinLogo[playerid] = CreatePlayerTextDraw(playerid, 532.599975, 405.319976, "LD_SPAC:white");
          PlayerTextDrawLetterSize(playerid, SkinLogo[playerid], 0.000000, 0.000000);
          PlayerTextDrawTextSize(playerid, SkinLogo[playerid], 110.0, 110.0);
          PlayerTextDrawBoxColor(playerid, SkinLogo[playerid], 0xFFFFFF00);
          PlayerTextDrawBackgroundColor(playerid, SkinLogo[playerid], 0xFFFFFF00);
          PlayerTextDrawAlignment(playerid, SkinLogo[playerid], 1);
          PlayerTextDrawColor(playerid, SkinLogo[playerid], -1);
          PlayerTextDrawSetShadow(playerid, SkinLogo[playerid], 0);
          PlayerTextDrawSetOutline(playerid, SkinLogo[playerid], 0);
          PlayerTextDrawFont(playerid, SkinLogo[playerid], TEXT_DRAW_FONT_MODEL_PREVIEW);
          PlayerTextDrawSetPreviewRot(playerid, SkinLogo[playerid], 0.000000, 0.000000, -340.000000, 1.000000);
          PlayerTextDrawSetPreviewModel(playerid, SkinLogo[playerid], SPAWN_SKIN);
          
          //show td
          PlayerTextDrawShow(playerid, SkinLogo[playerid]);
          TextDrawShowForPlayer(playerid, Logo[0]), TextDrawShowForPlayer(playerid, Logo[1]);
          TextDrawShowForPlayer(playerid, ClockTime), TextDrawShowForPlayer(playerid, ClockDate);
          
          SetSpawnInfo(playerid, 0, 0, 725.6906,-1450.2246,17.6953, 359.4464, 0,0,0,0, 0, 0 );
          InitFly(playerid);
          return 1;
      }
      public OnPlayerDisconnect(playerid, reason) {
          // iterate
          if(pInfo[playerid][pAdmin] > 0) {
              Iter_Remove(Admins, playerid);
          }
          saveAccount(playerid);
          resetData(playerid);
          return 1;
      }
      // Login
      forward accountCheck(playerid);
      public accountCheck(playerid) {
          TogglePlayerSpectating(playerid, 1);
          cache_get_data(rows, fields, handle);
          if(rows) {
              ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_PASSWORD, "SERVER: Login", ""SYN"Bine ai revenit pe "CREM"Tranium RPG"SYN"!\n\nAcest cont este inregistrat deja.\nIntrodu parola pentru a te loga pe contul tau.", "Login", "Cancel");
              GameTextForPlayer(playerid, "~y~CONT INREGISTRAT", 5000, 4);
          }
          else {
              
              ShowPlayerDialog(playerid, DIALOG_REGISTER, DIALOG_STYLE_PASSWORD, "SERVER: Register", ""SYN"Bine ai venit pe "CREM"Tranium RPG"SYN"!\n\nAcest cont nu este inregistrat, introdu parola pentru a te inregistra pe server.", "Register", "Cancel");
              GameTextForPlayer(playerid, "~y~CONT NEINREGISTRAT", 5000, 4);
          }
          InterpolateCameraPos(playerid, 2062.878906, 988.830627, 11.947507, 2022.668579, 1397.960937, 27.489007, 20000);
          InterpolateCameraLookAt(playerid, 2063.091552, 993.787048, 12.570880, 2022.038208, 1402.912109, 27.785707, 10000);
          return 1;
      }
      forward accountLogin(playerid);
      public accountLogin(playerid) {
          cache_get_data(rows, fields, handle);
          if(rows) {
              
              pInfo[playerid][pSQLID] = cache_get_field_content_int(0, "ID");
              cache_get_field_content(0, "username",  pInfo[playerid][pName], handle, MAX_PLAYER_NAME + 1);
              cache_get_field_content(0, "SerialCode", pInfo[playerid][pSerialCode], handle, 41);
              cache_get_field_content(0, "password", pInfo[playerid][pPassword], handle, 129);
              cache_get_field_content(0, "Email", pInfo[playerid][pEmail], handle, 100);
              pInfo[playerid][pLevel] = cache_get_field_content_int(0, "Level");
              pInfo[playerid][pAdmin] = cache_get_field_content_int(0, "AdminLevel");
              pInfo[playerid][pCash] = cache_get_field_content_int(0, "Cash");
              pInfo[playerid][pAge] = cache_get_field_content_int(0, "Age");
              pInfo[playerid][pSex] = cache_get_field_content_int(0, "Sex");
              pInfo[playerid][pBank] = cache_get_field_content_int(0, "Bank");
              pInfo[playerid][pMember] = cache_get_field_content_int(0, "Member");
              pInfo[playerid][pRank] = cache_get_field_content_int(0, "Rank");
              pInfo[playerid][pSkin] = cache_get_field_content_int(0, "Skin");
              
              Clearchat(playerid, 20), SCM(playerid, COLOR_LIGHT, "SERVER: "WHITE"Bine ai revenit, distractie placuta!");
              
              if(pInfo[playerid][pMember]) { SCMEx(playerid, COLOR_TEAL, "Group motd: "GREY"%s", gInfo[pInfo[playerid][pMember]][gMotd]); }
              
              if(pInfo[playerid][pAdmin] > 0) { Iter_Add(Admins, playerid); }
              
              new serial[41], query[100];
              gpci(playerid, serial, 41);
              if(strcmp(pInfo[playerid][pSerialCode], serial, false)) {
                  new str[200], randCod[10];
                  format(randCod, 10, randomString(10));
                  mysql_format(handle, query, 256, "INSERT INTO `accounts_blocked` (`playerID`, `time`, `securityCode`) VALUES ('%d', '%d', '%e')", pInfo[playerid][pSQLID], GetTickCount(), randCod);
                  mysql_tquery(handle, query, "", "");
                  format(str, 384, "Hello %s!\nYou received this email because you logged in on your account from a different location.\nUse this code to continue the game: %s", GetName(playerid), randCod);
                  SendMail(pInfo[playerid][pEmail], "[email protected]", "Tranium RPG",  "Security code!", str);
                  
                  ShowPlayerDialog(playerid, DIALOG_BLOCK, DIALOG_STYLE_PASSWORD, "SERVER: Account blocked", 
                  ""SYN"This account is "DRED"blocked "SYN"because you are logged in from a different location.\n\nTo unblock your account you need to use a security cod, sended to your email.\nYou have "CREM"2 minutes "SYN"to use it.", "Proceed", "Cancel");
                  defer securityKick(playerid);
              }
              
              Bit_Set(pLogged, playerid, true);
              TogglePlayerSpectating(playerid, 0);
              SetPlayerScore(playerid, pInfo[playerid][pLevel]);
              SpawnPlayer(playerid);
          }
          else {
              if(2-loginTries[playerid] != 0) {
                  loginTries[playerid] ++;
                  SCMEx(playerid, COLOR_DRED, "You have %d attempts to login, otherwise you will be kicked from the server.", 3-loginTries[playerid]);
                  ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_PASSWORD, "SERVER: Login", ""SYN"Bine ai revenit pe "CREM"Tranium RPG"SYN"!\n\nAcest cont este deja inregistrat.\nTe rugam sa introduci parola "DRED"corecta"SYN" pentru a te loga pe contul tau.", "Login", "Cancel");
              } else ShowPlayerDialog(playerid, DIALOG_GENERAL, DIALOG_STYLE_MSGBOX, "SERVER: Parola Gresita", "Ai primit kick deoarece ai gresit parola de 3 ori.", "Okay", ""), defer kickTimer(playerid);
          }
          return 1;
      }
      // Load Data
      forward loadGroups();
      public loadGroups() {
          cache_get_data(rows, fields);
          if(rows) {
              new id, pickup;
              for(new i; i < rows; i++) {
                  id = cache_get_field_content_int(i, "id");
                  gInfo[id][gID] = id;
                  cache_get_field_content(i, "Name", gInfo[id][gName], handle, 50);
                  cache_get_field_content(i, "Motd", gInfo[id][gMotd], handle, 128);
                  cache_get_field_content(i, "rankName1", gInfo[id][gRankname1], handle, 20);
                  cache_get_field_content(i, "rankName2", gInfo[id][gRankname2], handle, 20);
                  cache_get_field_content(i, "rankName3", gInfo[id][gRankname3], handle, 20);
                  cache_get_field_content(i, "rankName4", gInfo[id][gRankname4], handle, 20);
                  cache_get_field_content(i, "rankName5", gInfo[id][gRankname5], handle, 20);
                  cache_get_field_content(i, "rankName6", gInfo[id][gRankname6], handle, 20);
                  cache_get_field_content(i, "rankName7", gInfo[id][gRankname7], handle, 20);
                  
                  gInfo[id][geX] = cache_get_field_content_float(i, "eX");
                  gInfo[id][geY] = cache_get_field_content_float(i, "eY");
                  gInfo[id][geZ] = cache_get_field_content_float(i, "eZ");
                  gInfo[id][giX] = cache_get_field_content_float(i, "iX");
                  gInfo[id][giY] = cache_get_field_content_float(i, "iY");
                  gInfo[id][giZ] = cache_get_field_content_float(i, "iZ");
                  gInfo[id][gType] = cache_get_field_content_int(i, "Type");
                  gInfo[id][gInterior] = cache_get_field_content_int(i, "Interior");
                  gInfo[id][gDoor] = cache_get_field_content_int(i, "Door");
                  gInfo[id][gLeadskin] = cache_get_field_content_int(i, "leadSkin");
                  format(gMsg, 128, "{FF6347}%s`s HQ\n{D2B48C}(%s)", gInfo[id][gName], (gInfo[id][gDoor]) ? ("closed") : ("opened"));
                  if(gInfo[id][gType] == 1) { pickup = 1247; }
                  else if(gInfo[id][gType] == 2) { pickup = 1254; }
                  else { pickup = 1239; }
                  
                  gInfo[id][gPickup] = CreateDynamicPickup(pickup, 1, gInfo[id][geX], gInfo[id][geY], gInfo[id][geZ], -1, -1, -1, 20.0);
                  gInfo[id][gLabel] = CreateDynamic3DTextLabel(gMsg, COLOR_YELLOW, gInfo[id][geX], gInfo[id][geY], gInfo[id][geZ], 100, INVALID_PLAYER_ID, INVALID_VEHICLE_ID, 0, -1, -1, -1, 20.0);
              }
          }
          else print("No groups.");
          return 1;
      }
      forward loadCars();
      public loadCars() {
          cache_get_data(rows, fields, handle);
          if(rows) {
              for(new x = 0; x < rows; x++) {
                  new i = cache_get_field_content_int(x, "id");
                  vInfo[vID] = i;
                  vInfo[vModel] = cache_get_field_content_int(x, "Model");
                  vInfo[vGroup] = cache_get_field_content_int(x, "Group");
                  vInfo[vX] = cache_get_field_content_float(x, "pX");
                  vInfo[vY] = cache_get_field_content_float(x, "pY");
                  vInfo[vZ] = cache_get_field_content_float(x, "pZ");
                  vInfo[vA] = cache_get_field_content_float(x, "pA");
                  cache_get_field_content(x, "CarPlate", vInfo[vCarPlate], handle, 11);
                  vInfo[vColor1] = cache_get_field_content_int(x, "Color1");
                  vInfo[vColor2] = cache_get_field_content_int(x, "Color2");
                  
                  new car = CreateVehicle(vInfo[vModel], vInfo[vX], vInfo[vY], vInfo[vZ], vInfo[vA], vInfo[vColor1], vInfo[vColor2], -1);
                  vehID[car] = vInfo[vID];
                  SetVehicleNumberPlate(car, vInfo[vCarPlate]);
              }
          }
          else print("No cars.");
          return 1;
      }

      forward saveGroup(id);
      public saveGroup(id) {
          new query[500];
          mysql_format(handle, query, 500, 
          "UPDATE `groups` SET `Name` = '%s', `Motd` = '%s', `eX` = '%f', `eY` = '%f', `eZ` = '%f', `iX` = '%f', `iY` = '%f', `iZ` = '%f', `rankName1` = '%s', `rankName2` = '%s', `rankName3` = '%s', `rankName4` = '%s', `rankName5` = '%s', `rankName6` = '%s', `rankName7` = '%s', `Type` = '%d', `Interior` = '%d', `Door` = '%d', `leadSkin` = '%d' WHERE `id` = '%d'",
          gInfo[id][gName], gInfo[id][gMotd], gInfo[id][geX], gInfo[id][geY],gInfo[id][geZ], gInfo[id][giX], gInfo[id][giY], gInfo[id][giZ], gInfo[id][gRankname1], gInfo[id][gRankname2], gInfo[id][gRankname3], gInfo[id][gRankname4], gInfo[id][gRankname5], gInfo[id][gRankname6], gInfo[id][gRankname7], gInfo[id][gType], gInfo[id][gInterior], gInfo[id][gDoor], gInfo[id][gLeadskin], id);
          mysql_tquery(handle, query, "", "");
          return 1;
      }
      forward saveVeh(car);
      public saveVeh(car) {
          new query[500];
          mysql_format(handle, query, 500, "UPDATE `cars` SET `Model` = '%d', `Group` = '%d', `CarPlate` = '%e', `pX` = '%f', `pY` = '%f', `pZ` = '%f', `pA` = '%f', `Color1` = '%d', `Color2` = '%d' WHERE `id` = '%d'",
          vInfo[car][vModel], vInfo[car][vGroup], vInfo[car][vCarPlate], vInfo[car][vX], vInfo[car][vY], vInfo[car][vZ], vInfo[car][vA], vInfo[car][vColor1], vInfo[car][vColor2], car);
          mysql_tquery(handle, query, "", "");
          return 1;
      }
      forward saveAccount(playerid);
      public saveAccount(playerid) {
          new query[500];
          // mysql_format(handle, query, 500, "UPDATE `players` SET     `username` = '%e', `Level` = '%d', `Email` = '%e', `AdminLevel` = '%d', `Member` = '%d', `Rank` = '%d', `Skin` = '%d' WHERE `ID` = '%d'",  
          // pInfo[playerid][pName], pInfo[playerid][pLevel], pInfo[playerid][pEmail], pInfo[playerid][pAdmin], pInfo[playerid][pMember], pInfo[playerid]
          mysql_format(handle, query, 500, "UPDATE `players` SET     `username` = '%e', `Level` = '%d', `Email` = '%e', `AdminLevel` = '%d', `Member` = '%d', `Rank` = '%d', `Skin` = '%d', `Cash` = '%d', `Bank` = '%d' WHERE `ID` = '%d'",  
          pInfo[playerid][pName], pInfo[playerid][pLevel], pInfo[playerid][pEmail], pInfo[playerid][pAdmin], pInfo[playerid][pMember], pInfo[playerid][pRank], pInfo[playerid][pSkin], pInfo[playerid][pCash], pInfo[playerid][pBank], pInfo[playerid][pSQLID]);
          mysql_tquery(handle, query, "", "");
          return 1;
      }
      forward securityCodeCheck(playerid);
      public securityCodeCheck(playerid) {
          cache_get_data(rows, fields, handle);
          if(rows) { SCM(playerid, COLOR_LIGHTRED, "You have entered the correct code, now you can play!"), enteredCode[playerid] = 1; }
          else ShowPlayerDialog(playerid, DIALOG_BLOCK, DIALOG_STYLE_PASSWORD, "SERVER: Account blocked", 
                  ""SYN"You used a "DRED"incorrect code"SYN", try again.\n\nTo unblock your account you need to use a security cod, sended to your email.\nYou have "CREM"2 minutes "SYN"to use it.", "Proceed", "Cancel");
          return 1;
      }
      public OnPlayerSpawn(playerid) {
          if(Bit_Get(pLogged, playerid) == true) {
              SetPlayerHealth(playerid, 99.00);
              SetPlayerArmour(playerid, 00.00);
              SetPlayerSkin(playerid, pInfo[playerid][pSkin]);
              if(pInfo[playerid][pMember] == 0) {
                  SetPlayerPos(playerid, 725.6906,-1450.2246,17.6953), SetPlayerFacingAngle(playerid, 359.4464);
                  SetPlayerInterior(playerid, 0), SetPlayerVirtualWorld(playerid, 0), SetCameraBehindPlayer(playerid);
              }
              else {
                  new i = pInfo[playerid][pMember];
                  SetPlayerPos(playerid, gInfo[giX], gInfo[giY], gInfo[giZ]);
                  SetPlayerInterior(playerid, gInfo[gInterior]);
                  SetPlayerVirtualWorld(playerid, i+1);
                  SetCameraBehindPlayer(playerid);
              }
          }
          return 1;
      }
      public OnPlayerDeath(playerid, killerid, reason) {
          return 1;
      }
      public OnVehicleSpawn(vehicleid) {
          if(vInfo[vehID[vehicleid]][vID] > 0) {
              ChangeVehicleColor(vehicleid, vInfo[vehID[vehicleid]][vColor1],vInfo[vehID[vehicleid]][vColor2]);
              SetVehiclePos(vehicleid, vInfo[vehID[vehicleid]][vX], vInfo[vehID[vehicleid]][vY], vInfo[vehID[vehicleid]][vZ]);
              defer setVehicleZAngle(vehicleid);
          }
          return 1;
      }
      public OnVehicleDeath(vehicleid, killerid) {
          return 1;
      }
      public OnPlayerText(playerid, text[]) {
          format(gMsg, 128, "%s: %s", GetName(playerid), text);
          SendClientMessageToAll(-1, gMsg);
          SetPlayerChatBubble(playerid, text, COLOR_GREY, 10.0, 10000);
          return 0;
      }
      public OnPlayerCommandPerformed(playerid, cmdtext[], success) {
          if (success) return 1;
          if(!success) return SCMEx(playerid, COLOR_LIGHT, "SERVER: This command ("TEAL"%s"SYN") does not exist.", cmdtext); 
          return 0;
      }

      YCMD:ah(playerid, params[], help) {
          if(pInfo[playerid][pAdmin] < 1) return adminOnly(playerid, 1);
          SCM(playerid, COLOR_TEAL, "----------------------------- Admins Commands-----------------------------");
          SCM(playerid, -1, "Admin level 1: /a /vr /vehinfo /gotoveh /gotohq /gotopoint /fly /stopfly /gotods /tbox");
          SCM(playerid, -1, "Admin level 2: /moveveh");
          SCM(playerid, -1, "Admin level 3: /setleader /groupveh /modelveh /colorveh");
          SCM(playerid, -1, "Admin level 4: /sethqint /sethqext");
          SCM(playerid, -1, "Admin level 5: /none);
          SCM(playerid, -1, "Admin level 6: /addvehicle /setadmin ");
          SCM(playerid, COLOR_TEAL, "---------------------------------------------------------------------------");
          return 1;
      }
      YCMD:pset(playerid, params[], help) {
          if(sscanf(params, "us[30]i", para, strPara, para2)) return SCM(playerid, COLOR_LIGHT, "Syntax: "WHITE"/pset [playerid] [item] [value]"), SCM(playerid, -1, "Items: rank, group, money, bank (moeny)");
          switch(YHash(strPara)) {
              case _H<rank>: {
                  if(para2 < 0 || para2 > 7) return SCM(playerid, COLOR_LIGHT, "Syntax: "WHITE"/pset [playerid] [rank] [0-7]");
                  format(gMsg, 128, "/pset: Admin %s changed %s`s rank to %d.", GetName(playerid), GetName(para), para2), sendAdmins(COLOR_YELLOW, gMsg);
                  SCMEx(playerid, COLOR_LORANGE, "Admin %s changed your rank to %d.", GetName(para), para2);
                  pInfo[para][pRank] = para2;
              }
              case _H<group>: {
                  if(gInfo[para2][gID] == 0 && para2 != 0) return SCM(playerid, COLOR_LIGHT, "Error: Invalid group id.");
                  format(gMsg, 128, "/pset: Admin %s changed %s`s group to %s (id: %d).", GetName(playerid), GetName(para), gInfo[para2][gName], para2), sendAdmins(COLOR_YELLOW, gMsg);
                  SCMEx(playerid, COLOR_LORANGE, "Admin %s changed your group to %s.", GetName(para), gInfo[para2][gName]);
                  pInfo[para][pMember] = para2, pInfo[para][pRank] = (para2 == 0) ? (0) : (1);
              }
              case _H<money>: {
                  format(gMsg, 128, "/pset: Admin %s changed %s`s money to $%s.", GetName(playerid), GetName(para), FormatNumber(para2)), sendAdmins(COLOR_YELLOW, gMsg);
                  SCMEx(playerid, COLOR_LORANGE, "Admin %s changed your money to $%s.", GetName(para), FormatNumber(para2));
                  pInfo[para][pCash] = para2;
              }
              case _H<bank>: {
                  format(gMsg, 128, "/pset: Admin %s changed %s`s bank money to $%s.", GetName(playerid), GetName(para), FormatNumber(para2)), sendAdmins(COLOR_YELLOW, gMsg);
                  SCMEx(playerid, COLOR_LORANGE, "Admin %s changed your bank money to $%s.", GetName(para), FormatNumber(para2));
                  pInfo[para][pBank] = para2;
              }
              default: { SCM(playerid, COLOR_GREY, "Error: Wrong item."); }
          }
          return 1;
      }
      YCMD:vr(playerid, params[], help) {
          if(pInfo[playerid][pAdmin] < 1) return adminOnly(playerid, 1);
          if(IsPlayerInAnyVehicle(playerid)) {
              SetVehicleToRespawn(GetPlayerVehicleID(playerid));
              SCMEx(playerid, -1, ""NON"You succesfull respawned vehicle #%d.", GetPlayerVehicleID(playerid));
          }
          else {
              if(sscanf(params, "i", para)) return SCM(playerid, COLOR_LIGHT, "Syntax: "WHITE"/vr [vehicle id]");
              SetVehicleToRespawn(para);
              SCMEx(playerid, -1, ""NON"You succesfull respawned vehicle #%d.", para);
          }
          return 1;
      }
      YCMD:addvehicle(playerid, params[], help) {
          if(pInfo[playerid][pAdmin] < 6) return adminOnly(playerid, 6);
          new str[284], Cache:cache_i;
          if(GetPVarInt(playerid, "AddVehicle") > 0) {
              new Float:x, Float:y, Float:z, Float:a;
              GetVehiclePos(GetPVarInt(playerid, "AddVehicle"), x, y, z), GetVehicleZAngle(GetPVarInt(playerid, "AddVehicle"), a);
              mysql_format(handle, str, 284, "INSERT INTO `cars` (`Model`, `Group`, `CarPlate`, `pX`, `pY`, `pZ`, `pA`, `Color1`, `Color2`) VALUES ('%d', '0', 'Null', '%f', '%f', '%f', '%f', '-1', '-1')", GetVehicleModel(GetPVarInt(playerid, "AddVehicle")), x, y, z, a);
              cache_i = mysql_query(handle, str);
              
              new id = cache_insert_id();
              GetVehiclePos(GetPVarInt(playerid, "AddVehicle"), x, y, z), GetVehicleZAngle(GetPVarInt(playerid, "AddVehicle"), a);
              vInfo[id][vID] = id;
              vInfo[id][vModel] = GetVehicleModel(GetPVarInt(playerid, "AddVehicle"));
              vInfo[id][vX] = x, vInfo[id][vY] = y, vInfo[id][vZ] = z, vInfo[id][vA] = a;
              vInfo[id][vGroup] = 0;
              vInfo[id][vColor1] = vInfo[id][vColor2] = -1;
              format(vInfo[id][vCarPlate], 11, "Null");
              vehID[GetPVarInt(playerid, "AddVehicle")] = id;
              SetVehicleToRespawn(GetPVarInt(playerid, "AddVehicle")), DeletePVar(playerid, "AddVehicle");
              cache_delete(cache_i);
              format(str, 100, ""ORANGE"/addvehicle: Admin %s added a new vehicle on server.", GetName(playerid));
              sendAdmins(COLOR_WHITE, str);
          }
          else {
              if(IsPlayerInAnyVehicle(playerid)) return SCM(playerid, COLOR_GREY, "You can use this command because you are in a vehicle.");
              if(sscanf(params, "i", para)) return SCM(playerid, COLOR_LIGHT, "Syntax: "WHITE"/addvehicle [model]"); 
              if(para < 400 || para > 612) return SCM(playerid, COLOR_LIGHT, "Syntax: "WHITE"/addvehicle [400-612]"); 
              
              new Float:x, Float:y, Float:z, Float:a;
              GetPlayerPos(playerid, x, y, z), GetPlayerFacingAngle(playerid, a);
              new vehicle = CreateVehicle(para,x, y, z, a, -1, -1, -1);
              PutPlayerInVehicle(playerid, vehicle, 0);
              SetPVarInt(playerid, "AddVehicle", vehicle);
          }
          return 1;
      }
      YCMD:colorveh(playerid, params[], help) {
          if(pInfo[playerid][pAdmin] < 3) return adminOnly(playerid, 3);
          if(sscanf(params, "ii", para, para2)) return SCM(playerid, COLOR_LIGHT, "Syntax: "WHITE"/colorveh "); 
          new i = GetPlayerVehicleID(playerid);
          if(i) { 
              if((para < 0 || para > 256) || (para2 < 0 || para2 > 256)) return SCM(playerid, COLOR_LIGHT, "Syntax: "WHITE"/colorveh "); 
              vInfo[vehID][vColor1] = para, vInfo[vehID][vColor2] = para2;
              ChangeVehicleColor(i, para, para2);
              SCMEx(playerid, -1, ""NON"You succesfull changed vehicle colors to %d and %d (for vehicle #%d).", para, para2, i);
          }
          else SCM(playerid, -1, "You are not in a vehicle.");
          return 1;
      }
      YCMD:modelveh(playerid, params[], help) {
          if(pInfo[playerid][pAdmin] < 3) return adminOnly(playerid, 3);
          if(sscanf(params, "i", para)) return SCM(playerid, COLOR_LIGHT, "Syntax: "WHITE"/modelveh [model]"); 
          new i = GetPlayerVehicleID(playerid);
          if(i) { 
              if(para < 400 || para > 612) return SCM(playerid, COLOR_LIGHT, "Syntax: "WHITE"/modelveh [400-612]"); 
              vInfo[vehID][vModel] = para;
              DestroyVehicle(i);
              i = CreateVehicle(vInfo[vehID][vModel], vInfo[vehID][vX], vInfo[vehID][vY], vInfo[vehID][vZ], vInfo[vehID][vA], vInfo[vehID][vColor1], vInfo[vehID][vColor2], -1);
              PutPlayerInVehicle(playerid, i, 0);
              SCMEx(playerid, -1, ""NON"You succesfull changed vehicle model (for vehicle #%d).", i);
          }
          else SCM(playerid, -1, "You are not in a vehicle.");
          return 1;
      }
      YCMD:groupveh(playerid, params[], help) {
          if(pInfo[playerid][pAdmin] < 3) return adminOnly(playerid, 3);
          new veh = GetPlayerVehicleID(playerid);
          if(veh) { 
              if(sscanf(params, "i", para)) return SCM(playerid, COLOR_LIGHT, "Syntax: "WHITE"/groupveh [group id]"); 
              if(gInfo[para][gID] == 0) return SCM(playerid, COLOR_GREY, "Error: Invalid group id.");
              vInfo[vehID[veh]][vGroup] = para;
              SetVehicleToRespawn(veh);
              SCMEx(playerid, COLOR_NON, "Now, this %s (id: %d) its %s`s vehicle.", vehName[GetVehicleModel(veh) - 400], veh, gInfo[para][gName]);
          }
          else SCM(playerid, -1, "You are not in a vehicle.");
          return 1;
      }
      YCMD:moveveh(playerid, params[], help) {
          if(pInfo[playerid][pAdmin] < 2) return adminOnly(playerid, 2);
          new veh = GetPlayerVehicleID(playerid);
          if(veh) { 
              GetVehiclePos(veh, vInfo[vehID[veh]][vX], vInfo[vehID[veh]][vY], vInfo[vehID[veh]][vZ]);
              GetVehicleZAngle(veh, vInfo[vehID[veh]][vA]);
              SetVehicleToRespawn(veh);
              SCMEx(playerid, COLOR_NON, "You succesfull moved this %s (id: %d)!", vehName[GetVehicleModel(veh) - 400], veh);
          }
          else SCM(playerid, -1, "You are not in a vehicle.");
          return 1;
      }
      YCMD:vehinfo(playerid, params[], help) {
          if(pInfo[playerid][pAdmin] < 1) return adminOnly(playerid, 1);
          if(sscanf(params, "i", para)) return SCM(playerid, COLOR_LIGHT, "Syntax: "WHITE"/vehinfo [veh id]");
          SCMEx(playerid, COLOR_TEAL, ""TEAL"Model: "WHITE"%d | "TEAL"Carplate: "WHITE"%s | "TEAL"Group: "WHITE"%d | "TEAL"Colors: "WHITE"%d, %d",
          vInfo[vehID[para]][vModel], vInfo[vehID[para]][vCarPlate], vInfo[vehID[para]][vGroup], vInfo[vehID[para]][vColor1], vInfo[vehID[para]][vColor2]);
          return 1;
      }
      YCMD:fly(playerid, params[], help) {
          if(pInfo[playerid][pAdmin] < 1) return adminOnly(playerid, 1);
          StartFly(playerid), SetPlayerHealth(playerid, 999999.00);
          Bit_Set(flyingStatus, playerid, true);
          return 1;
      }
      YCMD:stopfly(playerid, params[], help) {
          if(pInfo[playerid][pAdmin] < 1) return adminOnly(playerid, 1);
          StopFly(playerid), SetPlayerHealth(playerid, 99.00);
          Bit_Set(flyingStatus, playerid, false);
          return 1;
      }
      YCMD:gotoveh(playerid, params[], help) {
          if(pInfo[playerid][pAdmin] < 1) return adminOnly(playerid, 1);
          if(sscanf(params, "i", para)) return SCM(playerid, COLOR_LIGHT, "Syntax: "WHITE"/gotoveh [vehicle id]");
          new Float:x, Float:y, Float:z;
          GetVehiclePos(para, Float:x, Float:y, Float:z), SetPlayerPos(playerid, x, y, z+5), SetPlayerVirtualWorld(playerid, GetVehicleVirtualWorld(para));
          return 1;
      }
      YCMD:gotopoint(playerid, params[], help) {
          if(pInfo[playerid][pAdmin] < 1) return adminOnly(playerid, 1);
          new Float:x, Float:y, Float:z;
          if(sscanf(params, "fffi", x, y, z, para)) return SCM(playerid, COLOR_LIGHT, "Syntax: "WHITE"/gotopoint [x] [y] [z] [interior]");
          SetPlayerPos(playerid, x, y, z), SetPlayerInterior(playerid, para), SetCameraBehindPlayer(playerid);
          return 1;
      }
      YCMD:gotohq(playerid, params[], help) {
          if(pInfo[playerid][pAdmin] < 1) return adminOnly(playerid, 1);
          if(sscanf(params, "i", para)) return SCM(playerid, COLOR_LIGHT, "Syntax: "WHITE"/gotohq [id]");
          SetPlayerPos(playerid, gInfo[para][geX], gInfo[para][geY], gInfo[para][geZ]);
          SetPlayerInterior(playerid, 0);
          SetCameraBehindPlayer(playerid);
          SCMEx(playerid, -1, "You have teleported to %s`s headquarter.", gInfo[para][gName]);
          return 1;
      }
      YCMD:setadmin(playerid, params[], help) {
          if(pInfo[playerid][pAdmin] < 6) return adminOnly(playerid, 6);
          if(sscanf(params, "ui", para, para2)) return SCM(playerid, COLOR_LIGHT, "(SERVER): "WHITE"/setadmin [playerid] [level]");
          if(para == INVALID_PLAYER_ID) return SCM(playerid, COLOR_GREY, "Error: Invalid player id.");
          if(pInfo[para][pAdmin] < para2) { SCMEx(para, -1, ""NON"Felicitari! Ai fost promovat/a la admin %d, de catre adminul %s.", para2, GetName(para)); }
          else if(pInfo[para][pAdmin] > para2 && para2 != 0) { SCMEx(para, -1, ""NON"Adminul %s ti-a dat rank-down la admin %d.", para2, GetName(para)); }
          else { SCMEx(para, -1, ""NON"You have been removed from Staff Team (administrators), by %s", GetName(para)); }
          
          // iterators
          if(pInfo[para][pAdmin] == 0 && para2 > 0) { Iter_Add(Admins, para); }
          else if(pInfo[para][pAdmin] > 0 && para2 == 0) { Iter_Remove(Admins, para); }
          
          pInfo[para][pAdmin] = para2;
          SCMEx(playerid, -1, "You have changed %s`s admin level to %d.", GetName(para), para2);
          return 1;
      }
      YCMD:sethqext(playerid, params[], help) {
          if(pInfo[playerid][pAdmin] < 4) return adminOnly(playerid, 4);
          if(sscanf(params, "i", para)) return SCM(playerid, COLOR_LIGHT, "(SERVER): "WHITE"/sethqext [group id]");
          if(gInfo[para][gID] == 0) return SCM(playerid, COLOR_GREY, "Error: Invalid group ID.");
                  
          GetPlayerPos(playerid, gInfo[para][geX], gInfo[para][geY], gInfo[para][geZ]);
          DestroyDynamicPickup(gInfo[para][gPickup]);
          DestroyDynamic3DTextLabel(gInfo[para][gLabel]);
          format(gMsg, 128, "{FF6347}%s`s HQ\n{D2B48C}(%s)", gInfo[para][gName], (gInfo[para][gDoor]) ? ("closed") : ("opened"));
          new pickup;
          if(gInfo[para][gType] == 1) { pickup = 1247; }
          else if(gInfo[para][gType] == 2) { pickup = 1254; }
          else { pickup = 1239; }
                  
          gInfo[para][gPickup] = CreateDynamicPickup(pickup, 1, gInfo[para][geX], gInfo[para][geY], gInfo[para][geZ], -1, -1, -1, 20.0);
          gInfo[para][gLabel] = CreateDynamic3DTextLabel(gMsg, COLOR_YELLOW, gInfo[para][geX], gInfo[para][geY], gInfo[para][geZ], 100, INVALID_PLAYER_ID, INVALID_VEHICLE_ID, 0, -1, -1, -1, 20.0);
                  
          SCMEx(playerid, COLOR_TEAL, "(!) "WHITE"The exterior of %s (#%d) was changed successfully.", gInfo[para][gName], para);
          saveGroup(para);
          return 1;
      }
      YCMD:sethqint(playerid, params[], help) {
          if(pInfo[playerid][pAdmin] < 4) return adminOnly(playerid, 4);
          if(sscanf(params, "i", para)) return SCM(playerid, COLOR_LIGHT, "Syntax: "WHITE"/sethqint [group id]");
          if(gInfo[para][gID] == 0) return SCM(playerid, COLOR_GREY, "Error: Invalid group ID.");
                  
          GetPlayerPos(playerid, gInfo[para][giX], gInfo[para][giY], gInfo[para][giZ]), gInfo[para][gInterior] = GetPlayerInterior(playerid);
          SCMEx(playerid, COLOR_TEAL, "(!) "WHITE"The interior of %s (#%d) was changed successfully.", gInfo[para][gName], para);
          saveGroup(para);
          return 1;
      }
      YCMD:auninvite(playerid, params[], help) {
          if(pInfo[playerid][pAdmin] < 2) return adminOnly(playerid, 2);
          if(sscanf(params, "us[30]", para, strPara)) return SCM(playerid, COLOR_LIGHT, "Syntax: "WHITE"/auninvite [playerid] [reason: max 30 characters]");
          if(para == INVALID_PLAYER_ID) return SCM(playerid, COLOR_GREY, "Error: Invalid player id.");
          if(pInfo[para][pMember] == 0) return SCM(playerid, COLOR_GREY, "You can not use this command on civilians.");
          
          format(gMsg, 128, "%s was uninvited by Admin %s from %s, reason: %s", GetName(para), GetName(playerid), gInfo[pInfo[para][pMember]][gName], strPara);
          sendGroup(COLOR_LIGHT, pInfo[para][pMember], gMsg);
          format(gMsg, 128, "Admin uninvite: %s was uninvited by Admin %s from %s, reason: %s", GetName(para), GetName(playerid), gInfo[pInfo[playerid][pMember]][gName], strPara);
          sendAdmins(COLOR_DRED, gMsg);
          format(gMsg, 128, "You got uninvited by Admin %s from %s, reason: %s", GetName(playerid), gInfo[pInfo[playerid][pMember]][gName], strPara);
          ShowPlayerDialog(para, DIALOG_GENERAL, DIALOG_STYLE_MSGBOX, "SERVER: Uninvite", gMsg, "Close", "");
          pInfo[para][pMember] = pInfo[para][pRank] = 0;
          pInfo[para][pSkin] = SPAWN_SKIN, SetPlayerSkin(para, SPAWN_SKIN);
          return 1;
      }
      YCMD:setleader(playerid, params[], help) {
          if(pInfo[playerid][pAdmin] < 3) return adminOnly(playerid, 3);
          new p;
          if(sscanf(params, "ui", p, para)) return SCM(playerid, COLOR_LIGHT, "Syntax: "WHITE"/setleader [playerid] [group id]");
          if(p == INVALID_PLAYER_ID) return SCM(playerid, COLOR_GREY, "Error: Invalid player id.");
          if(pInfo[p][pMember] > 0) return SCM(playerid, COLOR_GREY, "This player is already in a faction, you need to use /auninvite first.");
          if(gInfo[para][gID] == 0 && para != 0) return SCM(playerid, COLOR_GREY, "Error: Invalid group id.");
          pInfo[p][pMember] = para, pInfo[p][pRank] = 7;
          SCMEx(playerid, -1, "You have set %s`s leader to %s.", GetName(p), gInfo[para][gName]), SCMEx(p, -1, ""NON"You have been promoted to %s`s leader by %s. Good job!", gInfo[para][gName], GetName(playerid));
          SetPlayerSkin(p, gInfo[para][gLeadskin]), pInfo[p][pSkin] = gInfo[para][gLeadskin];
          return 1;
      }
      YCMD:a(playerid, params[], help) {
          if(pInfo[playerid][pAdmin] < 1) return adminOnly(playerid, 1);
          if(isnull(params)) return SCM(playerid, COLOR_LIGHT, "Syntax: "WHITE"/a [message]");
          format(gMsg, 128, "(/a) %s: %s", GetName(playerid), params);
          sendAdmins(COLOR_ACHAT, gMsg);
          return 1;
      }
      ///////////////////////////////////////
      YCMD:invite(playerid, params[], help) {
          if(pInfo[playerid][pRank] < 6 || pInfo[playerid][pMember] == 0) return SCM(playerid, COLOR_GREY, "You are not allowed to use this command.");
          if(sscanf(params, "u", para)) return SCM(playerid, COLOR_LIGHT, "Syntax: "WHITE"/invite [playerid]");
          if(para == INVALID_PLAYER_ID) return SCM(playerid, COLOR_GREY, "Error: Invalid player id.");
          if(para == playerid) return SCM(playerid, COLOR_GREY, "You can not invite yourself.");
          if(pInfo[para][pMember] > 0) return SCM(playerid, COLOR_GREY, "You can invite in your group only civilians.");
          if(GetPVarInt(para, "inviteGroup") == pInfo[playerid][pMember]) return SCM(playerid, COLOR_GREY, "This player is already invited to your group.");
          SetPVarInt(para, "inviteGroup", pInfo[playerid][pMember]), SetPVarString(para, "inviteName", pInfo[playerid][pName]);
          SCMEx(playerid, COLOR_NON, "%s was invited, please wait...", GetName(para));
          SCMEx(para, COLOR_NON, "You have been invited by %s to join in %s. Type /accept invite to accept.", GetName(playerid), gInfo[pInfo[playerid][pMember]][gName]);
          return 1;
      }
      YCMD:admins(playerid, params[], help) {
          SCM(playerid, COLOR_TEAL, "---------------------------------------------------------");
          foreach(new i : Admins)
          {
              SCMEx(playerid, -1, "(%d) %s - admin level %d", i, GetName(i), pInfo[pAdmin]);
          }
          SCMEx(playerid, -1, "There are %d %s online. If you have a problem, use report.", Iter_Count(Admins), (Iter_Count(Admins) == 1) ? ("admin") : ("admins"));
          SCM(playerid, COLOR_TEAL, "---------------------------------------------------------");
          return 1;
      }
      YCMD:accept(playerid, params[], help) {
          if(sscanf(params, "s[30]", strPara)) return SCM(playerid, COLOR_LIGHT, "Syntax: "WHITE"/accept [item]"), SCM(playerid, -1, "Items: invite");
          switch(YHash(strPara)) {
              case _H<invite>: {
                  if(GetPVarInt(playerid, "inviteGroup") == 0) return SCM(playerid, COLOR_GREY, "You haven`t been invited in any group.");
                  new name[MAX_PLAYER_NAME];
                  pInfo[playerid][pMember] = GetPVarInt(playerid, "inviteGroup");
                  pInfo[playerid][pRank] = 1, DeletePVar(playerid, "inviteGroup");
                  pInfo[playerid][pSkin] = gInfo[pInfo[playerid][pMember]][gLeadskin], SetPlayerSkin(playerid, gInfo[pInfo[playerid][pMember]][gLeadskin]);
                  format(gMsg, 128, "%s is now your teammate, invited by %s.", GetName(playerid), GetPVarString(playerid, "inviteName", name, MAX_PLAYER_NAME));
                  sendGroup(COLOR_LIGHT, pInfo[playerid][pMember], gMsg);
                  format(gMsg, 128, "Congratulations! Now you are %s`s member.", gInfo[pInfo[playerid][pMember]][gName]);
                  ShowPlayerDialog(playerid, DIALOG_GENERAL, DIALOG_STYLE_MSGBOX, "SERVER: Invitation", gMsg, "Close", "");
                  DeletePVar(playerid, "inviteName");
              }
              default: {
                  SCM(playerid, COLOR_GREY, "Error: Wrong item.");
              }
          }
          return 1;
      }
      YCMD:f(playerid, params[], help) {
          if(pInfo[playerid][pMember] && (gInfo[pInfo[playerid][pMember]][gType] == 3 || gInfo[pInfo[playerid][pMember]][gType] == 2)) {
              if(isnull(params)) return SCM(playerid, COLOR_LIGHT, "Syntax: "WHITE"/f(action) [message]");
              switch(pInfo[playerid][pRank]) { 
                  case 1: format(gMsg, 128, "* %s %s: %s", gInfo[pInfo[playerid][pMember]][gRankname1], GetName(playerid), params); case 2: format(gMsg, 128, "* %s %s: %s", gInfo[pInfo[playerid][pMember]][gRankname2], GetName(playerid), params); case 3: format(gMsg, 128, "* %s %s: %s", gInfo[pInfo[playerid][pMember]][gRankname3], GetName(playerid), params); 
                  case 4: format(gMsg, 128, "* %s %s: %s", gInfo[pInfo[playerid][pMember]][gRankname4], GetName(playerid), params); case 5: format(gMsg, 128, "* %s %s: %s", gInfo[pInfo[playerid][pMember]][gRankname5], GetName(playerid), params); case 6: format(gMsg, 128, "{1BA6C2}* %s %s: %s", gInfo[pInfo[playerid][pMember]][gRankname6], GetName(playerid), params); 
                  case 7: format(gMsg, 128, "{1BA6C2}* %s %s: %s", gInfo[pInfo[playerid][pMember]][gRankname7], GetName(playerid), params); 
              }
              sendGroup(COLOR_FCHAT, pInfo[playerid][pMember], gMsg);
          }
          return 1;
      }
      YCMD:r(playerid, params[], help) {
          if(pInfo[playerid][pMember] && gInfo[pInfo[playerid][pMember]][gType] == 1) {
              if(isnull(params)) return SCM(playerid, COLOR_LIGHT, "Syntax: "WHITE"/r(adio) [message]");
              switch(pInfo[playerid][pRank]) { 
                  case 1: format(gMsg, 128, "* %s %s: %s", gInfo[pInfo[playerid][pMember]][gRankname1], GetName(playerid), params); case 2: format(gMsg, 128, "* %s %s: %s", gInfo[pInfo[playerid][pMember]][gRankname2], GetName(playerid), params); case 3: format(gMsg, 128, "* %s %s: %s", gInfo[pInfo[playerid][pMember]][gRankname3], GetName(playerid), params); 
                  case 4: format(gMsg, 128, "* %s %s: %s", gInfo[pInfo[playerid][pMember]][gRankname4], GetName(playerid), params); case 5: format(gMsg, 128, "* %s %s: %s", gInfo[pInfo[playerid][pMember]][gRankname5], GetName(playerid), params); case 6: format(gMsg, 128, "* %s %s: %s", gInfo[pInfo[playerid][pMember]][gRankname6], GetName(playerid), params); 
                  case 7: format(gMsg, 128, "* %s %s: %s", gInfo[pInfo[playerid][pMember]][gRankname7], GetName(playerid), params); 
              }
              sendGroup(COLOR_RCHAT, pInfo[playerid][pMember], gMsg);
          }
          return 1;
      }
      YCMD:d(playerid, params[], help) {
          if(pInfo[playerid][pMember] && gInfo[pInfo[playerid][pMember]][gType] == 1) {
              if(isnull(params)) return SCM(playerid, COLOR_LIGHT, "Syntax: "WHITE"/d(epartments) [message]");
              switch(pInfo[playerid][pRank]) { 
                  case 1: format(gMsg, 128, "** %s %s: %s", gInfo[pInfo[playerid][pMember]][gRankname1], GetName(playerid), params); case 2: format(gMsg, 128, "** %s %s: %s", gInfo[pInfo[playerid][pMember]][gRankname2], GetName(playerid), params); case 3: format(gMsg, 128, "** %s %s: %s", gInfo[pInfo[playerid][pMember]][gRankname3], GetName(playerid), params); 
                  case 4: format(gMsg, 128, "** %s %s: %s", gInfo[pInfo[playerid][pMember]][gRankname4], GetName(playerid), params); case 5: format(gMsg, 128, "** %s %s: %s", gInfo[pInfo[playerid][pMember]][gRankname5], GetName(playerid), params); case 6: format(gMsg, 128, "** %s %s: %s", gInfo[pInfo[playerid][pMember]][gRankname6], GetName(playerid), params); 
                  case 7: format(gMsg, 128, "** %s %s: %s", gInfo[pInfo[playerid][pMember]][gRankname7], GetName(playerid), params); 
              }
              sendgType(COLOR_DCHAT, gInfo[pInfo[playerid][pMember]][gType], gMsg);
          }
          return 1;
      }
      YCMD:stats(playerid, params[], help) {
          showStats(playerid, playerid);
          return 1;
      }
      YCMD:tbox(playerid, params[], help) {
           if(pInfo[playerid][pAdmin] < 1) return adminOnly(playerid, 1);
           SetPlayerPos(playerid, 2127.3901,2337.2629,10.8203);
           SendClientMessage(playerid, -1, "Ai fost teleportat cu succes la giftbox.");
           return 1;
      }
      YCMD:gotods(playerid, params[], help) {
           if(pInfo[playerid][pAdmin] < 1) return adminOnly(playerid, 1);
           SetPlayerPos(playerid, 328.4269,-1513.5961,36.0391);
           SendClientMessage(playerid, -1,  "(/gotods) Ai fost teleportat cu succes la dealership.");
           return 1;
      }
      public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger) {
          if((vInfo[vehID[vehicleid]][vGroup] > 0 && pInfo[playerid][pMember] != vInfo[vehID[vehicleid]][vGroup])  && pInfo[playerid][pAdmin] == 0) {
              new Float:x, Float:y, Float:z;
              GetPlayerPos(playerid, x, y, z), SetPlayerPos(playerid, x, y, z+2);
              SCMEx(playerid, COLOR_GREY, "This %s can be used only be %s`s members!", vehName[GetVehicleModel(vehicleid) - 400], gInfo[vInfo[vehID[vehicleid]][vGroup]][gName]);
          }
          return 1;
      }
      public OnPlayerExitVehicle(playerid, vehicleid) {
          return 1;
      }
      public OnPlayerStateChange(playerid, newstate, oldstate) {
          new veh = GetPlayerVehicleID(playerid);
          if(newstate == PLAYER_STATE_DRIVER) {
              new vehicleName[30], rand = random(3);
              switch(rand) {
                  case 0: { format(vehicleName, 30, "~g~%s", vehName[GetVehicleModel(veh) - 400]); }
                  case 1: { format(vehicleName, 30, "~y~%s", vehName[GetVehicleModel(veh) - 400]); }
                  case 2: { format(vehicleName, 30, "~r~~h~%s", vehName[GetVehicleModel(veh) - 400]); }
              }
              GameTextForPlayer(playerid, vehicleName, 3000, 1);
              
              if((vInfo[vehID[veh]][vGroup] > 0 && pInfo[playerid][pMember] != vInfo[vehID[veh]][vGroup])  && pInfo[playerid][pAdmin] == 0) {
                  new Float:x, Float:y, Float:z;
                  GetPlayerPos(playerid, x, y, z), SetPlayerPos(playerid, x, y, z+2);
                  SCMEx(playerid, COLOR_GREY, "This %s can be used only be %s`s members!", vehName[GetVehicleModel(veh) - 400], gInfo[vInfo[vehID[veh]][vGroup]][gName]);
              }
          }
          if(newstate != PLAYER_STATE_DRIVER && GetPVarInt(playerid, "AddVehicle") > 0 && veh != GetPVarInt(playerid, "AddVehicle")) {
              DestroyVehicle(GetPVarInt(playerid, "AddVehicle"));
              SCMEx(playerid, COLOR_LIGHTRED, "Vehicle #%d was destroyed because you left it.", GetPVarInt(playerid, "AddVehicle")), DeletePVar(playerid, "AddVehicle");
          }
          return 1;
      }
      public OnPlayerEnterCheckpoint(playerid) {
          return 1;
      }
      public OnPlayerLeaveCheckpoint(playerid) {
          return 1;
      }
      public OnPlayerEnterRaceCheckpoint(playerid) {
          return 1;
      }
      public OnPlayerLeaveRaceCheckpoint(playerid) {
          return 1;
      }
      public OnRconCommand(cmd[]) {
          return 1;
      }
      public OnPlayerRequestSpawn(playerid) {
          return 1;
      }
      public OnObjectMoved(objectid) {
          return 1;
      }
      public OnPlayerObjectMoved(playerid, objectid) {
          return 1;
      }
      public OnPlayerPickUpPickup(playerid, pickupid) {
          return 1;
      }
      public OnVehicleMod(playerid, vehicleid, componentid) {
          return 1;
      }
      public OnVehiclePaintjob(playerid, vehicleid, paintjobid) {
          return 1;
      }
      public OnVehicleRespray(playerid, vehicleid, color1, color2) {
          return 1;
      }
      public OnPlayerSelectedMenuRow(playerid, row) {
          return 1;
      }
      public OnPlayerExitedMenu(playerid) {
          return 1;
      }
      public OnPlayerInteriorChange(playerid, newinteriorid, oldinteriorid) {
          return 1;
      }
      public OnPlayerKeyStateChange(playerid, newkeys, oldkeys) {
          if(newkeys & KEY_SECONDARY_ATTACK)
          {
              new Float: X, Float: Y, Float: Z;
              GetPlayerPos(playerid, X, Y, Z);
              if(IsPlayerConnected(playerid))
              {
                  for(new i = 0; i < MAX_GROUPS; i++) {
                      if(IsPlayerInRangeOfPoint(playerid, 2.0, gInfo[geX], gInfo[geY], gInfo[geZ]))
                      {
                          if(gInfo[gDoor] == 0 || (pInfo[playerid][pMember] == i && gInfo[gDoor] == 1)) {
                              SetPlayerPos(playerid, gInfo[giX], gInfo[giY], gInfo[giZ]);
                              SetPlayerInterior(playerid, gInfo[gInterior]);
                              SetPlayerVirtualWorld(playerid, i+1);
                              SetCameraBehindPlayer(playerid);
                          } 
                          else SCMEx(playerid, -1, "You are not %s`s member.", gInfo[gName]);
                      }
                      else if(IsPlayerInRangeOfPoint(playerid, 2.0, gInfo[giX], gInfo[giY], gInfo[giZ]))
                      {
                          SetPlayerPos(playerid, gInfo[geX], gInfo[geY], gInfo[geZ]);
                          SetPlayerInterior(playerid, 0);
                          SetPlayerVirtualWorld(playerid, 0);
                          SetCameraBehindPlayer(playerid);
                      }
                  }
              }
          }
          if((newkeys & KEY_WALK) && (newkeys & KEY_FIRE)) {
              if(Bit_Get(flyingStatus, playerid) == true) {
                  StopFly(playerid), SetPlayerHealth(playerid, 99.00);
                  Bit_Set(flyingStatus, playerid, false);
                  GameTextForPlayer(playerid, "~~Flying mode off", 4500, 3);
              }
          }
          return 1;
      }
      public OnRconLoginAttempt(ip[], password[], success) {
          return 1;
      }
      public OnPlayerUpdate(playerid) {
          return 1;
      }
      public OnPlayerStreamIn(playerid, forplayerid) {
          return 1;
      }
      public OnPlayerStreamOut(playerid, forplayerid) {
          return 1;
      }
      public OnVehicleStreamIn(vehicleid, forplayerid) {
          return 1;
      }
      public OnVehicleStreamOut(vehicleid, forplayerid) {
          return 1;
      }
      public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[]) {
          new query[354];
          switch(dialogid) {
              case DIALOG_REGISTER: {
                  if(response) {
                      new serialCode[41];
                      WP_Hash(playerHashedPass[playerid], 129, inputtext);
                      gpci(playerid, serialCode, 41);
                      mysql_format(handle, query, 354, "INSERT INTO `players` (`username`, `password`, `SerialCode`, `Skin`) VALUES ('%e', '%e', '%e', '%d')", GetName(playerid), playerHashedPass[playerid], serialCode, SPAWN_SKIN);
                      mysql_tquery(handle, query, "", "" );
                      Clearchat(playerid, 20);
                      SCM(playerid, COLOR_LIGHT, "REGISTER: "WHITE"Your account was been created! You need to finish all registration steps, otherwise it will be deleted.");
                      ShowPlayerDialog(playerid, DIALOG_SEX, DIALOG_STYLE_MSGBOX, "SERVER: Select your character", ""SYN"Please select your "CREM"character"SYN"!", "Male", "Female");
                  } 
                  else Kick(playerid);
              }
              case DIALOG_LOGIN: {
                  if(response) {
                      new hashed[129];
                      WP_Hash(hashed, 129, inputtext );
                      mysql_format(handle, query, 256, "SELECT * FROM `players` WHERE `username` = '%e' AND `password` = '%e'", GetName(playerid), hashed);
                      mysql_tquery(handle, query, "accountLogin", "i", playerid);
                  }
                  else Kick(playerid);
              }
              case DIALOG_SEX: {
                  if(response) {
                      pInfo[playerid][pSex] = 1;
                      SCM(playerid, COLOR_LIGHT, "GENDER: "WHITE"Thanks, now we know that you are a boy. How old are you?");
                  }
                  else {
                      pInfo[playerid][pSex] = 2;
                      SCM(playerid, COLOR_LIGHT, "GENDER: "WHITE"Thanks, now we know that you are a girl. How old are you?");
                  }
                  ShowPlayerDialog(playerid, DIALOG_AGE, DIALOG_STYLE_INPUT, "SERVER: Age", ""SYN"It`s important for us to know how "CREM"old"SYN" are you!", "Proceed", "Cancel");
              }
              case DIALOG_AGE: {
                  if(response) {
                      new age = strval(inputtext);
                      if(age > 0 && age < 50) {
                          new y, m, d;
                          getdate(y, m, d);
                          pInfo[playerid][pAge] = age;
                          SCMEx(playerid, COLOR_LIGHT, "AGE: "WHITE"Ok, you was born in %d. Now, sets the corectly email address.", y-age);
                          ShowPlayerDialog(playerid, DIALOG_EMAIL, DIALOG_STYLE_INPUT, "SERVER: Email", ""SYN"If you lose your account you can use your "CREM"email address "SYN"to recover your account.", "Set", "Cancel");
                      }
                      else ShowPlayerDialog(playerid, DIALOG_AGE, DIALOG_STYLE_INPUT, "SERVER: Age", ""SYN"It`s important for us to know how "CREM"old"SYN" are you!", "Male", "Female");
                  }
                  else Kick(playerid);
              }
              case DIALOG_EMAIL: {
                  if(response) {
                      if(IsMail(inputtext)) {
                          format(pInfo[playerid][pEmail], 100, inputtext);
                          mysql_format(handle, query, 284, "UPDATE `players` SET `Sex` = '%d', `Age` = '%d', `Email` = '%e' WHERE `username` = '%e'", pInfo[playerid][pSex], pInfo[playerid][pAge], pInfo[playerid][pEmail], GetName(playerid));
                          mysql_tquery(handle, query, "", "");
                          
                          mysql_format(handle, query, 256, "SELECT * FROM `players` WHERE `username` = '%e' AND `password` = '%e'", GetName(playerid), playerHashedPass[playerid]);
                          mysql_tquery(handle, query, "accountLogin", "i", playerid);
                          
                          new Cache:count, sCode[41], pIP[16];
                          gpci(playerid, sCode, 41), GetPlayerIp(playerid, pIP, 16);
                          
                          mysql_format(handle, query, 200, "SELECT * FROM `players` WHERE `serialCode` = '%e'", sCode);
                          count = mysql_query(handle, query), cache_get_data(rows, fields, handle);
                          format(gMsg, 128, "New account - %s (%d) // %d accounts, ip: %s.", GetName(playerid), playerid, rows, pIP), sendAdmins(COLOR_DRED, gMsg);
                          cache_delete(count);
                          
                      }
                      else ShowPlayerDialog(playerid, DIALOG_EMAIL, DIALOG_STYLE_INPUT, "SERVER: Email", ""DRED"Error: Invalid email format.\n\n"SYN"If you lose your account you can use your "CREM"email address "SYN"to recover your account.", "Set", "Cancel");
                  }
                  else Kick(playerid);
              }
              case DIALOG_BLOCK: {
                  if(response) {
                      mysql_format(handle, query, 284, "SELECT * FROM `accounts_blocked` WHERE `playerID` = '%d' AND `securityCode` = '%e' ORDER BY `id` DESC LIMIT 1", pInfo[playerid][pSQLID], inputtext);
                      mysql_tquery(handle, query, "securityCodeCheck", "i", playerid);
                  }
                  else Kick(playerid);
              }
          }
          return 1;
      }
      public OnPlayerClickPlayer(playerid, clickedplayerid, source) {
          return 1;
      }
      // stocks
      stock resetData(playerid) { 
          loginTries[playerid] = 0;
          SetPVarInt(playerid, "AddVehicle", 0);
          Bit_Set(pLogged, playerid, false);
          return 1;
      }
      stock showStats(playerid, tid) {
          new groupName[50];
          SCM(playerid, COLOR_TEAL, "-----------------------------------------------------------------");
          SCMEx(playerid, -1, "(%d) %s | Level: %d | Money: %s | Bank money: %s", tid, GetName(tid), pInfo[tid][pLevel], FormatNumber(pInfo[tid][pCash]), FormatNumber(pInfo[tid][pBank]));
          SCMEx(playerid, -1, "Age: %d | Gender: %s | Email address: %s ", pInfo[tid][pAge], (pInfo[tid][pSex] == 1) ? ("Male") : ("Female"), pInfo[tid][pEmail]);
          format(groupName, 50, "%s, rank %d",gInfo[pInfo[tid][pMember]][gName], pInfo[tid][pRank]);
          SCMEx(playerid, -1, "Group: %s", (pInfo[tid][pMember]) ? (groupName) : ("No-one"));
          SCM(playerid, COLOR_TEAL, "-----------------------------------------------------------------");
          return 1;
      }
      stock FormatNumber(iNum, const szChar[] = ",") { // source: sa-mp.com forum 
          new szStr[16];
          format(szStr, sizeof(szStr), "%d", iNum);
          for(new iLen = strlen(szStr) - 3; iLen > 0; iLen -= 3) { strins(szStr, szChar, iLen); }
          return szStr;
      }
      stock IsMail(const string[]) { // source: sa-mp.com forum
          static RegEx:mail;
          if(!mail) {        
              mail = regex_build("[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?");
          }
          return regex_match_exid(string, mail);
      }

      stock randomString(lenght) {
          new randomChar[][] = {
              "A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z",
              "a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z",
              "1", "2", "3", "4", "5", "6", "7", "8", "9", "0"
          };
          new string[20], rand;
          for(new i; i < lenght; i++) 
          {
              rand = random(sizeof(randomChar));
              strcat(string, randomChar[rand]);
          }
          return string;
      }
      stock sendAdmins(color, msg[]) {
          foreach(new i : Player) {
              if(pInfo[pAdmin] >= 1) { SCMEx(i, color, msg); }
          }
          return 1;
      }
      stock sendGroup(color, group, msg[]) {
          for(new i, j = GetPlayerPoolSize(); i <= j; i++) {
              if(pInfo[pMember] == group) {
                  SCMEx(i, color, msg);
              }
          }
          return 1;
      }
      stock sendgType(color, type, msg[]) {
          foreach(new i : Player) {
              if(pInfo[pMember] && gInfo[pInfo[pMember]][gType] == type) {
                  SCMEx(i, color, msg);
              }
          }
          return 1;
      }
      stock adminOnly(playerid, admin) {
          SCMEx(playerid, COLOR_GREY, ""GREY"You need to have admin level "ORANGE"%d+"GREY" to use this command.", admin);
          return 1;
      }
      stock SCMEx(playerid, color, fstring[], {Float, _}:...) { // source: sa-mp.com forum
          #if defined DEBUG
              printf("[debug] SCM(%d,%d,%s,...)",playerid,color,fstring);
          #endif
          new n = numargs() * 4;
          if (n == 3 * 4) {
              return SendClientMessage(playerid, color, fstring);
          }
          else {
              new message[255];
              new arg_start;
              new arg_end;
              new i = 0;
              #emit CONST.pri  fstring
              #emit ADD.C    0x4
              #emit STOR.S.pri arg_start
              #emit LOAD.S.pri n
              #emit ADD.C    0x8
              #emit STOR.S.pri arg_end
              for (i = arg_end; i >= arg_start; i -= 4)
              {
                  #emit LCTRL    5
                  #emit LOAD.S.alt i
                  #emit ADD
                  #emit LOAD.I
                  #emit PUSH.pri
              }
              #emit PUSH.S  fstring
              #emit PUSH.C  128
              #emit PUSH.ADR message
              #emit PUSH.S  n
              #emit SYSREQ.C format
              i = n / 4 + 1;
              while (--i >= 0) {
                  #emit STACK 0x4
              }
              return SendClientMessage(playerid, color, message);
          }
      }
      stock GetName(playerid) {
          new name[MAX_PLAYER_NAME];
          GetPlayerName(playerid, name, MAX_PLAYER_NAME);
          return name;
      }
      stock Clearchat(player, lines) {
          for(new l; l <= lines; l++) { SCM(player, -1, " "); }
          return 1;
      }
    • By NewTon
      Vand cont de SA:MP pe purple cu cont premium, iphone, 30 ore jucate, 2 masini si level 5, aproape lv 6. Pretul este de 5e pe PayPal, daca esti interesat PM aici sau ca sa rsp mai rapid pe discord NewTon.BDT#9853.
  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...

Important Information

This site uses cookies. By continuing browsing, you agree to the use of this information. For more details, see Terms of Use and Privacy Policy.