[help]Adding features.
#1

Im adding features to my robbank system.But i dont know howto add when the player rob the bank
The player must wait 2 minutes than the robberry be success.And i want it to give 10 wanted stars or level.
How can i add it.Heres the pawn code
pawn Код:
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(PlayerInfo[giveplayerid][pWantedLevel] >= 6)
            {
                SendClientMessage(playerid, COLOR_GREY, "   That player is at the max wanted level !");
                return 1;
            }
            if(alreadyrobbed[playerid] == 1)
            {
                SendClientMessage(playerid, COLOR_WHITE, "You already robbed the bank! Wait for 1 hour.");
                return 1;
            }
            if(PlayerInfo[playerid][pLevel] <= 3)
            {
                SendClientMessage(playerid, COLOR_GREY, "You need to be atlest level 3 to rob the bank");
                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;
            }
                    SetTimerEx("RobTimer", 30000, false, "i", playerid);
                    SendClientMessage(playerid, COLOR_WHITE, "You have Robbed Los Santos Local Bank And Stole Money from the bank - Stay low From Cops for few minutes");
                    robbing[playerid] = 1;
                    LoopingAnim(playerid,"ped", "ARRESTgun", 4.0, 0, 1, 1, 1, 0);
                    PlayerInfo[playerid][pCash] += 200000;
                    SendClientMessageToAll(COLOR_LIGHTBLUE, "City Alert:The Los Santos Local Bank is being robbed!");
                    return 1;
                }
            }
Reply
#2

add a timer inside the robbank then make a public function for the timer (don't forget the forward)
then their use your enums like (CanRob) and set it to 1 after 2 minutes.
the great wanted level is 6 so i suggest use 6 Wanted Level. pawn code

pawn Код:
new GetWanted = GetPlayerWantedLevel(playerid);
    SetPlayerWantedLevel(playerid, GetWanted + 6);
on robbank command i hope i helped

untested
Reply
#3

Oh thanks Jorkis..btw i need some help?
How can i contact you..my neon system is not working.Can you help
Reply
#4

PM me about this brb in minutes i will eat
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)