#1

Hello guys.

I have this Rent Script where you jump on a bike and u get a dialog that says do you want to rent this bike and if you press YES you will play 50$.

I want to make per minute payment, for ex u get the bike and you pay 50$ and after every minute you pay 25$ while you are on the bike. U know what i mean?

How can I do that

Here is my rent script

Код:
if(IsAVelosipedCar(newcar))
		{
			if (HireCar[playerid] != newcar)
			{
				format(string,sizeof(string),"Za da go rentate ovaj velosiped\nStisnete ^RENT^\nZa da izlezete od velosipedo stisnete ^IZLEZ^\n{FF4040}CENA:20$/minuta");
				ShowPlayerDialog(playerid, 4464, DIALOG_STYLE_MSGBOX,"Rent Velosiped",string,"Rent","Izlez");
				TogglePlayerControllable(playerid, 0);
			}
		}
Код:
public IsAVelosipedCar(carid)
{
	for(new i = 0; i < sizeof(VelosipedCar); i++)
	{
		if(carid == VelosipedCar[i])	return 1;
	}
	return 0;
}
Код:
  		 if(dialogid == 4464)
          {
                        if(response)
                        {
                                TogglePlayerControllable(playerid,1);
                                GivePlayerMoney(playerid, -50);
                                SendClientMessage(playerid,COLOR_WHITE,"{FFA500}INFO:{FFFFFF}Vie rentavte za 50$");
                        }
                        if(!response)
                        {
                                TogglePlayerControllable(playerid,1);
                                RemovePlayerFromVehicle(playerid);
                                SendClientMessage(playerid,COLOR_WHITE,"{FFA500}INFO:{FFFFFF}Vie odbivte da rentate.");
						}
			      }
Thanmks
Reply


Messages In This Thread
Rent - by Dimkata - 17.02.2019, 21:12
Re: Rent - by Dimkata - 18.02.2019, 16:36
Re: Rent - by ItsRobinson - 18.02.2019, 18:40
Re: Rent - by Dimkata - 18.02.2019, 20:14

Forum Jump:


Users browsing this thread: 2 Guest(s)