Jump to content

Question

Posted

Salut, am si eu o problema la sistemul de masini personale.

Cand dau /parkmycar (am schimbat din /v park in /parkmycar) imi apare alta masina

De exemplu dau /parkmycar la un elegy si imi apare un Freeway :|

Comanda:

	if(strcmp(cmd,"/parkmycar",true) == 0)
	{
		new Float:x,Float:y,Float:z;
		new Float:a;
		new carid;
		new getcarid;
		if(GetPlayerVehicleID(playerid) == PlayerInfo[playerid][pPcarkey]) { carid = PlayerInfo[playerid][pPcarkey]; }
		getcarid = GetPlayerVehicleID(playerid);
		GetPlayerName(playerid, playername, sizeof(playername));
		GetVehiclePos(carid, x, y, z);
		//GetPlayerFacingAngle(playerid, a);
		GetVehicleZAngle(carid, a);
		if(IsPlayerInVehicle(playerid,carid) && CarInfo[carid][cOwned] == 1)
		{
			if(PlayerInfo[playerid][pPcarkey] == 999)
			{
				SCM(playerid, COLOR_GREY, "You don't own a car.");
				return 1;
			}
			if(getcarid == carid)
			{
				CarInfo[carid][cLocationx] = x;
				CarInfo[carid][cLocationy] = y;
				CarInfo[carid][cLocationz] = z;
				CarInfo[carid][cAngle] = a;
				format(string, sizeof(string), "~n~ You have parked your vehicle in this location. ~n~");
				GameTextForPlayer(playerid, "You have parked your vehicle in this position. It will respawn here.", 10000, 3);
				OnPropUpdate();
				OnPlayerUpdate(playerid);
				DestroyVehicle(carid);
				CreateVehicle(CarInfo[carid][cModel],CarInfo[carid][cLocationx],CarInfo[carid][cLocationy],CarInfo[carid][cLocationz]+1.0,CarInfo[carid][cAngle],CarInfo[carid][cColorOne],CarInfo[carid][cColorTwo],60000);
				SetVehicleModifications(carid);
				TogglePlayerControllable(playerid, 1);
				return 1;
			}
		}
		return 1;
	}

1 answer to this question

Recommended Posts

Posted

Nr-u de la IsAOwnableCar nu corespunde cu cer real.(refa id-urile la masini).

Stiu si eu ... branza e pe bani, dar eu tot ma joc pe gratis!

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.