30.04.2009, 08:10
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? |
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

