/exit problem
#1

I got this problem that when I use /exit and are in a vehicle, the car and I and everyone in the cars get tped but the drivers get kicked from the car. So you have to get back in agian.

I dont get it what is bugged




Код:
	for(new h = 0; h < sizeof(EntranceInfo); h++)
				{
					if(IsPlayerInRangeOfPoint(playerid,EntranceInfo[h][EntranceExitRadius],EntranceInfo[h][EntranceInsideX],EntranceInfo[h][EntranceInsideY],EntranceInfo[h][EntranceInsideZ]))
					{
					    if(GetPlayerVirtualWorld(playerid) == EntranceInfo[h][EntranceVirtualWorld])
					    {
					        if (EntranceInfo[h][EntranceLocked]) return SendClientMessage(playerid, GREY, "This entrance is locked.");
					        if (EntranceInfo[h][EntranceTeleVeh] == 1)
					        {
						        new i = h;
						        new vehicleid;
						        new Seat[MAX_PLAYERS], InCar[MAX_PLAYERS];
	                            if(GetPlayerState(playerid) == 2)
						        {
									vehicleid = GetPlayerVehicleID(playerid);
									for(new j = 0; j < MAX_PLAYERS; j++)
									{
									    if(IsPlayerInVehicle(j, vehicleid))
									    {
									        InCar[j] = vehicleid;
									        Seat[j] = GetPlayerVehicleSeat(playerid);
									        SetPlayerInterior(j, EntranceInfo[i][EntranceExitInt]);
											SetPlayerVirtualWorld(j, EntranceInfo[i][EntranceExitVW]);
										}
									}
						            SetVehiclePos(vehicleid, EntranceInfo[h][EntranceEnterX],EntranceInfo[h][EntranceEnterY],EntranceInfo[h][EntranceEnterZ]);
						            SetVehicleZAngle(vehicleid, EntranceInfo[h][EntranceEnterA]);
						            SetVehicleWorld(vehicleid, EntranceInfo[i][EntranceExitVW]);
						            SetVehicleInterior(vehicleid, EntranceInfo[i][EntranceExitInt]);
								}
								SetPlayerFacingAngle(playerid, EntranceInfo[h][EntranceEnterA]);
								SetPlayerInterior(playerid, EntranceInfo[h][EntranceExitInt]);
								SetPlayerVirtualWorld(playerid, EntranceInfo[h][EntranceExitVW]);
								if(vehicleid != 0)
								{
				                    for (new j = 0; j < MAX_PLAYERS; j++)
									{
									    if (InCar[j] == 0) continue;
									    if (InCar[j] == vehicleid)
									    {
											PutPlayerInVehicle(j, vehicleid, Seat[j]);
										}
									}
									PutPlayerInVehicle(playerid, vehicleid, 0);
								}
							}
						
							SetPlayerFacingAngle(playerid, EntranceInfo[h][EntranceEnterA]);
							SetPlayerInterior(playerid, EntranceInfo[h][EntranceExitInt]);
							SetPlayerVirtualWorld(playerid, EntranceInfo[h][EntranceExitVW]);
   				 			SetCameraBehindPlayer(playerid);
							if (ObjectWaiting[playerid])
							{
							    ObjectWaiting[playerid] = 0;
							    KillTimer(ObjectWaitTimer[playerid]);
							    TogglePlayerControllable(playerid, 1);
							}
                            if (EntranceInfo[h][EntranceEnterWait])
                            {
                                ObjectWait(playerid, EntranceInfo[h][EntranceEnterX],EntranceInfo[h][EntranceEnterY],EntranceInfo[h][EntranceEnterZ]);
							}
							else
							{
							    SetPlayerPosEx(playerid, EntranceInfo[h][EntranceEnterX],EntranceInfo[h][EntranceEnterY],EntranceInfo[h][EntranceEnterZ]);
							}
						}
					}
				}
Reply
#2

bump
Reply
#3

You have a loop putting people back into their original seat ID, but you then call a function which puts everyone in the driver seat.

pawn Код:
PutPlayerInVehicle(playerid, vehicleid, 0);
Remove that and I believe your code will work.
Reply
#4

Quote:
Originally Posted by RealCop228
Посмотреть сообщение
You have a loop putting people back into their original seat ID, but you then call a function which puts everyone in the driver seat.

pawn Код:
PutPlayerInVehicle(playerid, vehicleid, 0);
Remove that and I believe your code will work.

Dint worke
Reply
#5

SOLVED
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)