Close something
#4

Quote:
Originally Posted by Justsmile
Ok thats good. But I have the gas station how can I do it there. That every Gas Station have got another robtime. for example:
A robb gas station 1 b cant ( you knwo), Then A cant rob gas station 2. You understand?
just edit some codes.. and make it like this:

pawn Code:
forward UnRob(id);

new Places[2][3] = {
{X,Y,Z}, // This one would be ID 0
{X,Y,Z} // This one would be ID 1
};

new BankIsRobbed[sizeof(Places)];

for(new i=0;i<SizeOf(places);i++)
{
if(playertopoint(10.0, playerid, Places[i][0], Places[i][1], Places[i][2])
{
if(BankIsRobbed[i] == 0)
{
   // Here your rob code
   BankIsRobbed[i] = 1;
   SetTimerEx("UnRob", 30000, false, "d", i);
}
else
{
   SendClientMessage(playerid, COLOR_RED, "The bank is already being robbed by some guy.");
}

public UnRob(id)
{
 BankIsRobbed[id] = 0;
}

something like that, this is just an extension on Andom's code, so play with it a littlebit
Reply


Messages In This Thread
Close something - by Justsmile - 30.04.2009, 05:47
Re: Close something - by Andom - 30.04.2009, 06:31
Re: Close something - by Justsmile - 30.04.2009, 06:52
Re: Close something - by Think - 30.04.2009, 08:10
Re: Close something - by Justsmile - 30.04.2009, 08:48
Re: Close something - by Justsmile - 30.04.2009, 10:43

Forum Jump:


Users browsing this thread: 1 Guest(s)