06.11.2010, 01:28
(
Последний раз редактировалось Tee; 06.11.2010 в 01:40.
)
There. It should work.
At the top of your script, put:
I did it for each car.
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.
At the top of your script, put:
pawn Код:
new LSPD1,LSPD2,LSPD3;
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;
}
Cars[LSPD] would equal to LSPD1 and LSPD2 and LSPD3, and it did not make any sense.