Jump to content
  • 0

checkpoint pentru toti?


matrixismyname

Question

0 answers to this question

Recommended Posts

There have been no answers to this question yet

Guest
This topic is now closed to further replies.
  • Similar Content

    • By AlexCelTare
      Salut imi poate spune cineva cum fac atunci cand un player intra intr-un checkpoint, sa ii dea alt checkpoint si tot asa?
       
      Eu am facut asa:
      Dar habar nu am cum sa fac mai multe checkpointuri dupa ce intra intr-unul
       
      new bool:onCheck[MAX_PLAYERS];
      public OnPlayerCommandText(playerid, cmdtext[])
          if (strcmp("/startmission", cmdtext, true, 10) == 0)
          {
              if(IsPlayerInRangeOfPoint(playerid, 3.0, 2333.1101,-1072.5065,1049.0234))
              {
              SetPlayerCheckpoint(playerid, -2130.9629,-2061.5767,63.3069, 3.0);
              onCheck[playerid] = true;
              }
              return 1;
          }
       
      public OnPlayerEnterCheckpoint(playerid)
      {
          if(onCheck[playerid]) // if it's true
          {
              GivePlayerMoney(playerid, 10);
              GameTextForPlayer(playerid,"~g~Mission 1 : Discover Dealership Completed!\nAnd Got +10$",3000,4);
              DisablePlayerCheckpoint(playerid);
              onCheck[playerid] = false;
          }
    • By GamerulFOX
      Deci, cand intru in primul checkpoint nu imi apare urmatorul ! Imi apare primul dar cand intru in el dispare si nu apare urmatorul !

      https://imgur.com/a/4lUvC4Z
    • By xXDANYXx121
      Deci vreau si eu o comanda in care sa fie folosita doar de admin 7 si sa zica gen 
      /salute 
      Kround va salutat pe toti playeri
    • By thestafy
      salut,am scris momentan logarea si registerul si tot primesc erori! Este dupa tutorialul lui Edison de login/register si nu inteleg,sunt deja 2 zile de cand ma chinui sa gasesc imperfectiunea! acesta este codul: 
      #include <a_samp>
      #include <a_mysql>
      new SQL = -1, gQuery[256], gString[256];
      #define function%0(%1)         forward %0(%1); public %0(%1)
      #define SCM                    SendClientMessage
      #define COLOR_DARKRED          0Xd80003FF
      #define COLOR_NICEGREEN         0X8cc5edFF
      new
          incercariParola[MAX_PLAYERS];
      enum pInfo {
          pSQLID,
          pName[MAX_PLAYER_NAME],
          pPassword[32],
          pEmail[32],
          pGender
      }
      new PlayerInfo[MAX_PLAYERS][pInfo];
      enum {
          //REGISTER
          DIALOG_REGISTER,
          DIALOG_EMAIL,
          DIALOG_GENDER,
          //LOGIN
          DIALOG_LOGIN
      };
      main() { print("Se initiaza gamemodeul..."); }
      public OnGameModeInit()
      {
          SQL = mysql_connect("localhos", "root", "sv", "");
          // Don`t use these lines if it`s a filterscript
          SetGameModeText("gmv1.0");
          AddPlayerClass(0, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
          return 1;
      }

      public OnPlayerRequestClass(playerid, classid)
      {
          TogglePlayerSpectating(playerid, false);
          SetPlayerPos(playerid, 1958.3783, 1343.1572, 15.3746);
          SetPlayerCameraPos(playerid, 1958.3783, 1343.1572, 15.3746);
          SetPlayerCameraLookAt(playerid, 1958.3783, 1343.1572, 15.3746);
          return 1;
      }
      public OnPlayerConnect(playerid){
          incercariParola[playerid] = 0;
          gQuery[0] = EOS;
           mysql_format(SQL, gQuery, sizeof(gQuery), "SELECT * FROM `users` WHERE `Name` = `%s` LIMIT 1", GetName(playerid));
              mysql_tquery(SQL, gQuery, "checkAccount" , "i" , playerid);
           return 1;
      }
      public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[]) {
          switch(dialogid) {
          case DIALOG_REGISTER: {
                  if(!response)
                      return Kick(playerid);
                  if(strlen(inputtext) <4 || strlen(inputtext) > 32)
                  return ShowPlayerDialog(playerid, DIALOG_REGISTER, DIALOG_STYLE_PASSWORD, "Register", "Scrie o parola pentru a iti crea contul:", "Select", "Cancel");
                  gQuery[0] = EOS;
                  mysql_format(SQL, gQuery, sizeof(qQuery), "INSERT INTO `users` (`Name`, `Password`) VALUES (`%s` , `%s`)", GetName(playerid), inputtext);
                  mysql_tquery(SQL, gQuery, "insertAccount", "i" , playerid );
                  gString[0] = EOS;
                  format(gString, sizeof(gString), "Parola ta contine %d caractere." strlen(inputtext));
                  SCM(playerid, -1 , gString);
                  format(PlayerInfo[playerid][pPassword], 32 , inputtext);
                  ShowPlayerDialog(playerid, DIALOG_EMAIL, DIALOG_STYLE_INPUT, "EMAIL", "Te rugam sa-ti setezi adresa de email:", "Select", "Cancel");
              }
              case DIALOG_EMAIL: {
                  if(!response)
                      return Kick(playerid);
                  if(strlen(inputtext) <4 || strlen(inputtext) > 32)
                  return ShowPlayerDialog(playerid, DIALOG_EMAIL, DIALOG_STYLE_INPUT, "EMAIL", "Te rugam sa-ti setezi adresa de email:", "Select", "Cancel");
                  gQuery[0] = EOS;
                  mysql_format(SQL, gQuery, sizeof(qQuery), "UPDATE `Users` SET `Email = `%s` WHERE `ID` = `%d`" , inputtext, PlayerInfo[playerid][pSQLID]);
                  mysql_tquery(SQL, gQuery, "", "" );
                  gString[0] = EOS;
                  format(gString, sizeof(gString), "Email setat %s" strlen(inputtext));
                  SCM(playerid, -1 , gString);
                  format(PlayerInfo[playerid][pEmail], 32 , inputtext);
                  ShowPlayerDialog(playerid, DIALOG_GENDER, DIALOG_STYLE_MSGBOX, "GENDER", "Seteaza-ti sexul:", "Masculin", "Feminin");
              }
              case DIALOG_GENDER: {
                  switch(response) {
                      case 0: {
                          PlayerInfo[playerid][pGender] = 1;
                          SCM(playerid, -1, "Sexul ales este Feminin");
                      }
                      case 1: {
                          PlayerInfo[playerid][pGender] = 0;
                          SCM(playerid, -1, "Sexul ales este Masculin");
                  }
              }
              gQuery[0] = EOS;
                  mysql_format(SQL, gQuery, sizeof(qQuery), "UPDATE `Users` SET `Gender = `%d` WHERE `ID` = `%d`" , PlayerInfo[playerid][pGender], PlayerInfo[playerid][pSQLID]);
                  mysql_tquery(SQL, gQuery, "", "" );
                  SpawnPlayer(playerid);
              }
                  case DIALOG_LOGIN: {
                      if(!response)
                          return Kick(playerid);
                  mysql_format(SQL, gQuery, sizeof(gQuery), "SELECT * FROM `users` WHERE Name` = `%s` AND `Password`=`%s` LIMIT 1" GetName(playerid)inputtext);
                  mysql_tquery(SQL, gQuery, "onlogin" , "i" , playerid);
              }
          }
          return 1;
      }
      function onlogin (playerid) {
          switch(cache_num_rows()) {
              case 0: {
                  incercariParola[playerid] ++;
                  gString[0] = EOS;
                  format(gString, sizeof(gString),"Parola incorecta! (%d/3 incercari ramase)", incercariParola[playerid]);
                  SCM(palyerid, COLOR_DARKRED, gString);
                  if(incercariParola[playerid] == 3) Kick(playerid);
                  else ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_PASSWORD, "Login", "Te rugam sa introduci parola contului tau:", "Select", "Cancel");
              }
              case 1: {
                  new
                      result[64];
                  PlayerInfo[playerid][pSQLID] = cache_get_row_content_int("0", "ID");
                  PlayerInfo[playerid][pGender] = cache_get_row_content_int("0", "Gender");
                  cache_get_field_content(0, "Name" , result); format(PLayerInfo[playerid][pName], MAX_PLAYER_NAME, result);
                  cache_get_field_content(0, "Password" , result); format(PLayerInfo[playerid][pPassword], 32, result);
                  cache_get_field_content(0, "Email" , result); format(PLayerInfo[playerid][pEmail], 32, result);
                   printf("%s (user: %d) s-a conectat. [Gender: %d, Name: %s, Password: %s, Email: %s]" , GetName(playerid), PlayerInfo[playerid][pSQLID], PlayerInfo[playerid][pGender],PlayerInfo[playerid][pPassword], PlayerInfo[palyerid][pEmail]);
                  for (new i = 0; i<25; i++) SCM(playerid, -1, " ");
                   SCM(palyerid, COLOR_NICEGREEN, "Bine ai venit/revenit pe server"
                   
                   SpawnPlayer(playerid);
              }
          }
          return 1;
      }
      function insertAccount(playerid) {
          PlayerInfo[playerid][pSQLID] = cache_insert_id();
          printf("%s s-a inregistrat cu SQLID-ul #%d." , GetName(playerid),PlayerInfo[playerid][pSQLID]);
          return 1;
      }
      function checkAccount(playerid) {
          switch(cache_num_rows()) {
           case 0; ShowPlayerDialog(playerid, DIALOG_REGISTER, DIALOG_STYLE_PASSWORD, "Register", "Scrie o parola pentru a iti crea contul:", "Select", "Cancel");
           case 1;ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_PASSWORD, "Login", "Te rugam sa introduci parola contului tau:", "Select", "Cancel");
          }
          return 1;
      }
      stock GetName(playerid) {
          new playerName[MAX_PALYER_NAME];
          GetPlayerName(playerid, playerName, MAX_PLAYER_NAME);
          return playerName;
      }
       
    • By Colentinian
      Salut, am facut un sistem de drag racing cu acelasi CP pentru ambii jucatori, insa daca cel care a dat /drag (id) intra primul in CP, acesta nu se dezactiveaza, se dezactiveaza doar daca intra cel care a dat /accept drag.
      YCMD:drag(playerid, params[], help) {
          new userID, szMessage[180];
          if(!PlayerToPoint(10, playerid, 748.0566,-2379.0576,12.9100)) return SCM(playerid, COLOR_GREY, "Nu te aflii pe pista de drag.");
          if(GetPlayerState(playerid)!=PLAYER_STATE_DRIVER) return SCM(playerid, COLOR_ORANGE, "Nu esti la volanul unei masini!");
          if(sscanf(params, "u", userID)) return SCM(playerid, COLOR_GREY, "Syntax: {FFFFFF}/drag <playerid/name>");
          if(!IsPlayerConnected(userID) && userID == INVALID_PLAYER_ID) return SCM(playerid, COLOR_GREY, "Acel player nu este conectat.");
          if(!PlayerToPoint(10, userID, 748.0566,-2379.0576,12.9100)) return SCM(playerid, -1, "Acel player nu este pe pista de drag!");
          if(GetPlayerState(userID)!=PLAYER_STATE_DRIVER) return SCM(playerid, COLOR_ORANGE, "Acel player nu este la volanul unei masini!");
          if(userID == playerid) return SCM(playerid, COLOR_GREY, "Nu poti folosi aceasta comanda asupra ta!");
          if(!ProxDetectorS(10.0, playerid, userID)) return SCM(playerid, COLOR_GREY, "Nu esti langa acel jucator.");
          if(DragID[userID] == playerid) return SCM(playerid, COLOR_LGREEN, "Eroare: I-ai trimis deja o invitatie acestui player!");
          DragID[userID] = playerid;
          format(szMessage, 256, "%s(%d) te-a invitat sa faci o cursa cu el cu el! (/accept drag %d).", GetName(playerid), playerid, playerid);
          SCM(userID, 0xFAD4D4FF, szMessage);
          format(szMessage, 256, "L-ai invitat pe %s(%d) sa faca o cursa cu tine.", GetName(userID), userID);
          SCM(playerid, 0xFAD4D4FF, szMessage);
          return 1;
      }    
       
      if( strcmp ( x_job, "drag" , true ) == 0 )
          {
              new userID = id;
              if(DragID[playerid] == -1) return SCM(playerid,COLOR_WHITE,"Nimeni nu te-a invitat sa faci o cursa.");
              if(id == playerid) return SCM(playerid, COLOR_GREY, "Nu poti folosi aceasta comanda asupra ta!");
              if(!PlayerToPoint(10, playerid, 748.0566,-2379.0576,12.9100)) return SCM(playerid, COLOR_GREY, "Nu te aflii pe pista de drag.");
              if(GetPlayerState(playerid)!=PLAYER_STATE_DRIVER) return SCM(playerid, COLOR_ORANGE, "Nu esti la volanul unei masini!");
              if(GetPVarInt(userID, "InDrag") == 1) return SCM(playerid, -1, "Acel player este deja intr-o cursa.");
              if(IsPlayerConnected(id)) {
                  if(DragID[playerid] == id)
                  {
                      new vehuserid = GetPlayerVehicleID(userID);
                      new    vehplayerid = GetPlayerVehicleID(playerid);
                      if(!ProxDetectorS(10.0, playerid, id)) return SCM(playerid, COLOR_GREY, "Nu te aflii langa acel jucator!");
                      SetPVarInt(playerid, "InDrag", 1);
                      SetPVarInt(userID, "InDrag", 1);
                      SetVehiclePosEx(userID, vehuserid, 756.0446,-2377.2810,12.6371);
                      SetVehicleZAngleEx(vehuserid, 180);
                      SetPlayerFacingAngle(userID, 183.8938);
                      SetVehiclePosEx(playerid, vehplayerid, 740.3959,-2377.2373,12.6371);
                      SetVehicleZAngleEx(vehplayerid, 180);
                      SetPlayerFacingAngle(playerid, 183.8938);
                      PutPlayerInVehicle(playerid, GetPlayerVehicleID(playerid), 0);
                      PutPlayerInVehicle(userID, GetPlayerVehicleID(userID), 0);
                      TogglePlayerControllable(playerid, 0);
                      TogglePlayerControllable(userID, 0);
                      TextDrawShowForPlayer(playerid, CountTD);
                      Countnr = 5;
                      Count();
                      TextDrawShowForPlayer(userID, CountTD);
                      Countnr = 5;
                      Count();
                      SetTimerEx("drag", 5000, false, "i", playerid);
                      SetTimerEx("drag", 5000, false, "i", userID);
                      foreach(new i : Player)
                      {
                          SetPlayerRaceCheckpoint(i, 1, 748.2872,-2689.0310,12.8837, 0.0,0.0,0.0, 25); 
                          CP[playerid] = 618;
                          
                      }
          if(CP[playerid] == 618) {
              foreach(new i : Player)
              {
                  DisablePlayerRaceCheckpoint(i);
                  SetPVarInt(i, "InDrag", 0);    
              }
          }
  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.