Jump to content
  • 0

Question

Posted

Problema intalnita (descriere):Am pus acest key la OnPlayerKeyStateChange si cand intru in game nu merge.
Ero(area / rile) / warning-(ul / urile):-
Liniile de cod / sursa / script-ul(obligatoriu):

if(newkeys & KEY_CTRL_BACK)
    {
          if(IsPlayerInAnyVehicle(playerid))
        {
            if(PlayerInfo[playerid][pLeader] == 1||PlayerInfo[playerid][pMember] == 1||PlayerInfo[playerid][pLeader] == 2||PlayerInfo[playerid][pMember] == 2||PlayerInfo[playerid][pLeader] == 3||PlayerInfo[playerid][pMember] == 3)
            {
                if(PlayerInfo[playerid][pLeader] == 1||PlayerInfo[playerid][pMember] == 1||PlayerInfo[playerid][pLeader] == 2||PlayerInfo[playerid][pMember] == 2||PlayerInfo[playerid][pLeader] == 3||PlayerInfo[playerid][pMember] == 3)
                {
                    if(IsPlayerInRangeOfPoint(playerid, 10.0, 1544.3184,-1627.2258,13.3828))// LSPD Barrier
                      {
                          SetObjectRot(lspdbarrier, 0, 0, 90);
                          SetTimer("CloseLSPDBarrier", 4000, false);
                      }
                      //-
                      if(IsPlayerInRangeOfPoint(playerid, 10.0, 1588.5728,-1637.2875,13.4247))// LSPD Gate
                      {
                        MoveObject(lspdgate, 1598.30664, -1638.21655, 13.70000, 2.00);
                        SetTimer("CloseLSPDGate", 4000, false);
                      }
                      //-
                      if(IsPlayerInRangeOfPoint(playerid, 10.0, 2237.8091,2453.9219,10.7983))// LVPD Barrier
                      {
                        SetObjectRot(lvpdbarrier, 0, 0, 90);
                        SetTimer("CloseLVPDBarrier", 4000, false);
                      }
                      //-
                      if(IsPlayerInRangeOfPoint(playerid, 10.0, 2293.3022,2498.5542,3.4150))// LVPD Gate 1
                      {
                        MoveObject(lvpdgate, 2294.12476, 2508.53979, 4.72560, 2.00);
                        SetTimer("CloseLVPDGate", 4000, false);
                      }
                      //-
                      if(IsPlayerInRangeOfPoint(playerid, 10.0, 2335.5901,2443.3381,5.8920))// LVPD Gate 2
                      {
                        MoveObject(lvpdgate2, 2335.02637, 2443.80786, 12.57870, 2.00);
                        SetTimer("CloseLVPDGate2", 4000, false);
                      }
                      //-
                      if(IsPlayerInRangeOfPoint(playerid, 10.0, -1701.8588,684.2625,24.8906))// SFPD Barier 1
                      {
                        SetObjectRot(sfpdbarrier, 0, 0, 90);
                        SetTimer("CloseSFPDBarrier", 4000, false);
                      }
                      //-
                      if(IsPlayerInRangeOfPoint(playerid, 10.0, -1571.8022,661.7778,7.1875))// SFPD Barier 2
                      {
                        SetObjectRot(sfpdbarrier2, 0, 0, 90);
                        SetTimer("CloseSFPDBarrier2", 4000, false);
                      }
                      //-
                      if(IsPlayerInRangeOfPoint(playerid, 10.0, -1631.9698,687.7368,7.1875))// SFPD Gate
                      {
                        MoveObject(sfpdgate, -1645.80627, 688.68842, 8.55370, 2.00);
                        SetTimer("CloseSFPDGate", 4000, false);
                      }
                }
            }
        }
         else
         {
            //
        }
    }

Imagini / Video (optional):-
Ati incercat sa rezolvati singur?:
 Desigur

8 answers to this question

Recommended Posts

  • 0
  • Administrator
Posted

In primul rand ai de doua ori aceeasi verificare

if(PlayerInfo[playerid][pLeader] == 1||PlayerInfo[playerid][pMember] == 1||PlayerInfo[playerid][pLeader] == 2||PlayerInfo[playerid][pMember] == 2||PlayerInfo[playerid][pLeader] == 3||PlayerInfo[playerid][pMember] == 3)
{

Si esti sigur ca intra in acele verificari, fa-i un debug.

  • 0
Posted

Eu am creat 2 comenzi cu aceasi chestie, pe una merge este comanda prin tasta "c" si am copiat aceasi chestie si am puso pe tasta h doar numai ca am schimabat ceva.. pe tasta c mergea numai pe jos... pe tasta h vreau sa mearga in masina.. si am facuto sa mearga in masina dar nu merge.

  • 0
  • Administrator
Posted

Nu trebuia sa fie

if(newkeys == KEY_CTRL_BACK)
 ?

​Nu :|

Se foloseste & care este un SI pe biti, nu logic! Acolo trebuie sa faci verificari pe biti!

Poate iti merge o data asta, dar exista probleme.

  • 0
Posted

​Nu :|

Se foloseste & care este un SI pe biti, nu logic! Acolo trebuie sa faci verificari pe biti!

Poate iti merge o data asta, dar exista probleme.

​Eu asa folosesc la mine in gamemode si merge perfect ... la toate bind-urile am asa ...

  • 0
  • Administrator
Posted

​Eu asa folosesc la mine in gamemode si merge perfect ... la toate bind-urile am asa ...

​Hai sa nu aglomeram acest subiect, am deschis unul aici.

Guest
This topic is now closed to further replies.
×
×
  • 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.