enter/exit garage help
#1

PHP код:
CMD:entergarage(playeridparams[])
    if(
IsPlayerInRangeOfPoint(playerid5.0265.9687,115.3523,1004.6172))
    {
        
oldvw[playerid] = GetPlayerVirtualWorld(playerid);
        
SetPlayerPos(playerid1568.6774,-1689.9703,6.2188);
        
SetPlayerInterior(playerid0);
        
SetPlayerVirtualWorld(playerid0);
    }
    
//SFPD Garage
    
if(IsPlayerInRangeOfPoint(playerid5.0, -1631.3282,683.6899,6.9591))
    {
        if(
PlayerInfo[playerid][pFaction] == 2)
        {
            new 
veh GetPlayerVehicleID(playerid), cseat GetPlayerVehicleSeat(playerid), incar IsPlayerInAnyVehicle(playerid);
            
SetPlayerPos(playerid1590.1838,-1646.0953,11.6225);
            
SetPlayerInterior(playerid0);
               
SetPlayerVirtualWorld(playerid0);
            
SetPlayerFacingAngle(playerid200.2718);
            if(
incar == true && cseat == 0)
            {
                
SetVehiclePos(veh1590.1838,-1646.0953,11.6225);
                
PutPlayerInVehicle(playeridveh0);
            }
            else if(
cseat == || cseat == || cseat == 3) return SCM(playeridCOLOR_LIGHTRED"Error: You are not the driver of this vehicle!");
        }
        else if(
PlayerInfo[playerid][pFaction] != 2) return printf("[server] %s has attempted to enter the PD garage!"GetName(playerid));
    }
    return 
1;
}
CMD:exitgarage(playeridparams[])
{
    if(
IsPlayerInRangeOfPoint(playerid2.01568.7365,-1689.9713,6.2188))
    {
        
SetPlayerPos(playerid265.9687,115.3523,1004.6172);
        
SetPlayerInterior(playerid10);
        
SetPlayerVirtualWorld(playerid5);
    }
    
//SFPD Garage
    
if(IsPlayerInRangeOfPoint(playerid5.01590.1838,-1646.0953,11.6225))
    {
        if(
PlayerInfo[playerid][pFaction] == 2)
        {
            
/*if(IsPlayerInAnyVehicle(playerid) == true && GetPlayerVehicleSeat(playerid) == 0)
            {
                new veh = GetPlayerVehicleID(playerid);
                SetPlayerPos(playerid, -1631.3282,683.6899,6.9591);
                SetVehiclePos(veh, -1631.3282,683.6899,6.9591);
                SetPlayerInterior(playerid, 0);
                   SetPlayerVirtualWorld(playerid, 0);
                SetPlayerFacingAngle(playerid, 90)
                PutPlayerInVehicle(playerid, veh, 0);
            }
            else if(IsPlayerInAnyVehicle(playerid) == true && GetPlayerVehicleSeat(playerid) != 0) return SCM(playerid, COLOR_LIGHTRED, "Error: You are not the driver of this vehicle!");
            else if(IsPlayerInAnyVehicle(playerid) == false)
            {
                SetPlayerPos(playerid, -1631.3282,683.6899,6.9591);
                SetPlayerInterior(playerid, 0);
                SetPlayerFacingAngle(playerid, 90)
                   SetPlayerVirtualWorld(playerid, 0);
            }*/
                
new veh GetPlayerVehicleID(playerid), cseat GetPlayerVehicleSeat(playerid), incar IsPlayerInAnyVehicle(playerid);
                
SetPlayerPos(playerid, -1631.3282,683.6899,6.9591);
                
SetPlayerInterior(playerid0);
                   
SetPlayerVirtualWorld(playerid0);
                
SetPlayerFacingAngle(playerid90);
                if(
incar == true && cseat == 0)
                {
                    
SetVehiclePos(veh, -1631.3282,683.6899,6.9591);
                    
PutPlayerInVehicle(playeridveh0);
                }
                else if(
cseat == || cseat == || cseat == 3) return SCM(playeridCOLOR_LIGHTRED"Error: You are not the driver of this vehicle!");
        }
        else if(
PlayerInfo[playerid][pFaction] != 2) return printf("[server] %s has attempted to enter the PD garage!"GetName(playerid));
    }
    return 
1;

What's the issue with this code that is making my pawno compiler crash.

NOTE: the code that has been marked out was removed because i tried to do this the other way that wasn't marked out
Reply


Messages In This Thread
enter/exit garage help - by xLucy - 10.09.2017, 11:29
Re: enter/exit garage help - by Kane - 10.09.2017, 11:31
Re: enter/exit garage help - by xLucy - 10.09.2017, 11:32
Re: enter/exit garage help - by Kane - 10.09.2017, 11:34
Re: enter/exit garage help - by JasonRiggs - 10.09.2017, 11:34
Re: enter/exit garage help - by xLucy - 10.09.2017, 11:37
Re: enter/exit garage help - by Kane - 10.09.2017, 11:39
Re: enter/exit garage help - by xLucy - 10.09.2017, 11:40
Re: enter/exit garage help - by 10MIN - 10.09.2017, 11:41
Re: enter/exit garage help - by xLucy - 10.09.2017, 11:43

Forum Jump:


Users browsing this thread: 2 Guest(s)