SA-MP Forums Archive
A Bug with Carsys? - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: A Bug with Carsys? (/showthread.php?tid=148618)



A Bug with Carsys? - DevilRP - 18.05.2010

People buy cars and then after they park it or leave the server when they call their car again, its a different car


Re: A Bug with Carsys? - DevilRP - 18.05.2010

...


Re: A Bug with Carsys? - ViruZZzZ_ChiLLL - 18.05.2010

Maybe you can show us the Carsys part of code,
so we can help you?


Re: A Bug with Carsys? - DevilRP - 18.05.2010

What part of it you want to see?
the call vehicle part?
Код:
	if(strcmp(cmd, "/callv", true) == 0)
	{
	  if(IsPlayerInAnyVehicle(playerid) ) return SendClientMessage(playerid,red,"you already have a car.");

    GetPlayerName(playerid,PlayerName,30);
	  new car = PlayerInfo[playerid][CarID];

	  if(VehicleInfo[car][CarOwned] == 1 && PlayerInfo[playerid][OwnCar] == 1)
		{
	  		if(GetPlayerMoney(playerid) < 1000)
	  		{
				SendClientMessage(playerid,red,"You need 1000$ to call your vehicle");
			}
			else
			{
				GetPlayerPos(playerid,Pos[playerid][0],Pos[playerid][1],Pos[playerid][2]);
				SetPlayerCameraPos(playerid, Pos[playerid][0],Pos[playerid][1],Pos[playerid][2]);
				SetPlayerCameraLookAt(playerid, Pos[playerid][0],Pos[playerid][1],Pos[playerid][2]);
				PutPlayerInVehicle(playerid, car, 0);
				GetVehicleZAngle(GetPlayerVehicleID(playerid), Angle[playerid]);
				SetTimerEx("TeleCar",1000,0,"i",playerid);
			  SendClientMessage(playerid,green,"Your vehicle is here!");
				GivePlayerMoney(playerid,-1000);
			}
		}
		else
		{
		SendClientMessage(playerid,red,"You dont have a vehicle!");
		}
		return 1;
	}