Jump to content
  • 0

Problema /Rob si /Prob


JoRdan23

Question

Salutare:D am si eu o problema..vr sa fac comanda rob .. dar uitati problemele..:

1. cand ajung la primul checkpoint in fata bancii nu da wanted 6

2. la sfarsit nu imi da banii..

[pawn]    if(strcmp(cmd, "/rob", true) == 0 || strcmp(cmd, "/bankrob", true) == 0) //100% by Raz0r_Shakur, idea from LinkMania.

{

    if(IsPlayerConnected(playerid))

    {

            if(IsPlayerInVehicle(playerid, 1))

            {

                if(Robbing[playerid] == 0)

                {

                    if(PlayerHasRobbedBank[playerid] == 0)

                    {

                    new name[MAX_PLAYER_NAME];

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

                    SendClientMessage(playerid, COLOR_1RED, "Intra in primul CheckPoint pentru a incepe jefuirea.");

                    SendClientMessage(playerid, COLOR_1BLUE, "Politia a fost alertata!");

                    SetPlayerCheckpoint(playerid, 1462.1063, -1028.3362, 23.8281, 5.0);

                    format(string, sizeof(string), "Atentie, catre toate unitatile: %s a juefuit banca! Prindeti-l!", name);

            SendCopMessage(COLOR_YELLOW2,string);

                    Robbing[playerid] = 1;

                      PlayerHasRobbedBank[playerid] = 1;

                      GivePlayerMoney(playerid, 10000);

}

else

{

    SendClientMessage(playerid, COLOR_1RED, "Nu mai poti jefui banca! Asteapta o ora sau vei fi detectat!");

}

                }

                else

                {

                    SendClientMessage(playerid, COLOR_1RED, "Ai dat deja /rob! Completeaza jefuirea aceasta mai intai!");

                    return 1;

                }

            }

            else

            {

                SendClientMessage(playerid, COLOR_1RED, "Nu esti in vanul de rob sau nu esti soferul vanului!");

                return 1;

            }

        }

    }[/pawn]

Iar problema la /prob [ player rob ] este urmatoare:

Nu ii scade banii victimei , iar hotului nu i da banii...

[pawn]    if(strcmp(cmd, "/prob", true) == 0)

{

    GetPlayerName(playerid, sendername, sizeof(sendername));

new victim = GetClosestPlayer(playerid);

    if(IsPlayerConnected(playerid))

        if(GetDistanceBetweenPlayers(playerid,victim) < 50)

  {

        if(prob[playerid] == 0)

        {

        format(string, sizeof(string), "%s te-a jefuit! Ai pierdut 1000$! Prinde-l!", sendername);

    SendClientMessage(victim, COLOR_YELLOW2, string);

GivePlayerMoney(victim, -1000);

                GivePlayerMoney(playerid, 1000);

                SetTimerEx("probb", 60000, 0, "d", playerid);

                SendClientMessage(playerid, COLOR_1BLUE, "L-ai jefuit! Acum fugi!");

                prob[playerid] = 1;

}

else

{

    SendClientMessage(playerid, COLOR_1GREEN, "Trebuie sa astepti 1 minut!");

}

}

else

{

    SendClientMessage(playerid, TEAM_BALLAS_COLOR, "Nu este nici un player in apropierea ta!");

}

return 1;

}[/pawn]

Va Rog ajutor..

Link to comment
Share on other sites

1 answer to this question

Recommended Posts

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.