SA-MP Forums Archive
i got a problem with /robbank - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: i got a problem with /robbank (/showthread.php?tid=307073)



i got a problem with /robbank - $$Money$$ - 29.12.2011

I was trying to rob the bank.I am level 4 a roleplay server.But it say you're level is not high enough
this are the pawn code
pawn Code:
if(strcmp(cmd, "/robbank", true) == 0)
    {
        if(IsPlayerConnected(playerid))
        {
            if(robbing[playerid] == 1)
            {
                SendClientMessage(playerid, COLOR_GREY, " You are already robbing the bank, please slow down");
                return 1;
            }
            if(alreadyrobbed[playerid] == 1)
            {
                SendClientMessage(playerid, COLOR_WHITE, "You already robbed the bank! Wait 1 hour.");
                return 1;
            }
            if(PlayerInfo[playerid][pLevel] >= 1)
            {
                SendClientMessage(playerid, COLOR_GREY, "You're level is not high enough");
                return 1;
            }
            if(!IsPlayerInRangeOfPoint(playerid, 5.0, 2328.8669,-1919.2814,828.1979))
            {
                SendClientMessage(playerid, COLOR_GREY, "   You are not at the bank !");
                return 1;
            }
                    GivePlayerMoney(playerid,200000000);
                    SendClientMessage(playerid, COLOR_WHITE, "You have Robbed Los Santos Local Bank And Stole Money from the bank - Stay low From Cops for few");
                    robbing[playerid] = 1;
                    LoopingAnim(playerid,"ped", "ARRESTgun", 4.0, 0, 1, 1, 1, 0);
                    SendClientMessageToAll(COLOR_ORANGE, "||----------Latest News----------||");
                    SendClientMessageToAll(COLOR_NICEGREEN, " Los Santos Local Bank Trust has Been Broken.");
                    SendClientMessageToAll(COLOR_NICEGREEN, " The Bank is Currentley getting Robbed. ");
                    SendClientMessageToAll(COLOR_NICEGREEN, " We will report more once we get more information");
                    SendClientMessageToAll(COLOR_ORANGE, "||----------Latest News----------||");
                    return 1;
                }
            }
And how can i change the robbing time from 1 hour to 10 minutes?


Re: i got a problem with /robbank - $$Money$$ - 29.12.2011

Any help please?


Re: i got a problem with /robbank - spedico - 29.12.2011

if(PlayerInfo[playerid][pLevel] >= 1) change to if(PlayerInfo[playerid][pLevel] <= 1)


Re: i got a problem with /robbank - §с†¶e®РµРe - 29.12.2011

To change the time edit the timer or whatever that makes you stop 1 hour..


Re: i got a problem with /robbank - $$Money$$ - 29.12.2011

How can i edit it to get 20 wanted stars when start rob.When i rob the money when back to it normal value.
I didnt get the 2mil


Re: i got a problem with /robbank - N0FeaR - 29.12.2011

Quote:
Originally Posted by $$Money$$
View Post
How can i edit it to get 20 wanted stars when start rob.When i rob the money when back to it normal value.
I didnt get the 2mil
i think you know where you need too add this

Code:
new WantedPoints[MAX_PLAYERS];
this under playerconnect
WantedPoints[playerid] = 0;

add this on /robbank
WantedPoints[playerid] = 20;


Re: i got a problem with /robbank - $$Money$$ - 29.12.2011

But how can i get the 2mil? I rob the bank.then the money back to the original value of my money
Where do i put
pawn Code:
new Wantedpoints[MAXPLAYERS]



Re: i got a problem with /robbank - $$Money$$ - 29.12.2011

when i type others command..its says u must be atleast level 3 to rob the bank..WTF what happen?


Re: i got a problem with /robbank - $$Money$$ - 29.12.2011

The value stays the same!!I rob the bank but the value of my money stays.


Re: i got a problem with /robbank - $$Money$$ - 29.12.2011

Help anyoneI taught there are many scripters in this forum that can help me?PLease helpme !


Re: i got a problem with /robbank - KingHual - 29.12.2011

Kids these days... 1.st - Don't double/triple/quadriple post. And seriously...
pawn Code:
if(PlayerInfo[playerid][pLevel] >= 1)
            {
                SendClientMessage(playerid, COLOR_GREY, "You're level is not high enough");
                return 1;
            }
Returns the error if the level is bigger than 1... It should be
pawn Code:
if(PlayerInfo[playerid][pLevel] < 1)
            {
                SendClientMessage(playerid, COLOR_GREY, "You're level is not high enough");
                return 1;
            }
Also, have you ever heard of "else" statements? If no, then ****** them.