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;
}
}
|
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 :/
|