29.11.2012, 05:29
pawn Код:
new sweeperjob[50];
//under gamemode init
sweeperjob[0] = createveh/addstatic/addstatex(vehiclespawninfo);
//49 later.....
sweeperjob[49] = createveh/addstatic/addstatex(vehiclespawninfo);
//under onplayerentervehicle
if(SweeperRide(vehicleid))
{
new sj;
sj = SetTimerEx("sweepjob", 60000, true, "i", playerid);
}
//under
//onplayerexitvehicle && onplayerdeath
killertimer(sj);
forward sweepjob(playerid);
public sweepjob(playerid)
{
GivePlayerMoney(playerid, 150);
}
return 1;
}
stock SweeperRide(vehicleid)
{
for(new i=0; i<50; i++)
{
if(vehicleid == sweeperjob[i]) return 1;
}
return 0;
}