Jump to content
  • 0

Rob din 3 in 3 ore


AnD

Question

Salut. Am si eu o problema. Cum pot face cand dau ROB, sa mai pot da o data la 3 ore ? Acum in GM am o data pe ora adica dupa ce vine paydayul pot da din nou, dupa mai trebuie sa astept pana vine alt payday sa mai pot da, dar vreau sa schimb dintr-o ora in 3 ore .

In public PayDay() dupa textul cu salariu' am:

RobBankOn = 0;

RobBankOn1 = 0;

PlayerInfo[pRobbed] = 0;

Cum pot face din 3 in 3 ore ?

www.XtremeZone.ro - Click & Register

Link to comment
Share on other sites

6 answers to this question

Recommended Posts

/*if(strcmp(cmd, "/rob", true) == 0 || strcmp(cmd, "/robbank", true) == 0)

{

    if(IsPlayerConnected(playerid))

    {

            if(CP[playerid] == 0)

{

                if(Var[Robbing][playerid] == 0)

                {

                if(PlayerToPoint(0.5,playerid,2314.8765,-16.2483,26.7422))

            {

                if(PlayerInfo[playerid][pLevel] < 3)

{

SendClientMessage(playerid, COLOR_ROSU, "[iNFO]: {FFFFFF}Tu nu ai level 3 ca sa poti jefui banca !");

return 1;

}

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

  {

  SCM(playerid,COLOR_ROSU,"[iNFO]: {FFFFFF}Departamentele nu pot jefui banca !");

  return 1;

  }

                    if(PlayerInfo[playerid][pRobbed] == 0)

                    {

                    if(RobBankOn == 0)

                {

                    CP[playerid] = 0;

                    new name[MAX_PLAYER_NAME];

            GetPlayerName(playerid, name, sizeof(name));

            SCM(playerid, -1, "{FF0000}[iNFO]: {FFFFFF}Asteapta pana cand iei toti banii din dulapul bancii. Autoritatile au fost alertate.");

format(string, sizeof(string), "Alerta: %s a jefuit banca! ", name);

    SendTeamMessage(2, COLOR_DBLUE, string);

    SetPlayerAttachedObject(playerid, 2, 1550, 1, -0.004022, -0.191353, -0.034982, 158.161407, 87.838058, 0.000000, 1.000000, 1.000000, 1.000000 );

                  SetPlayerWantedLevel(playerid, 6);

                  SetPlayerPos(playerid,2314.8765,-16.2483,26.7422);

                  SetPlayerFacingAngle(playerid, 174.5383);

                  SetTimerEx("ResetRob", 15000, 0, "%d", playerid);

                        Var[TimerRobTime][playerid] = 15;

Var[TimerRob][playerid] = 1;

Var[Robbing][playerid] = 1;

RobBankOn = 1;

                  PlayerInfo[playerid][pRobbed] = 1;

                  gPlayerUsingLoopingAnim[playerid] = 0 ;

                  ApplyAnimation(playerid, "BOMBER","BOM_Plant_Loop",4.0,1,0,0,1,0);

                                ApplyAnimation(playerid, "BOMBER","BOM_Plant_Loop",4.0,1,0,0,1,0);

}

else return SCM(playerid,COLOR_ROSU,"[iNFO]: {FFFFFF}Banca a fost sparta de cineva. Se poate jefui din 3 in 3 ore.");

}

                }

            else if(PlayerToPoint(0.5,playerid,2314.9104,-16.0082,26.7422))

            {

            if(PlayerInfo[playerid][pLevel] < 3)

{

SendClientMessage(playerid, COLOR_ROSU, "[iNFO]: {FFFFFF}Tu nu ai level 3 ca sa poti jefui banca !");

return 1;

}

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

  {

  SCM(playerid,COLOR_ROSU,"[iNFO]: {FFFFFF}Departamentele nu pot jefui banca !");

  return 1;

  }

                if(PlayerInfo[playerid][pRobbed] == 0)

                {

                    if(RobBankOn1 == 0)

                {

                    CP[playerid] = 0;

                    new name[MAX_PLAYER_NAME];

            GetPlayerName(playerid, name, sizeof(name));

            SCM(playerid, -1, "{00E0BB}[ROB INFO]: Acum asteapta pentru a umple sacul cu bani. Ai grija polita a fost alertata."); // bancac

format(string, sizeof(string), "Alerta: %s a jefuit banca! ", name);

    SendTeamMessage(2, COLOR_DBLUE, string);

    SetPlayerAttachedObject(playerid, 2, 1550, 1, -0.004022, -0.191353, -0.034982, 158.161407, 87.838058, 0.000000, 1.000000, 1.000000, 1.000000 );

                  SetPlayerWantedLevel(playerid, 6);

                  SetPlayerPos(playerid,1304.5359,-1049.3643,5481.1660);

                  gPlayerUsingLoopingAnim[playerid] = 0 ;

                  SetPlayerFacingAngle(playerid, 114);

                  SetTimerEx("ResetRob", 15000, 0, "%d", playerid);

                        Var[TimerRobTime][playerid] = 18;Var[TimerRob][playerid] = 1;Var[Robbing][playerid] = 1;RobBankOn1 = 1;

                  PlayerInfo[playerid][pRobbed] = 1;

                  SetPlayerCriminal(playerid,255, "Jefuirea banci.");

                  ApplyAnimation(playerid, "BOMBER","BOM_Plant_Loop",4.0,1,0,0,1,0);

}

else return SCM(playerid,COLOR_WHITE,"{00E0BB}[ROB INFO]:{FFFFFF}Acest seif a mai fost jefuit de cineva , trebuie sa astepti pana la payday ca se mai poata jefuii.");

}

            }

            else return SCM(playerid, COLOR_ROSU, "[iNFO]: {FFFFFF}Tu nu esti la banca sau nu stai unde trebuie pentru a utiliza aceasta comanda !");

        }

          else return SCM(playerid, COLOR_ROSU, "[iNFO]: {FFFFFF}Trebuie sa termini banca de jefuit complet." );

            }

else return SCM(playerid,COLOR_ROSU , "[iNFO]: {FFFFFF}Ai un checkpoint pe Mini-Map. Pentru a-l sterge, scrie ( /deletecheck )." );

        }

        return 1;

    }*/

www.XtremeZone.ro - Click & Register

Link to comment
Share on other sites

 new new Rob_time [ MAX_PLAYERS ];

La robbank pui asa

[code]Rob_time [ playerid ] = 3600000;
SetTimerEx("ROBBANK_timer", 1000, true, "i", playerid);
dupa faci un callback
forward ROBBANK_timer ( playerid );
public ROBBANK_timer ( playerid )
{
  Rob_time [ playerid ] -= 1000;
  return 1;
}
Mai trebuie sa adaugi in comanda verificarea daca nu a dat rob.
if ( Rob_time [ playerid ] == 0 )

Si Rob_time sa se updateze si sa se salveze !

Link to comment
Share on other sites

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.