Old foreach.inc files are no longer compatible with YSI.
#5

I got something like this:

Код:
public RentTimer()
{
	foreach(Player,i)
	{
		new rentcar = GetPlayerVehicleID(i);
		if(gBike[i] == 0 && IsARental(rentcar) && gBikeRenting[i] == 1)
		{
			RemovePlayerFromVehicle(i);
			new Float:X, Float:Y, Float:Z;
			GetPlayerPos(i, X, Y, Z);
			SetPlayerPos(i, X, Y, Z+2);
			SetVehicleToRespawn(rentcar);
			SendClientMessageEx(i,COLOR_GREY,"Your rental is up, you may get a new bike at the bike rental.");
			KillTimer(GetPVarInt(i, "RentTime"));
			gBikeRenting[i] = 0;
			return 1;
  		}
  		if(gBike[i] == 0 && gBikeRenting[i] == 1)
  		{
			SendClientMessageEx(i,COLOR_GREY,"Your rental has timed out, please return to the bike store to rent a new one.");
			KillTimer(GetPVarInt(i, "RentTime"));
			gBikeRenting[i] = 0;
			return 1;
  		}
  		if(gBike[i] >=1){gBike[i]--; return 1;}
    }
    return 1;
}
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)