Jump to content
  • 0

Comanda /rentboat nu merge


tantan_andrey

Question

Salut. Am si eu o problema cu comanda /rentboat. Am niste barci pe server, si cand ma sui in ele, imi zice ca sa scriu /rent boat pentru a inchiria barca.. Asa scriu comanda:( si nu imi zice nici ca am inchiriato nici nimic:(. Comanda este:

	if(strcmp(cmd, "/rentboat", true) == 0)
	{
        if(IsPlayerConnected(playerid))
		{
			if(GetPlayerVehicleID(playerid) >= 247 && GetPlayerVehicleID(playerid) <= 252 || GetPlayerVehicleID(playerid) >= 244)
			{
				new hirefee = HireCost(GetPlayerVehicleID(playerid));
				if(GetPlayerVehicleID(playerid) >= 247 && GetPlayerVehicleID(playerid) <= 252 || GetPlayerVehicleID(playerid) >= 244)
				{
					if(SBizzInfo[12][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) <  SBizzInfo[12][sbEntranceCost])
					{
						SendClientMessage(playerid, COLOR_GRAD2, "You dont have that much cash !");
						return 1;
					}
					GivePlayerMoney(playerid,-SBizzInfo[12][sbEntranceCost]);
					SBizzInfo[12][sbTill] += SBizzInfo[12][sbEntranceCost];
					ExtortionSBiz(12, SBizzInfo[12][sbEntranceCost]);
					SBizzInfo[12][sbProducts]--;
				}
				if(HireCar[playerid] != 299)
				{
					gCarLock[HireCar[playerid]] = 0;
					UnLockCar(HireCar[playerid]);
				}
				HireCar[playerid] = GetPlayerVehicleID(playerid);
				OnPropUpdate();
				PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
				format(string, sizeof(string), "~w~We hope you enjoy ~n~the use of this boat~n~To lock or unlock your boat~n~type ~g~/lock~n~~w~please drive safely",hirefee);
				TogglePlayerControllable(playerid, 1);
				GameTextForPlayer(playerid, string, 5000, 3);
			}
		}
		return 1;
	}

Sa iti dea Deumnezeu sanatate TzAkS

Link to comment
Share on other sites

7 answers to this question

Recommended Posts

Intra pe server si vezi ce id-uri au barcile,daca nu sunt de la 244 pana la 252 schimba id-urile in gm.

Id il aflii cu comanda /dl si te duci langa barca.

Si ar trebuii sa arate asa

if(strcmp(cmd, "/rentboat", true) == 0)
	{
        if(IsPlayerConnected(playerid))
		{
			if(GetPlayerVehicleID(playerid) >= 244 && GetPlayerVehicleID(playerid) <= 252)
			{
				new hirefee = HireCost(GetPlayerVehicleID(playerid));
				if(GetPlayerVehicleID(playerid) >= 244 && GetPlayerVehicleID(playerid) <= 252)
//restul comenzii

gXvsYS
Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.