Problem with gTeam-Cars
#6

There. It should work.

At the top of your script, put:
pawn Код:
new LSPD1,LSPD2,LSPD3;
I did it for each car.
pawn Код:
LSPD1 = AddStaticVehicle(596,1535.7490,-1668.1628,13.1043,359.4030,0,1);
LSPD2 = AddStaticVehicle(596,1535.8396,-1677.4053,13.1056,180.1512,0,1);
LSPD3 = AddStaticVehicle(596,1601.7650,-1683.9963,5.6129,89.1848,0,1);


public OnPlayerStateChange(playerid, newstate, oldstate)
{
    if(newstate == 2)
    {
    new CarCheck = GetPlayerVehicleID(playerid);
    if(CarCheck == LSPD1 && gTeam[playerid] != 1)
    {
    RemovePlayerFromVehicle(playerid);
    SendClientMessage(playerid, FARBE_ROT, "You have no keys!");
    }
    }
    if(newstate == 2)
    {
    new CarCheck = GetPlayerVehicleID(playerid);
    if(CarCheck == LSPD2 && gTeam[playerid] != 1)
    {
    RemovePlayerFromVehicle(playerid);
    SendClientMessage(playerid, FARBE_ROT, "You have no keys!");
    }
    }
    if(newstate == 2)
    {
    new CarCheck = GetPlayerVehicleID(playerid);
    if(CarCheck == LSPD3 && gTeam[playerid] != 1)
    {
    RemovePlayerFromVehicle(playerid);
    SendClientMessage(playerid, FARBE_ROT, "You have no keys!");
    }
    }
    return 1;
}
But the way u had it was that :
Cars[LSPD] would equal to LSPD1 and LSPD2 and LSPD3, and it did not make any sense.
Reply


Messages In This Thread
Problem with gTeam-Cars - by mel~vin - 05.11.2010, 23:31
Re: Problem with gTeam-Cars - by blackwave - 06.11.2010, 00:33
Re: Problem with gTeam-Cars - by mel~vin - 06.11.2010, 00:49
Re: Problem with gTeam-Cars - by Moglizorz. - 06.11.2010, 01:09
Re: Problem with gTeam-Cars - by mel~vin - 06.11.2010, 01:11
Re: Problem with gTeam-Cars - by Tee - 06.11.2010, 01:28
Re: Problem with gTeam-Cars - by mel~vin - 06.11.2010, 01:42
Re: Problem with gTeam-Cars - by Tee - 06.11.2010, 01:50
Re: Problem with gTeam-Cars - by mel~vin - 06.11.2010, 01:59

Forum Jump:


Users browsing this thread: 3 Guest(s)