[HELP] Bank rob
#1

Hello, how can i have player rob the bank on my rp server?

Like: robbank invite etc..
Reply
#2

That's alot of work imo, its like a FS, but i'll give you few ideas..
/robbank invite [id]: store the id in a var..
/robbank : use timers..
and use ZCMD, sscanf2 and foreach!
Reply
#3

See, I got this script but it only allows members of a family to rob it for some reason, how could i make it so basically anyone can rob it civilians etc..

And set 5 star wanted lvl at the sametime?

Код:
	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][pFMember] == 255)
	        {
	            SendClientMessage(playerid, COLOR_GREY, " You are not in a family");
	            return 1;
			}
			if(!IsPlayerInRangeOfPoint(playerid, 5.0, 2308.8071,-13.2485,26.7422))
	        {
	            SendClientMessage(playerid, COLOR_GREY, "   You are not at the bank !");
	            return 1;
	        }
					SendClientMessage(playerid, COLOR_WHITE, " You started to rob the bank, This will take 10 minutes");
					SetTimerEx("bankrob", 600000, false, "i", playerid);
					robbing[playerid] = 1;
					LoopingAnim(playerid,"ped", "ARRESTgun", 4.0, 0, 1, 1, 1, 0);
                    SendClientMessageToAll(COLOR_ORANGE, "||----------Latest News----------||");
					SendClientMessageToAll(COLOR_WHITE, " The bank is currently getting robbed.");
					SendClientMessageToAll(COLOR_WHITE, " We are currently waiting for the cops");
					SendClientMessageToAll(COLOR_WHITE, " We will report more when we get more information");
					SendClientMessageToAll(COLOR_ORANGE, "||----------Latest News----------||");
					return 1;
				}
			}
Reply
#4

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(alreadyrobbed[playerid] == 1)
            {
                SendClientMessage(playerid, COLOR_WHITE, "You already robbed the bank! Wait 1 hour.");
                return 1;
            }
            if(!IsPlayerInRangeOfPoint(playerid, 5.0, 2308.8071,-13.2485,26.7422))
            {
                SendClientMessage(playerid, COLOR_GREY, "   You are not at the bank !");
                return 1;
            }
                    SendClientMessage(playerid, COLOR_WHITE, " You started to rob the bank, This will take 10 minutes");
                    SetTimerEx("bankrob", 600000, false, "i", playerid);
                    robbing[playerid] = 1;
                    LoopingAnim(playerid,"ped", "ARRESTgun", 4.0, 0, 1, 1, 1, 0);
                    SendClientMessageToAll(COLOR_ORANGE, "||----------Latest News----------||");
                    SendClientMessageToAll(COLOR_WHITE, " The bank is currently getting robbed.");
                    SendClientMessageToAll(COLOR_WHITE, " We are currently waiting for the cops");
                    SendClientMessageToAll(COLOR_WHITE, " We will report more when we get more information");
                    SendClientMessageToAll(COLOR_ORANGE, "||----------Latest News----------||");
                    return 1;
                }
            }
Reply
#5

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(alreadyrobbed[playerid] == 1)
            {
                SendClientMessage(playerid, COLOR_WHITE, "You already robbed the bank! Wait 1 hour.");
                return 1;
            }
            if(!IsPlayerInRangeOfPoint(playerid, 5.0, 2308.8071,-13.2485,26.7422))
            {
                SendClientMessage(playerid, COLOR_GREY, "   You are not at the bank !");
                return 1;
            }
                    SendClientMessage(playerid, COLOR_WHITE, " You started to rob the bank, This will take 10 minutes");
                    SetTimerEx("bankrob", 600000, false, "i", playerid);
                    robbing[playerid] = 1;
                    LoopingAnim(playerid,"ped", "ARRESTgun", 4.0, 0, 1, 1, 1, 0);
                    SendClientMessageToAll(COLOR_ORANGE, "||----------Latest News----------||");
                    SendClientMessageToAll(COLOR_WHITE, " The bank is currently getting robbed.");
                    SendClientMessageToAll(COLOR_WHITE, " We are currently waiting for the cops");
                    SendClientMessageToAll(COLOR_WHITE, " We will report more when we get more information");
                    SendClientMessageToAll(COLOR_ORANGE, "||----------Latest News----------||");
                    return 1;
                }
            }
Actually, thats how to make everyone rob it, but a 5 star civilian shouldn't be added automatically, its recommended to get LEO factions in your roleplaying server to do that.
Reply
#6

Quote:
Originally Posted by Pz
Посмотреть сообщение
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(alreadyrobbed[playerid] == 1)
            {
                SendClientMessage(playerid, COLOR_WHITE, "You already robbed the bank! Wait 1 hour.");
                return 1;
            }
            if(!IsPlayerInRangeOfPoint(playerid, 5.0, 2308.8071,-13.2485,26.7422))
            {
                SendClientMessage(playerid, COLOR_GREY, "   You are not at the bank !");
                return 1;
            }
                    SendClientMessage(playerid, COLOR_WHITE, " You started to rob the bank, This will take 10 minutes");
                    SetTimerEx("bankrob", 600000, false, "i", playerid);
                    robbing[playerid] = 1;
                    LoopingAnim(playerid,"ped", "ARRESTgun", 4.0, 0, 1, 1, 1, 0);
                    SendClientMessageToAll(COLOR_ORANGE, "||----------Latest News----------||");
                    SendClientMessageToAll(COLOR_WHITE, " The bank is currently getting robbed.");
                    SendClientMessageToAll(COLOR_WHITE, " We are currently waiting for the cops");
                    SendClientMessageToAll(COLOR_WHITE, " We will report more when we get more information");
                    SendClientMessageToAll(COLOR_ORANGE, "||----------Latest News----------||");
                    return 1;
                }
            }
Actually, thats how to make everyone rob it, but a 5 star civilian shouldn't be added automatically, its recommended to get LEO factions in your roleplaying server to do that.
Could you stop copy paste my codes ? Go learn pawn kid.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)