Enter in vehicle
#1

trying to make so i can enter with vehicle but wont work, mabye u guys can help me.

PHP код:
if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
    for(new 
0sizeof(GarageInfo); g++)
    {
        if(
IsPlayerInRangeOfPoint(playerid,3.0,GarageInfo[g][gEnterX],GarageInfo[g][gEnterY],GarageInfo[g][gEnterZ]))
        {
            if(
GetPlayerVirtualWorld(playerid) == GarageInfo[g][gEWorld] && GetPlayerInterior(playerid) == GarageInfo[g][gEInt])
            {
                if(
GarageInfo[g][gLocked] == 0)
                {
                    if(
GarageInfo[g][gOwned] == 0) return SendClientMessage(playeridCOLOR_GREY"You can't enter a un-owned garage.");
                     
LoadObjectsForPlayer(playerid);
                    
PlayerPlaySound(playerid10540.00.00.0);
                    
Streamer_UpdateEx(playeridGarageInfo[g][gExitX],GarageInfo[g][gExitY],GarageInfo[g][gExitZ], GarageInfo[g][gInterior]);
                    
SetPlayerPos(playerid,GarageInfo[g][gExitX],GarageInfo[g][gExitY],GarageInfo[g][gExitZ]);
                    
SetPlayerInterior(playerid,GarageInfo[g][gInterior]);
                    
SetPlayerVirtualWorld(playerid,g+100);
                    
LoadAreaPl(playerid1g);
                    
SetTimerEx("Streamer_Update"300false"i"playerid);
                     
SetVehiclePos(GetPlayerVehicleID(playerid),GarageInfo[g][gEnterX],GarageInfo[g][gEnterY],GarageInfo[g][gEnterZ]);
                 }
                 else 
SendClientMessage(playerid,COLOR_LIGHTRED,"Garage is locked.");
             }
        }
     } 
Reply
#2

You need LinkVehicleToInterior otherwise it will be invisible.
Reply
#3

Quote:
Originally Posted by Vince
Посмотреть сообщение
You need LinkVehicleToInterior otherwise it will be invisible.
I know but the vehicle are still outside when i use /enter
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)