Jump to content

Question

Posted

Salut, am vrut sa fac sa iti poti cumpara doar 1 masina personala si am facut un comanda buy asa:

else if(strcmp(x_nr,"buy",true) == 0)
	        {
	            if(IsAnOwnableCar(idcar))
	            {
	                if(PlayerInfo[playerid][pLevel] < 2)
			    	{
                    	SendClientMessage(playerid, COLOR_GREY, "Trebuie sa ai level 2 pentru a putea cumpara o masina!");
                    	return 1;
			    	}
			    	if(PlayerInfo[playerid][pPcarkey1] == 999) { }
			    	//else if(PlayerInfo[playerid][pPcarkey2] == 999) { }
			    	else { SendClientMessage(playerid, COLOR_GREY, "Este deja o masina inregistrata pe numele tau."); return 1; }
					if(CarInfo[idcar][cOwned]==1)
					{
				    	SendClientMessage(playerid, COLOR_WHITE, "Cineva mai detine aceasta masina");
				    	return 1;
					}
					if(GetPlayerMoney(playerid) >= CarInfo[idcar][cValue])
					{
					    if(PlayerInfo[playerid][pPcarkey1] == 999) { PlayerInfo[playerid][pPcarkey1] = idcar; }
					    //else if(PlayerInfo[playerid][pPcarkey2] == 999) { PlayerInfo[playerid][pPcarkey2] = idcar; }
					    else { return 1; }
						CarInfo[idcar][cOwned] = 1;
						GetPlayerName(playerid, sendername, sizeof(sendername));
						strmid(CarInfo[idcar][cOwner], sendername, 0, strlen(sendername), 999);
						GivePlayerMoney(playerid,-CarInfo[idcar][cValue]);
						PlayerPlayMusic(playerid);
						GameTextForPlayer(playerid, "~r~~h~Congratulations~n~~y~~h~Don't forget to /v park it!", 5000, 3);
						SendClientMessage(playerid, COLOR_WHITE, "Felicitari ti-ai cumparat o noua masina!");
						SendClientMessage(playerid, COLOR_WHITE, "Scrie /vehiclehelp pentru manualul masini.");
						TogglePlayerControllable(playerid, 1);
						//SendClientMessage(playerid, COLOR_YELLOW2, "Acum poti porni motorul masinii apasand pe butonul cu care sari.");
						//gEngine[playerid] = 0;
						//engineOn[GetPlayerVehicleID(playerid)] = false;
						DateProp(playerid);
						OnPropUpdate();
						OnPlayerUpdate(playerid);
						return 1;
					}
					else
					{
					    SendClientMessage(playerid, COLOR_GREY, "You don't have enough cash with you ! ");
					    return 1;
					}
	            }
	        }
         else
	        {
	            SendClientMessage(playerid, COLOR_WHITE, "HINT: (/v)ehicle [name]");
	            SendClientMessage(playerid, COLOR_GRAD3,"{ff0000}» {00bfff}Vehicle:{ffffff} /v sell • /v sellto • /v park(1-2) • /v color • /v find(1-2) • /v plate");
	            return 1;
	        }
	    }
	    return 1;
	}

Iar acum cand dau /v buy imi zice: Este deja o masina inregistrata pe numele tau. Chiar daca nu este.

Ma poate ajuta cineva? Mersi anticipat

5 answers to this question

Recommended Posts

Posted

Esti sigur ca ai cheia 999 cand dai /v buy?

Da`ti setstat la cheia 1 de la masina cu 999 si dai dupaia /v buy.

Si pune in gm si la celalalte unde ai pcarckey2 cu //.

gXvsYS
Posted

Deci, daca urc intr-o masina personala si dau /v buy zice: Deja detii 1 masina.

Pot sa imi setez chei sa fac orice ca nu merge e de la comanda pe care am puso mai sus dar nu stiu dc nu merge ca totul e bine la ea.

Guest
This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • 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.