Police only...
#1

Alright i made the system so only the police skins can enter the police cars, But it does not work,
The Enum
pawn Code:
enum TeamCars
{
    Police
}

new Cars[TeamCars];
new Skins[TeamCars];
Checks the skin and car models
pawn Code:
public OnPlayerStateChange(playerid, newstate, oldstate)
{
    if(GetVehicleModel(GetPlayerVehicleID(playerid)) == Cars[Police])
    {
    if(GetPlayerSkin(playerid) == Skins[Police])
    {
    SendClientMessage(playerid, 0x33FF33AA,"You have entered a Police vehicle");
    }
    else
    {
    RemovePlayerFromVehicle(playerid);
    SendClientMessage(playerid, 0xFF0000AA,"Error: you do not have the keys for this vehicle!");
    return 1;
    }
    }
    return 1;
}
PD Skins
pawn Code:
Skins[Police] = AddPlayerClass(280,1544.4233,-1673.0183,13.5584,87.1245,0,0,0,0,0,0);
    Skins[Police] = AddPlayerClass(281,1544.4233,-1673.0183,13.5584,87.1245,0,0,0,0,0,0);
    Skins[Police] = AddPlayerClass(282,1544.4233,-1673.0183,13.5584,87.1245,0,0,0,0,0,0);
    Skins[Police] = AddPlayerClass(283,1544.4233,-1673.0183,13.5584,87.1245,0,0,0,0,0,0);
    Skins[Police] = AddPlayerClass(284,1544.4233,-1673.0183,13.5584,87.1245,0,0,0,0,0,0);
Some of the PD Cars
pawn Code:
Cars[Police] = CreateVehicle(596,1601.06665039,-1692.17382812,5.46062469,91.29089355,-1,-1,15); //Police Car (LSPD)
    Cars[Police] = CreateVehicle(596,1601.45349121,-1687.62915039,5.46062469,89.30590820,-1,-1,15); //Police Car (LSPD)
    Cars[Police] = CreateVehicle(596,1601.17285156,-1684.14086914,5.46062469,89.30236816,-1,-1,15); //Police Car (LSPD)
    Cars[Police] = CreateVehicle(427,1530.66174316,-1644.98913574,6.13862514,179.47515869,-1,1,15); //Enforcer
    Cars[Police] = CreateVehicle(427,1534.38708496,-1645.19458008,6.13862514,179.47265625,-1,-1,15); //Enforcer
    Cars[Police] = CreateVehicle(601,1526.62500000,-1646.62597656,5.82083368,0.00000000,-1,-1,15); //S.W.A.T. Van
    Cars[Police] = CreateVehicle(599,1538.96801758,-1646.31713867,6.27575159,0.00000000,-1,1,15); //Police Ranger
    Cars[Police] = CreateVehicle(490,1543.90966797,-1651.23962402,6.21075153,89.32434082,-1,-1,15); //FBI Rancher
    Cars[Police] = CreateVehicle(411,1544.61230469,-1655.26037598,5.69062471,89.32434082,1,1,15); //Infernus
    Cars[Police] = CreateVehicle(541,1544.73278809,-1659.18371582,5.59062481,89.33935547,1,1,15); //Bullet
    Cars[Police] = CreateVehicle(415,1544.80761719,-1663.22778320,5.69014645,89.74975586,1,1,15); //Cheetah
    Cars[Police] = CreateVehicle(490,1544.37280273,-1668.03149414,6.21075153,89.32434082,-1,-1,15); //FBI Rancher
Reply


Messages In This Thread
Police only... - by Luis- - 06.08.2010, 21:06
Re: Police only... - by KennethRandall - 06.08.2010, 21:14
Re: Police only... - by JaTochNietDan - 06.08.2010, 21:16
Re: Police only... - by Luis- - 06.08.2010, 21:35
Re: Police only... - by Kar - 06.08.2010, 21:47
Re: Police only... - by Jacks - 07.08.2010, 03:27

Forum Jump:


Users browsing this thread: 1 Guest(s)