How to Make?
#1

How to make a bank robbery system for my RP server? Any Hints?
Reply
#2

Your question is way too general. Have you even tried giving this a shot yourself? If you get stuck, then post here.
Reply
#3

Quote:
Originally Posted by HardBubblez
Посмотреть сообщение
Me ?
Obviously not. My previous post was towards the original poster.
Reply
#4

I already make a bank robbery system but i want to convert it to zcmd

Код:
	if(strcmp(cmd, "/robbank", true) == 0)
	{
	    if(PlayerInfo[playerid][pLevel] < 4)
	    {
	        SendClientMessage(playerid, COLOR_GREY, "   You must be a level 4 or higher to be able to rob the bank.");
	        return 1;
	    }
		if(IsACop(playerid))
	    {
	    	SendClientMessage(playerid, COLOR_GREY, "   Law Enforcement Officials cannot rob the bank.");
	    	return 1;
	    }
		if(!IsPlayerInRangeOfPoint(playerid, 3.0, 1448.44, -988.52, 1639.78))
	    {
			SendClientMessage(playerid, COLOR_GREY, "   You are not at the bank safe.");
			return 1;
	    }
		if(TimeAfterBankJob < TIME_BETWEEN_BANKJOBS)
	    {
	    	new bjt;
	    	bjt = TIME_BETWEEN_BANKJOBS - TimeAfterBankJob;
	    	format(string, sizeof(string), "   You must wait %d hours before making the next bank robbery attempt.", bjt);
			SendClientMessage(playerid, COLOR_GREY, string);
			return 1;
	    }
		if(BankJobPlayer < 999 && BankJobPlayer != playerid)
	    {
		    SendClientMessage(playerid, COLOR_GREY, "   Someone is already robbing the bank.");
		    return 1;
	    }
		if(BankJobPlayer == playerid)
	    {
	    	format(string, 256, "   You're already robbing the bank! %d minutes left.", BankJobTime / 2);
	    	SendClientMessage(playerid, COLOR_GREY, string);
	    	return 1;
	    }
	    new Cops = 0;
	    for(new i = 0; i < MAX_PLAYERS; i++)
		{
		    if(IsACop(i))
		    {
		        Cops += 1;
		    }
		}
		if(!(Cops >= 3))
		{
		    SendClientMessage(playerid,COLOR_GREY,"   There must be at least 3 Law Enforcement Officials online.");
		    return 1;
		}
		format(string, 256, "You have started the robbery, you must stay inside the bank for %d minutes.", BANK_JOB_TIME/2);
		SendClientMessage(playerid, COLOR_WHITE, string);
		if(PlayerInfo[playerid][pWantedLevel] <= 1)
		{
		    PlayerInfo[playerid][pWantedLevel] += 5;
		}
		else if(PlayerInfo[playerid][pWantedLevel] >= 2)
		{
		    PlayerInfo[playerid][pWantedLevel] = 6;
		}
		SetPlayerCriminal(playerid, 999, "Bank Robbery");
		format(string, 256, "City Alert: The Los Santos Bank is being robbed!");
		SendClientMessageToAll(COLOR_LIGHTBLUE, string);
		BankJobTime = BANK_JOB_TIME;
		BankJobPlayer = playerid;
		return 1;
	}
Reply
#5

I highly doubt you made this. This is obviously straight from the godfather roleplay or something.
Reply
#6

yup its from GF. how do i convert it?
Reply
#7

lol you have released a filter script that uses ZCMD but you cant convert this code?


forgive me if i missed something here.
Reply
#8

Quote:
Originally Posted by Jonny5
Посмотреть сообщение
lol you have released a filter script that uses ZCMD but you cant convert this code?


forgive me if i missed something here.
Thanks you for your question Mr. Johnny5 i found a way to convert this to zcmd in *******
Reply
#9

Is this correct ?
Код:
CMD:robbank(playerid, params[])
{
    if(PlayerInfo[playerid][pLevel] < 4)
	    {
	        SendClientMessage(playerid, COLOR_GREY, "   You must be a level 4 or higher to be able to rob the bank.");
	        return 1;
	    }
    if(IsACop(playerid))
	    {
	    	SendClientMessage(playerid, COLOR_GREY, "   Law Enforcement Officials cannot rob the bank.");
	    	return 1;
	    }
    if(!IsPlayerInRangeOfPoint(playerid, 3.0, 1448.44, -988.52, 1639.78))
	    {
			SendClientMessage(playerid, COLOR_GREY, "   You are not at the bank safe.");
			return 1;
	    }
    if(TimeAfterBankJob < TIME_BETWEEN_BANKJOBS)
	    {
	    	new bjt;
	    	bjt = TIME_BETWEEN_BANKJOBS - TimeAfterBankJob;
	    	format(string, sizeof(string), "   You must wait %d hours before making the next bank robbery attempt.", bjt);
			SendClientMessage(playerid, COLOR_GREY, string);
			return 1;
	    }
    		if(BankJobPlayer < 999 && BankJobPlayer != playerid)
	    {
		    SendClientMessage(playerid, COLOR_GREY, "   Someone is already robbing the bank.");
		    return 1;
	    }
		if(BankJobPlayer == playerid)
	    {
	    	format(string, 256, "   You're already robbing the bank! %d minutes left.", BankJobTime / 2);
	    	SendClientMessage(playerid, COLOR_GREY, string);
	    	return 1;
	    }
	    new Cops = 0;
	    for(new i = 0; i < MAX_PLAYERS; i++)
		{
		    if(IsACop(i))
		    {
		        Cops += 1;
		    }
		}
		if(!(Cops >= 3))
		{
		    SendClientMessage(playerid,COLOR_GREY,"   There must be at least 3 Law Enforcement Officials online.");
		    return 1;
		}
		format(string, 256, "You have started the robbery, you must stay inside the bank for %d minutes.", BANK_JOB_TIME/2);
		SendClientMessage(playerid, COLOR_WHITE, string);
		if(PlayerInfo[playerid][pWantedLevel] <= 1)
		{
		    PlayerInfo[playerid][pWantedLevel] += 5;
		}
		else if(PlayerInfo[playerid][pWantedLevel] >= 2)
		{
		    PlayerInfo[playerid][pWantedLevel] = 6;
		}
		SetPlayerCriminal(playerid, 999, "Bank Robbery");
		format(string, 256, "City Alert: The Los Santos Bank is being robbed!");
		SendClientMessageToAll(COLOR_LIGHTBLUE, string);
		BankJobTime = BANK_JOB_TIME;
		BankJobPlayer = playerid;
		return 1;
	}
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)