SA-MP Forums Archive
0.3x Interior Problem - 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)
+--- Thread: 0.3x Interior Problem (/showthread.php?tid=413308)



0.3x Interior Problem - Evoturk - 04.02.2013

When I'm passenger and Vehicle's driver enter and exit tuning garage, my interior stays in garage's interior.


Re: 0.3x Interior Problem - Amora187 - 04.02.2013

Maybe you can fix it with this:
pawn Код:
public OnEnterExitModShop(playerid, enterexit, interiorid)
{

new vid=GetPlayerVehicleID(playerid);
for(new i; i<MAX_PLAYERS; i++)
{
if(IsPlayerInVehicle(i,vid))
{
if(GetPlayerSeat(i)==0)
{
new int=GetPlayerInterior(i);
SetPlayerInterior(playerid,int);
}
}
}



Re: 0.3x Interior Problem - OKStyle - 05.02.2013

How you can set interior if player already have interior? May be set interior 0?


Re: 0.3x Interior Problem - GreenHammy - 05.02.2013

change the script to say for instead


Re: 0.3x Interior Problem - Evoturk - 05.02.2013

Quote:
Originally Posted by Amora187
Посмотреть сообщение
Maybe you can fix it with this:
pawn Код:
public OnEnterExitModShop(playerid, enterexit, interiorid)
{

new vid=GetPlayerVehicleID(playerid);
for(new i; i<MAX_PLAYERS; i++)
{
if(IsPlayerInVehicle(i,vid))
{
if(GetPlayerSeat(i)==0)
{
new int=GetPlayerInterior(i);
SetPlayerInterior(playerid,int);
}
}
}
It is solution we can make but SA:MP developers should solve this problem in 0.3x. It doesn't happen in earlier SA:MP versions.


Re: 0.3x Interior Problem - T0pAz - 05.02.2013

Quote:
Originally Posted by Evoturk
Посмотреть сообщение
It is solution we can make but SA:MP developers should solve this problem in 0.3x. It doesn't happen in earlier SA:MP versions.
Solving Problem = Solution.


Re: 0.3x Interior Problem - Evoturk - 06.02.2013

Quote:
Originally Posted by T0pAz
Посмотреть сообщение
Solving Problem = Solution.
So clever...


Re: 0.3x Interior Problem - Alternative112 - 06.02.2013

Quote:
Originally Posted by Amora187
Посмотреть сообщение
Maybe you can fix it with this:
pawn Код:
public OnEnterExitModShop(playerid, enterexit, interiorid)
{

new vid=GetPlayerVehicleID(playerid);
for(new i; i<MAX_PLAYERS; i++)
{
if(IsPlayerInVehicle(i,vid))
{
if(GetPlayerSeat(i)==0)
{
new int=GetPlayerInterior(i);
SetPlayerInterior(playerid,int);
}
}
}
That code would set the driver's interior to his own interior, I don't see how that would help. You're looping through the players and if the person's driver seat is 0 (driver seat), you...get his interior and set the driver (playerid) to that interior.

Is something like this what you're looking for, Amora?

Код:
public OnEnterExitModShop(playerid, enterexit, interiorid) {
	new vid = GetPlayerVehicleID(playerid);
	for (new i; i < MAX_PLAYERS; i++) {
		if(IsPlayerInVehicle(i, vid) && GetPlayerVehicleSeat(i) > 0) {
			SetPlayerInterior(i, GetPlayerInterior(playerid));
		}
	}
	return 1;
}
Either way, this bug should be easily fixable with server-side scripts.