Can't enter PD as passanger and non PD
#1

When i want to enter the PD vehicle, it automatically doesn't let it.
Admins can but normal players can't.

I want that everyone can enter a PD vehicle, unless locked ofc.

Is there something in these lines preventing it?

Thx in Advance
PHP код:
public OnPlayerEnterVehicle(playeridvehicleidispassenger)
{
    new 
string[128];
    if(
VehicleLocked[vehicleid])
    {
        new 
Float:playerposxFloat:playerposyFloat:playerposz;
        
GetPlayerPos(playeridplayerposxplayerposyplayerposz);
        if(
PlayerInfo[playerid][pAdmin] == 0)
        {
            
SetPlayerPos(playerid,playerposxplayerposyplayerposz);
        }
        
SendClientMessage(playerid,COLOR_WHITE,"[VEHICLE:] Vehicle Locked.");
    }
     if(
DynamicCars[vehicleid-1][CarType] == 1)
    {
        if(
TakingDrivingTest[playerid] != 1)
        {
            new 
Float:playerposxFloat:playerposyFloat:playerposz;
            
GetPlayerPos(playeridplayerposxplayerposyplayerposz);
            if(
PlayerInfo[playerid][pAdmin] == 0)
            {
                   
SetPlayerPos(playerid,playerposxplayerposyplayerposz);
            }
            
SendClientMessage(playerid,COLOR_WHITE,"[ERROR:] Your not taking your driving test!");
        }
    }
     if(
DynamicCars[vehicleid-1][FactionCar] != 255)
    {
        if(
DynamicFactions[DynamicCars[vehicleid-1][FactionCar]][fType] == 1)
        {
            if(
PlayerInfo[playerid][pFaction] != DynamicCars[vehicleid-1][FactionCar])
            {
                new 
Float:playerposxFloat:playerposyFloat:playerposz;
                
GetPlayerPos(playeridplayerposxplayerposyplayerposz);
                if(
PlayerInfo[playerid][pAdmin] == 0)
                {
                    
SetPlayerPos(playerid,playerposxplayerposyplayerposz);
                }
                
format(stringsizeof(string), "[LSPD:] %s has been spotted attempting to steal a police vehicle."GetPlayerNameEx(playerid));
                
SendFactionTypeMessage(1,COLOR_LSPD,string);
                new 
location[MAX_ZONE_NAME];
                
GetPlayer2DZone(playeridlocationMAX_ZONE_NAME);
                
format(stringsizeof(string), "[LSPD:] All units be on the lookout for %s - Person Last Seen: %s."GetPlayerNameEx(playerid),location);
                
SendClientMessage(playerid,COLOR_LIGHTYELLOW2,"[VEHICLE:] You have been spotted attempting to steal a police vehicle!");
            }
        }
        
format(stringsizeof(string), "[FACTION:] This vehicle belongs to %s.",DynamicFactions[DynamicCars[vehicleid-1][FactionCar]][fName]);
        
SendClientMessage(playerid,COLOR_WHITEstring);
    } 
Reply


Messages In This Thread
Can't enter PD as passanger and non PD - by remyguys - 03.12.2011, 12:44
Re: Can't enter PD as passanger and non PD - by nuriel8833 - 03.12.2011, 13:30
Re: Can't enter PD as passanger and non PD - by remyguys - 04.12.2011, 08:17

Forum Jump:


Users browsing this thread: 1 Guest(s)