SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Scripting Help

Reply
 
Thread Tools Display Modes
Old 17/04/2012, 01:54 AM   #1
sampmark05
Big Clucker
 
sampmark05's Avatar
 
Join Date: Dec 2011
Location: Philippines
Posts: 173
Reputation: 13
Default How to Make?

How to make a bank robbery system for my RP server? Any Hints?
__________________
If my post helped you, can you give me +1 reputation!
_______________________My Release_______________________

>I would be very happy if you'd Donate<
Click Here To Join!
sampmark05 is offline   Reply With Quote
Old 17/04/2012, 02:02 AM   #2
ReneG
High-roller
 
Join Date: Oct 2011
Location: Sublime Text 2
Posts: 2,005
Reputation: 333
Default Re: How to Make?

Your question is way too general. Have you even tried giving this a shot yourself? If you get stuck, then post here.
ReneG is offline   Reply With Quote
Old 17/04/2012, 02:06 AM   #3
ReneG
High-roller
 
Join Date: Oct 2011
Location: Sublime Text 2
Posts: 2,005
Reputation: 333
Default Re: How to Make?

Quote:
Originally Posted by HardBubblez View Post
Me ?
Obviously not. My previous post was towards the original poster.
ReneG is offline   Reply With Quote
Old 17/04/2012, 02:07 AM   #4
sampmark05
Big Clucker
 
sampmark05's Avatar
 
Join Date: Dec 2011
Location: Philippines
Posts: 173
Reputation: 13
Default Re: How to Make?

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

Code:
	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;
	}
__________________
If my post helped you, can you give me +1 reputation!
_______________________My Release_______________________

>I would be very happy if you'd Donate<
Click Here To Join!
sampmark05 is offline   Reply With Quote
Old 17/04/2012, 02:09 AM   #5
ReneG
High-roller
 
Join Date: Oct 2011
Location: Sublime Text 2
Posts: 2,005
Reputation: 333
Default Re: How to Make?

I highly doubt you made this. This is obviously straight from the godfather roleplay or something.
ReneG is offline   Reply With Quote
Old 17/04/2012, 02:11 AM   #6
sampmark05
Big Clucker
 
sampmark05's Avatar
 
Join Date: Dec 2011
Location: Philippines
Posts: 173
Reputation: 13
Default Re: How to Make?

yup its from GF. how do i convert it?
__________________
If my post helped you, can you give me +1 reputation!
_______________________My Release_______________________

>I would be very happy if you'd Donate<
Click Here To Join!
sampmark05 is offline   Reply With Quote
Old 17/04/2012, 02:18 AM   #7
Jonny5
Gangsta
 
Join Date: Mar 2012
Location: Mi, USA
Posts: 935
Reputation: 146
Default Re: How to Make?

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


forgive me if i missed something here.
Jonny5 is offline   Reply With Quote
Old 17/04/2012, 02:30 AM   #8
sampmark05
Big Clucker
 
sampmark05's Avatar
 
Join Date: Dec 2011
Location: Philippines
Posts: 173
Reputation: 13
Default Re: How to Make?

Quote:
Originally Posted by Jonny5 View Post
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 youtube
__________________
If my post helped you, can you give me +1 reputation!
_______________________My Release_______________________

>I would be very happy if you'd Donate<
Click Here To Join!
sampmark05 is offline   Reply With Quote
Old 17/04/2012, 02:37 AM   #9
sampmark05
Big Clucker
 
sampmark05's Avatar
 
Join Date: Dec 2011
Location: Philippines
Posts: 173
Reputation: 13
Default Re: How to Make?

Is this correct ?
Code:
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;
	}
__________________
If my post helped you, can you give me +1 reputation!
_______________________My Release_______________________

>I would be very happy if you'd Donate<
Click Here To Join!
sampmark05 is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
[FilterScript] How To make Filter and Script files make Morkano Filterscripts 10 24/01/2012 04:03 PM
how can i make a command to make building's in game wes231 Scripting Help 1 17/11/2011 08:52 AM
How to make a menu and how to make it have teleport options zanakinz Help Archive 9 05/04/2011 12:55 AM
Make a door and make to move the gate whitedragon Help Archive 18 27/11/2009 10:39 PM
[HELP]Can someone make a Tutorial for how to make 0.3 propertys? Lilcuete Help Archive 2 10/11/2009 09:45 PM


All times are GMT. The time now is 06:18 PM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.