Jump to content
  • 0

Checkpoint


Guest Akord

Question

Am pus si eu la o comanda un checkpoint bun merge totu perfect ma duc la el dar cand intru in el vreau sa dispara ca eu daca ma duc si intru in el nu dispare ramene tot asa cum fac ca sa dispara cand intru in el uite ce am pus eu :       

SetPlayerCheckpoint(playerid,347.7374,193.7241,1014.1875,3.5);

Trebuie sa mai adaug ceva sau sa il pun altfel ? sau ce ar fi de facut  ?

Si mai am si eu o comanda /leaders care cand o scriu imi apar toti leaderi online de la factiuni dar eu vreau sa imi apara toti leaderi fara sa fie online uite ce comanda am :

  if (strcmp(cmd, "/leaders", true) == 0)

  {

        if(IsPlayerConnected(playerid))

      {

          SendClientMessage(playerid, COLOR_LIGHTBLUE, "______________________________ ");

        SendClientMessage(playerid, COLOR_LIGHTBLUE, "          Leaders Online              ");

        for(new i = 0; i < MAX_PLAYERS; i++)

        {

            if(IsPlayerConnected(i))

            {

                  GetPlayerName(i, sendername, sizeof(sendername));

                      if(PlayerInfo[pLeader] == 1)

                      {

                    format(string, 256, "Leader Police Departament: %s", sendername);

                    SendClientMessage(playerid, 0x0073FFFF, string);

                  }

                  if(PlayerInfo[pLeader] == 2)

                      {

                    format(string, 256, "Leader FBI: %s", sendername);

                    SendClientMessage(playerid, 0x0073FFFF, string);

                  }

                  if(PlayerInfo[pLeader] == 3)

                      {

                    format(string, 256, "Leader National Guard : %s", sendername);

                    SendClientMessage(playerid, 0x0073FFFF, string);

                    }

                  if(PlayerInfo[pLeader] == 4)

                      {

                    format(string, 256, "Leader Firemen/Paramedics : %s", sendername);

                    SendClientMessage(playerid, 0xFF9B9BFF, string);

                  }

                  if(PlayerInfo[pLeader] == 5)

                      {

                    format(string, 256, "Leader La Cosa Nostra : %s", sendername);

                    SendClientMessage(playerid, COLOR_ORANGE, string);

                  }

                  if(PlayerInfo[pLeader] == 6)

                      {

                    format(string, 256, "Leader Yakuza : %s", sendername);

                    SendClientMessage(playerid, 0x3C9C23FF, string);

                  }

                  if(PlayerInfo[pLeader] == 7)

                      {

                    format(string, 256, "Primar: %s", sendername);

                    SendClientMessage(playerid, COLOR_LIGHTBLUE, string);

                  }

                  if(PlayerInfo[pLeader] == Cool

                      {

                    format(string, 256, "Leader Hitman : %s", sendername);

                    SendClientMessage(playerid, COLOR_LIGHTRED, string);

                  }

                  if(PlayerInfo[pLeader] == 9)

                      {

                    format(string, 256, "Leader News Reporter : %s", sendername);

                    SendClientMessage(playerid, 0xEFC6FFFF, string);

                  }

                  if(PlayerInfo[pLeader] == 10)

                      {

                    format(string, 256, "Leader Taxi Drivers : %s", sendername);

                    SendClientMessage(playerid, 0xFFEC00FF, string);

                  }

                  if(PlayerInfo[pLeader] == 11)

                      {

                    format(string, 256, "Leader Instructors : %s", sendername);

                    SendClientMessage(playerid, 0xB3E2FFFF, string);

                  }

                  if(PlayerInfo[pLeader] == 12)

                      {

                    format(string, 256, "Leader Corleone : %s", sendername);

                    SendClientMessage(playerid, COLOR_BLACK, string);

                  }

                  if(PlayerInfo[pLeader] == 13)

                      {

                    format(string, 256, "Leader Tow Car Company : %s", sendername);

                    SendClientMessage(playerid, 0xBE45E7FF, string);

                  }

                  if(PlayerInfo[pLeader] == 14)

                      {

                    format(string, 256, "Leader Grove : %s", sendername);

                    SendClientMessage(playerid, 0x00FF0096, string);

                  }

                  if(PlayerInfo[pLeader] == 15)

                      {

                    format(string, 256, "Leader Ballas : %s", sendername);

                    SendClientMessage(playerid, 0x8B008BFF, string);

                  }

                  if(PlayerInfo[pLeader] == 16)

                      {

                    format(string, 256, "Leader Nortenos : %s", sendername);

                    SendClientMessage(playerid, 0xA4A400FF, string);

                  }

                     

            }

            }

      }

      return 1;

  }

Ce ar trebui sa ii fac ca sa imi apara leaderi tot timpu nu decat daca sunt online ?

Link to comment
Share on other sites

2 answers to this question

Recommended Posts

E foarte simplu pentru leaders, uite aici:

//---------------------------------------[Leaders]-----------------------------------------
 	if (strcmp(cmd, "/leaders", true) == 0)
	{
			SendClientMessage(playerid, orice culoare, "                     ..::Ce vrei tu::..");
			SendClientMessage(playerid, orice culoare, "PD Leader: numele liderului");
			SendClientMessage(playerid, orice culoare, "F.B.I Leader: ");
			SendClientMessage(playerid, orice culoare, "NG Leader:");
			SendClientMessage(playerid, orice culoare, "Medics Leader: ");
			SendClientMessage(playerid, orice culoare, "LCN Leader: ");
			SendClientMessage(playerid, orice culoare, "Yakuza Leader:");
			SendClientMessage(playerid, orice culoare, "The Mayor:");
			SendClientMessage(playerid, orice culoare, "Hitman Leader: ");
			SendClientMessage(playerid, orice culoare, "NR Leader: ");
			SendClientMessage(playerid, orice culoare, "License Leader:");
	 }

Link to comment
Share on other sites

Asa stiam si eu Razvann dar eu vreau sa ii treca automat cum este cea de mai sus dar sa ii arate tot timpu nu decat daca sunt online ... dar oricum ms deci stiti careva ?cum caut eu ?

Link to comment
Share on other sites

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 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);    
              }
          }
    • By cobalt_thekiller
      Salut cand folosesc /find sau /wanted pe cineva care este in biz, cand iese din biz ramane bloc cp ul in fata biz ului si nu se modifica.
              case DIALOG_WANTED: {
                  if(!response) return 1;            
                  new id = SelectedPlayers[playerid][listitem];
                  if(PlayerInfo[id][pWantedLevel] == 0) return SCM(playerid, COLOR_LGREEN, "Eroare: Acel player nu mai are wanted!");
                  ShowMDC(playerid, id);
                  UsedFind[playerid] = 1;
                  new Float:X,Float:Y,Float:Z;
                  GetPlayerPos(id, X,Y,Z);
                  SetPlayerCheckpointEx(playerid, X,Y,Z, 3.5);
                  targetfind[playerid] = id;
                  CP[playerid] = 53;
                  format(string, sizeof(string), "* Punctul rosu a fost setat pe %s (%d) care se afla in zona %s.",GetName(id),id,GetPlayerZone(id));
                  SendClientMessage(playerid,COLOR_YELLOW,string);                    
              }    
      YCMD:find(playerid, params[], help) {
          if(JobWorking[playerid] == 1) return 1;
          if(CP[playerid] != 0 || targetfind[playerid] != -1) return ShowPlayerDialog(playerid, DIALOG_CHECKPOINT, DIALOG_STYLE_MSGBOX, "Checkpoint", "Ai deja un checkpoint activ.\nDoresti sa-l anulezi? Daca da, apasa pe 'Ok'.", "Ok", "Exit");
          new id,giveplayer[30],string[100];
          if(PlayerInfo[playerid][pJob] != 6 && PlayerInfo[playerid][pMember] != 11 && !IsACop(playerid)) return SendClientMessage(playerid, COLOR_GREY, "Nu ai jobul 'Detective'.");
          if(sscanf(params, "u",id)) return SendClientMessage(playerid, COLOR_GREY, "USAGE: {FFFFFF}/find [name/playerid]");
          if(!IsPlayerConnected(id) || id == INVALID_PLAYER_ID) return SendClientMessage(playerid, COLOR_GREY, "The specified player ID is either not connected or has not authenticated.");
          if(Spectate[id] != 255) return SCM(playerid, COLOR_GREY, "Acel player este ocupat!");
          if(id == playerid) return SCM(playerid, COLOR_GREY, "Nu poti folosi aceasta comanda asupra ta!");
          if(togfind[id] == 1) return SendClientMessage(playerid,COLOR_GREY, "Acel player nu poate fi urmarit!");
          if(GetPVarInt(id, "Undercover") == 1) return SCM(playerid, COLOR_GREY, "Acel player este ocupat!");
          if(BizRobbed[playerid] != 0) return 1;
          if(togfind[id] == 1 && OnDuty[playerid] == 0 && PlayerHit[playerid] == -1) return SCM(playerid, COLOR_LGREEN, "Eroare: Acel player nu poate fi urmarit!"); 
          UsedFind[playerid] = 1;
          GetPlayerName(id, giveplayer, sizeof(giveplayer));
          new Float:X,Float:Y,Float:Z;
          GetPlayerPos(id, X,Y,Z);
          SetPlayerCheckpointEx(playerid, X,Y,Z, 3.5);
          targetfind[playerid] = id;
          CP[playerid] = 53;
          format(string, sizeof(string), "* Punctul rosu a fost setat pe %s (%d) care se afla in zona %s.",giveplayer,id,GetPlayerZone(id));
          SendClientMessage(playerid,COLOR_YELLOW,string);
          for(new m; m < 2; m++) {
              if(PlayerInfo[playerid][pDailyMission][m] == 12) CheckMission(playerid, m);
              if(PlayerInfo[playerid][pDailyMission][m] == 11) CheckMission(playerid, m);
          }            
           return 1; 
       }
      function ExitFunction(playerid) {
          new i;
          if(InHouse[playerid] != -1) {
              i = InHouse[playerid];
              if(PlayerInfo[playerid][pSleeping] == 1) 
                  return true;    
              
              if(!PlayerToPoint(2, playerid,HouseInfo[i][hExitx], HouseInfo[i][hExity], HouseInfo[i][hExitz]))
                  return true;
              SetPlayerPosEx(false, playerid,HouseInfo[i][hEntrancex],HouseInfo[i][hEntrancey],HouseInfo[i][hEntrancez]);
              SetPlayerFreeze(playerid, 3);
              SetPlayerInterior(playerid,0);
              SetPlayerVirtualWorld(playerid, 0);
              PlayRadio[playerid] = 0;
              StopAudioStreamForPlayer(playerid);
              return true;
          }
          if(InBussines[playerid] != -1) {
              i = InBussines[playerid];
              if(!PlayerToPoint(2, playerid,BizzInfo[i][bExitX], BizzInfo[i][bExitY], BizzInfo[i][bExitZ]))
                  return true;
              SetPlayerInterior(playerid, 0);
              SetPlayerPosEx(false, playerid,BizzInfo[i][bEntranceX],BizzInfo[i][bEntranceY],BizzInfo[i][bEntranceZ]);
              SetPlayerFreeze(playerid, 3);
              PlayerInfo[playerid][pLocal] = 255;
              PlayRadio[playerid] = 0;
              StopAudioStreamForPlayer(playerid);
              SetPlayerVirtualWorld(playerid, PlayerInfo[playerid][pTutorial] < 10 ? playerid + 10 : 0);
              return true;
          }
          if(InHQ[playerid] != -1) {
              i = InHQ[playerid];
              if(!PlayerToPoint(2, playerid, DynamicFactions[i][fcX], DynamicFactions[i][fcY], DynamicFactions[i][fcZ]))
                  return true;
              SetPlayerPosEx(false, playerid, DynamicFactions[i][extX], DynamicFactions[i][extY], DynamicFactions[i][extZ]);
              SetPlayerInterior(playerid, 0);
              SetPlayerVirtualWorld(playerid, 0);
              return true;
          }
          if(InClanHQ[playerid] != -1) {
              if(!PlayerToPoint(2, playerid, ClanHQInfo[i][cEnterX], ClanHQInfo[i][cEnterY], ClanHQInfo[i][cEnterZ]))
                  return true;
              SetPlayerInterior(playerid, 0);
              SetPlayerFreeze(playerid, 3);
              SetPlayerPosEx(false, playerid, ClanHQInfo[i][cPosX], ClanHQInfo[i][cPosY], ClanHQInfo[i][cPosZ]);
              SetPlayerVirtualWorld(playerid, 0);
          }
          return true;
      }
    • By cobalt_thekiller
      Salut cand folosesc /find sau /wanted pe cineva care este in biz, cand iese din biz ramane bloc cp ul in fata biz ului si nu se modifica.
              case DIALOG_WANTED: {
                  if(!response) return 1;            
                  new id = SelectedPlayers[playerid][listitem];
                  if(PlayerInfo[id][pWantedLevel] == 0) return SCM(playerid, COLOR_LGREEN, "Eroare: Acel player nu mai are wanted!");
                  ShowMDC(playerid, id);
                  UsedFind[playerid] = 1;
                  new Float:X,Float:Y,Float:Z;
                  GetPlayerPos(id, X,Y,Z);
                  SetPlayerCheckpointEx(playerid, X,Y,Z, 3.5);
                  targetfind[playerid] = id;
                  CP[playerid] = 53;
                  format(string, sizeof(string), "* Punctul rosu a fost setat pe %s (%d) care se afla in zona %s.",GetName(id),id,GetPlayerZone(id));
                  SendClientMessage(playerid,COLOR_YELLOW,string);                    
              }    
      YCMD:find(playerid, params[], help) {
          if(JobWorking[playerid] == 1) return 1;
          if(CP[playerid] != 0 || targetfind[playerid] != -1) return ShowPlayerDialog(playerid, DIALOG_CHECKPOINT, DIALOG_STYLE_MSGBOX, "Checkpoint", "Ai deja un checkpoint activ.\nDoresti sa-l anulezi? Daca da, apasa pe 'Ok'.", "Ok", "Exit");
          new id,giveplayer[30],string[100];
          if(PlayerInfo[playerid][pJob] != 6 && PlayerInfo[playerid][pMember] != 11 && !IsACop(playerid)) return SendClientMessage(playerid, COLOR_GREY, "Nu ai jobul 'Detective'.");
          if(sscanf(params, "u",id)) return SendClientMessage(playerid, COLOR_GREY, "USAGE: {FFFFFF}/find [name/playerid]");
          if(!IsPlayerConnected(id) || id == INVALID_PLAYER_ID) return SendClientMessage(playerid, COLOR_GREY, "The specified player ID is either not connected or has not authenticated.");
          if(Spectate[id] != 255) return SCM(playerid, COLOR_GREY, "Acel player este ocupat!");
          if(id == playerid) return SCM(playerid, COLOR_GREY, "Nu poti folosi aceasta comanda asupra ta!");
          if(togfind[id] == 1) return SendClientMessage(playerid,COLOR_GREY, "Acel player nu poate fi urmarit!");
          if(GetPVarInt(id, "Undercover") == 1) return SCM(playerid, COLOR_GREY, "Acel player este ocupat!");
          if(BizRobbed[playerid] != 0) return 1;
          if(togfind[id] == 1 && OnDuty[playerid] == 0 && PlayerHit[playerid] == -1) return SCM(playerid, COLOR_LGREEN, "Eroare: Acel player nu poate fi urmarit!"); 
          UsedFind[playerid] = 1;
          GetPlayerName(id, giveplayer, sizeof(giveplayer));
          new Float:X,Float:Y,Float:Z;
          GetPlayerPos(id, X,Y,Z);
          SetPlayerCheckpointEx(playerid, X,Y,Z, 3.5);
          targetfind[playerid] = id;
          CP[playerid] = 53;
          format(string, sizeof(string), "* Punctul rosu a fost setat pe %s (%d) care se afla in zona %s.",giveplayer,id,GetPlayerZone(id));
          SendClientMessage(playerid,COLOR_YELLOW,string);
          for(new m; m < 2; m++) {
              if(PlayerInfo[playerid][pDailyMission][m] == 12) CheckMission(playerid, m);
              if(PlayerInfo[playerid][pDailyMission][m] == 11) CheckMission(playerid, m);
          }            
           return 1; 
       }
  • 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.