A little problem with /rentcar.
#1

Hello everyone .. i have a little problem , i think you can help me..
I've just made a /rentboat command a few days ago , with DIALOG. You go on a pickup and you type /rentboat. It will appear a menu , which boat you want to rent. So i want to make something. If a boat is rented and if someone tries to rent the same boat , say : "Someone already rents this boat."
Look my code :
Код:
if(listitem == 0)
	        {
					if(SBizzInfo[16][sbProducts] == 0)
					{
						GameTextForPlayer(playerid, "~r~Out Of Stock", 5000, 1);
						return 1;
					}
					if(PlayerInfo[playerid][pPbiskey] == 12)
					{
						GameTextForPlayer(playerid, "~w~No charge for the boss", 5000, 3);
						TogglePlayerControllable(playerid, 1);
						return 1;
					}
					if (GetPlayerMoney(playerid) <  35000)
					{
						SendClientMessage(playerid, COLOR_GRAD2, "   You dont have that much cash !");
						return 1;
					}
					if(HireCar[playerid] != 299)
					{
						gCarLock[HireCar[playerid]] = 0;
						UnLockCar(HireCar[playerid]);
					}
 ---I think here is the problem	              for(new i=0; i<MAX_PLAYERS; i++) 
---- it doesn't work					{
   						if(HireCar[i] != GetPlayerVehicleID(playerid))
			    		{
       						SendClientMessage(playerid, COLOR_GREY, "    Someone already rents this yacht !");
			        		return 1;
			    		}
					}
					GivePlayerMoney(playerid,-35000);
					PutPlayerInVehicle(playerid, 228, 0);
					SBizzInfo[16][sbTill] += 35000;
					ExtortionSBiz(16, 35000);
					SBizzInfo[16][sbProducts]--;
					HireCar[playerid] = GetPlayerVehicleID(playerid);
					OnPropUpdate();
					GameTextForPlayer(playerid, "We hope you enjoy this yacht", 5000, 3);
			}
Reply


Messages In This Thread
A little problem with /rentcar. - by Gabb0411 - 20.08.2010, 08:55
Re: A little problem with /rentcar. - by Gabb0411 - 20.08.2010, 12:07
Re: A little problem with /rentcar. - by xxxDunecatxxx - 20.08.2010, 12:53
Re: A little problem with /rentcar. - by Gabb0411 - 20.08.2010, 13:12
Re: A little problem with /rentcar. - by Gabb0411 - 20.08.2010, 16:44
Re: A little problem with /rentcar. - by Gabb0411 - 21.08.2010, 06:39

Forum Jump:


Users browsing this thread: 1 Guest(s)