06.08.2015, 19:06
Hai :D
Heb een klein probleempje met een roleplay script, ik probeer een paar extra faction vehicles te maken, maar zelfs mensen dat niet in die faction zitten kunnen er toch in, voor sommige factions werkt het (dat je alleen in de auto kan als je in de faction zelf zit) en voor sommige niet:
Hier het deeltje script dat erom gaat voor de faction vehicles voor een faction waarbij het NIET werkt(mensen kunnen gewoon in de autos):
En een deeltje code van een faction waarbij het wel werkt:
Kan iemand helpen? :S
Heb een klein probleempje met een roleplay script, ik probeer een paar extra faction vehicles te maken, maar zelfs mensen dat niet in die faction zitten kunnen er toch in, voor sommige factions werkt het (dat je alleen in de auto kan als je in de faction zelf zit) en voor sommige niet:
Hier het deeltje script dat erom gaat voor de faction vehicles voor een faction waarbij het NIET werkt(mensen kunnen gewoon in de autos):
Code:
stock IsSASDVehicle(vehicleid)
{
for(new i=0; i<14; i++)
{
if(vehicleid == FacInfo[8][fCars][i]) return 1;
}
return 0;
}
else if(IsSASDVehicle(vehicleid) && PlayerInfo[playerid][pFac] != 8)
{
new Float:pos[3];
GetPlayerPos(playerid, pos[0], pos[1], pos[2]);
SetPlayerPos(playerid, pos[0], pos[1], pos[2]);
SendClientMessage(playerid, COLOR_ORANGE, " You can't start the engine as it belongs to the San Andreas Sherrif Department.");
}
//SASD VEHICLES
FacInfo[8][fCars][0] = CreateVehicle(487, 616.6454, -552.5580, 23.1314, 89.3633, 61, 1, 0); // vehicle 1
FacInfo[8][fCars][1] = CreateVehicle(487, 611.0197, -566.1091, 26.2673, 94.3214, 61, 1, 0); // vehicle 2
FacInfo[8][fCars][2] = CreateVehicle(487, 621.1907, -577.5084, 26.1663, 94.3214, 61, 1, 0); // vehicle 3
FacInfo[8][fCars][3] = CreateVehicle(599, 622.6804, -610.4935, 17.2866, 271.9211, 61, 1, 0); // vehicle 4
FacInfo[8][fCars][4] = CreateVehicle(597, 621.9399, -606.4910, 16.9210, 272.0000, 61, 1, 0); // vehicle 5
FacInfo[8][fCars][5] = CreateVehicle(523, 610.4322, -596.3445, 16.7124, 273.0000, 61, 1, 0); // vehicle 6
FacInfo[8][fCars][6] = CreateVehicle(523, 610.4474, -598.9629, 16.7124, 273.0000, 61, 1, 0); // vehicle 7
FacInfo[8][fCars][7] = CreateVehicle(523, 614.2676, -596.0264, 16.7124, 273.0000, 61, 1, 0); // vehicle 8
FacInfo[8][fCars][8] = CreateVehicle(523, 614.0536, -598.6510, 16.7124, 273.0000, 61, 1, 0); // vehicle 9
FacInfo[8][fCars][9] = CreateVehicle(523, 610.5723, -600.7275, 16.7124, 273.0000, 61, 1, 0); // vehicle 10
FacInfo[8][fCars][10] = CreateVehicle(523, 614.1028, -601.0486, 16.7124, 273.0000, 61, 1, 0); // vehicle 11
FacInfo[8][fCars][11] = CreateVehicle(597,611.8312,-591.2856,16.9585,269.6648,61,1, 0); // vehicle 12
FacInfo[8][fCars][12] = CreateVehicle(597,611.8873,-587.7719,16.9536,269.0114,61,1, 0); // vehicle 13
FacInfo[8][fCars][13] = CreateVehicle(599,640.4861,-611.4233,16.3428,268.3296,61,1, 0); // vehicle 14
FacInfo[8][fCars][14] = CreateVehicle(599,640.3156,-606.3570,16.3445,272.2988,61,1, 0); // vehicle 15
En een deeltje code van een faction waarbij het wel werkt:
Code:
else if(IsLSFMDVehicle(vehicleid) && PlayerInfo[playerid][pFac] != 5)
{
new Float:pos[3];
GetPlayerPos(playerid, pos[0], pos[1], pos[2]);
SetPlayerPos(playerid, pos[0], pos[1], pos[2]);
SendClientMessage(playerid, COLOR_ORANGE, " You can't start the engine as it belongs to the LSFMD.");
}
stock IsLSFMDVehicle(vehicleid)
{
for(new i=0; i<20; i++)
{
if(vehicleid == FacInfo[5][fCars][i]) return 1;
}
return 0;
}
//LSFMD
FacInfo[5][fCars][0] = CreateVehicle(416,1124.0000000,-1329.1999512,13.5000000,0.0000000,255,0,0); //Ambulance
FacInfo[5][fCars][1] = CreateVehicle(416,1110.5999756,-1328.9000244,13.3999996,0.0000000,255,0,0); //Ambulance
FacInfo[5][fCars][2] = CreateVehicle(416,1097.4000244,-1329.0999756,13.5000000,0.0000000,255,0,0); //Ambulance
FacInfo[5][fCars][3] = CreateVehicle(416,1147.6999512,-1314.0999756,13.8000002,0.0000000,255,0,0); //Ambulance
FacInfo[5][fCars][4] = CreateVehicle(416,1135.4000244,-1340.6999512,13.8999996,0.0000000,255,0,0); //Ambulance
FacInfo[5][fCars][5] = CreateVehicle(416,1147.5999756,-1347.0000000,13.6999998,180.0000000,255,0,0); //Ambulance
FacInfo[5][fCars][6] = CreateVehicle(487,1161.5999756,-1310.0999756,31.7999992,268.0000000,255,0,0); //Maverick
FacInfo[5][fCars][7] = CreateVehicle(487,1162.0999756,-1296.8000488,31.7999992,270.0000000,255,0,0); //Maverick
FacInfo[5][fCars][8] = CreateVehicle(487,1161.4000244,-1322.0999756,31.7999992,268.0000000,255,0,0); //Maverick
FacInfo[5][fCars][9] = CreateVehicle(407,1217.6999512,-1332.8000488,13.8000002,90.0000000,255,0,0); //Firetruck
FacInfo[5][fCars][10] = CreateVehicle(407,1218.0000000,-1341.5999756,13.8000002,90.0000000,255,0,0); //Firetruck
FacInfo[5][fCars][11] = CreateVehicle(407,1218.0000000,-1350.0999756,13.6999998,90.0000000,255,0,0); //Firetruck
FacInfo[5][fCars][12] = CreateVehicle(407,1246.6999512,-1332.5999756,13.8000002,270.0000000,255,0,0); //Firetruck
FacInfo[5][fCars][13] = CreateVehicle(407,1246.8000488,-1341.0999756,13.8000002,270.0000000,255,0,0); //Firetruck
FacInfo[5][fCars][14] = CreateVehicle(407,1247.0000000,-1349.9000244,13.8000002,270.0000000,255,0,0); //Firetruck
FacInfo[5][fCars][15] = CreateVehicle(407,1232.3000488,-1315.8000488,14.3999996,90.0000000,255,0,0); //Firetruck
FacInfo[5][fCars][16] = CreateVehicle(407,1231.3000488,-1360.6999512,14.5000000,270.0000000,255,0,0); //Firetruck
FacInfo[5][fCars][17] = CreateVehicle(416,1178.0000000,-1338.6999512,13.8999996,270.0000000,255,0,0); //Ambulance
FacInfo[5][fCars][18] = CreateVehicle(416,1178.0999756,-1308.5000000,13.8999996,272.0000000,255,0,0); //Ambulance
FacInfo[5][fCars][19] = CreateVehicle(487,1231.4000244,-1334.1999512,27.5000000,90.0000000,255,0,0); //Maverick
FacInfo[5][fCars][20] = CreateVehicle(487,1232.0000000,-1348.8000488,27.5000000,90.0000000,255,0,0); //Maverick
Kan iemand helpen? :S