SA-MP Forums Archive
a problem[REP+] - 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: a problem[REP+] (/showthread.php?tid=565561)



a problem[REP+] - Antoniohl - 28.02.2015

When you're near your Garage and you've entered it it works fine but if there's someone in the passenger seat he'll be in another Virtual World How to fix it, so both can teleport in the same virtual world

Код:
if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
{
	new tmpcar = GetPlayerVehicleID(playerid);
	if(IsPlayerInVehicle(playerid, tmpcar))
	{
	        LoadObject(playerid);
   		SetPlayerPos(playerid,InfoGarage[idx][gInteriorX],InfoGarage[idx][gInteriorY],InfoGarage[idx][gInteriorZ]);
		SetPlayerVirtualWorld(playerid, idx+10);
		SetPlayerInterior(playerid,0);
		SetPlayerFacingAngle(playerid,InfoGarage[idx][gInteriorA]);
		SetTimerEx("VehicleMan",1000,false,"i", playerid);
		format(string, sizeof(string), "* Welcome, %s - Type /park , to park your vehicle - (To get out type /exit) **", PlayerName(playerid));
		SendClientMessage(playerid, COLOR_BLANCO, string);
		return 1;
	}
}



Re: a problem[REP+] - Antoniohl - 28.02.2015

EDIT:Thanks, works with another change