Ghost Car
#1

Hi guys i have a very strange thing going on like player enters car A clicks on a dialog which creates car B and transfers the player to car B.

Well what happens is basicly the same as in the vid below where it creates a second vehicle the player controls (car B)
however it shows the player in car A and it has a weird control over it aswell yet not as normal as car B.
Video: https://www.youtube.com/watch?v=mj_PBytelF8

Here is the part of my script where car B gets created and the player get transferred.

Код:
		if(response)
			{
				if(Iter_Count(OwnedCar<playerid>) < GetPlayerVipSlots(playerid))
				{
					new model = GetVehicleModel(veh);
					new did = GetDealerID(veh);
					SetVehicleToRespawn(TMPDealerVehID[playerid]);
					RemovePlayerFromVehicle(playerid);
					TMPDealerVeh[playerid] = CreateVehicle(model, DealerInfo[did][DPosX], c 
                                        DealerInfo[did][DPosY], DealerInfo[did][DPosZ], 0, 1, 1, -1, 0);
					SetVehicleToRespawn(TMPDealerVeh[playerid]);
					SetVehicleParamsEx(TMPDealerVeh[playerid], 1, 0, 0, 0, 0, 0, 0);
					PutPlayerInVehicle(playerid, TMPDealerVeh[playerid], 0);
					SCM(playerid, COLOR_LIGHTRED, "Dealer says: You have 1 minute to test the vehicle. 
                                        After that we will have a chat on where to take it from there !");
					SetTimerEx("DealerRevokeVeh", 60000, false, "d", playerid);
					new zstring[128];
					CountdownPSeconds[playerid] = 60;
					CountdownPTimer[playerid] = SetTimerEx("PCountDown", 1000, true, "d", playerid);
					TextDrawShowForPlayer(playerid, CountdownPTD);
					format(zstring, sizeof(zstring),"~p~Countdown: ~w~60");
					TextDrawSetString(CountdownPTD, zstring);
				}
				else
				{
					SCM(playerid, COLOR_GRAD1, "You already have the maximum of vehicles !");
					RemovePlayerFromVehicle(playerid);
					return true;
				}
			}
Reply
#2

I remember that, used to happen when cheaters teleport between vehicles without exiting the previous vehicle so the server still thinks they're on the old vehicle id and the OnPlayerStateChange never gets called, make sure u eject the player.
Reply
#3

Quote:
Originally Posted by RogueDrifter
Посмотреть сообщение
I remember that, used to happen when cheaters teleport between vehicles without exiting the previous vehicle so the server still thinks they're on the old vehicle id and the OnPlayerStateChange never gets called, make sure u eject the player.
Exactly however RemovePlayerFromVehicle(playerid); gets called before they are put in the new vehicle :/
Reply
#4

Quote:
Originally Posted by lNoobOnDutyl
Посмотреть сообщение
Exactly however RemovePlayerFromVehicle(playerid); gets called before they are put in the new vehicle :/
Oh that's confusing, wait i got 2 questions:
1- Did you try to see if it still happens after you re-stream the player in?
2- Did you try setting a timer to put the player back in the vehicle?
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)