Sziasztok átediteltem egy modot de nem tudom azt megoldani hogy a frakcio jarmuvekbe csak a hozzávaló frakciosok tudjanak beszálni kérlek segitsetek!
Szerintem itt lehet a hiba:
//-----------------------------
public PolgiKocsik(carid) //polgármester
{
if((carid >= 1) && (carid <= 6))
{
return 1;
}
return 0;
}
public RendorKocsik(carid) //rendõr
{
if((carid >= 7) && (carid <= 17))
{
return 1;
}
return 0;
}
public TekKocsik(carid) //Tek
{
if((carid >= 18) && (carid <= 30))
{
return 1;
}
return 0;
}
public FBIKocsik(carid) //FBI
{
if((carid >= 31) && (carid <= 32))
{
return 1;
}
return 0;
}
public IsAGangCar3(carid) //TSG
{
if((carid >= 33) && (carid <= 40))
{
return 1;
}
return 0;
}
public TuzoltoKocsik(carid) //tüzoltó
{
if((carid >= 41) && (carid <= 49))
{
return 1;
}
return 0;
}
public IsAnAmbulance(carid) //mentõ
{
if((carid >= 50) && (carid <= 56))
{
return 1;
}
return 0;
}
public IsATowcar(carid) //Szerelõ
{
if((carid >= 57 && carid <= 60))
{
return 1;
}
return 0;
}
public HazaloKocsik(carid) //házaló
{
if((carid >= 61) && (carid <= 65))
{
return 1;
}
return 0;
}
public Cszallito(carid) //autószállító
{
if((carid >= 66) && (carid <= 73))
{
return 1;
}
return 0;
}
public IsAHarvest(carid) //postásbicó
{
if((carid >= 74) && (carid <= 77))
{
return 1;
}
return 0;
}
public Halaszhajo(carid) //Fuvarozó
{
if(carid == 78 || carid == 79 || carid == 80 || carid == 81)
{
return 1;
}
return 0;
}
public IsASweeper(carid) //úttisztító
{
if(carid >= 82 && carid <= 88)
{
return 1;
}
return 0;
}
public IsAGangCar(carid) //Grove
{
if(carid >= 89 && carid <= 97)
{
return 1;
}
return 0;
}
public IsAGangCar2(carid) //katona
{
if((carid >= 104 && carid <= 113))
{
return 1;
}
return 0;
}
public IsAkemenyseper(carid) //kéményseprõ
{
if(carid == 114 || carid == 115 || carid == 116 || carid == 117 || carid == 118)
{
return 1;
}
return 0;
}
public IsAradio(carid) //rádió
{
if(carid == 119 || carid == 120 || carid == 121 || carid == 122)
{
return 1;
}
return 0;
}
public IsAtaxi(carid) //taxi
{
if(carid == 129 || carid == 126 || carid == 128 || carid == 124 || carid == 125 || carid == 123)
{
return 1;
}
return 0;
}
public IsAvillany(carid) //villanyszerelõ
{
if((carid == 130 || carid == 131 || carid == 132 || carid == 133))
{
return 1;
}
return 0;
}
public NavKocsik(carid) //NAV
{
if((carid >= 136 && carid <= 146))
{
return 1;
}
return 0;
}
public IsAPlane(carid) //sz*r
{
if((carid >= 146 && carid <= 150))
{
return 1;
}
return 0;
}
public IsATruck(carid) //sz*r
{
if((carid >= 151 && carid <= 191))
{
return 1;
}
return 0;
}
public PizzasMocik(carid) //Pizzásmocik
{
if((carid >= 98 && carid <= 103))
{
return 1;
}
return 0;
}
public IsAOBike(carid)
{
if((carid >= 192 && carid <= 197))
{
return 1;
}
return 0;
}
/*
public IsAGangCar4(carid)
{
if(carid >= 155 && carid <= 159)
{
return 1;
}
return 0;
}
public IsAGangCar5(carid)
{
if(carid >= 168 && carid <= 171)
{
return 1;
}
return 0;
}*/
/*public IsASmuggleCar(carid)
{
if(carid == 163 || carid == 164 || carid == 165)
{
return 1;
}
return 0;
}*/
public IsATank(carid)
{
if(carid==198)
{
return 1;
}
return 0;
}
public IsABike(carid)
{
if(carid==199)
{
return 1;
}
return 0;
}
public DenKocsi(carid) //vége
{
if((carid == 200))
{
return 1;
}
return 0; }
Vagy Itt:
if(IsAkemenyseper(newcar))
{
if(PlayerInfo[playerid][pJob] == 30 || Admin(playerid, 4)) { }
else {
RemovePlayerFromVehicle(playerid);
SendClientMessage(playerid, COLOR_GREY,\"Nincs kulcsod ehhez a jármûhöz.\");}
}
if(IsAradio(newcar))
{
if(PlayerInfo[playerid][pLeader] == 9 || PlayerInfo[playerid][pMember] == 9 || Admin(playerid, 4)) { }
else { RemovePlayerFromVehicle(playerid); }
}
if(IsAtaxi(newcar))
{
if(PlayerInfo[playerid][pLeader] == 10 || PlayerInfo[playerid][pMember] == 10 || Admin(playerid, 4)) { }
else { RemovePlayerFromVehicle(playerid); }
}
if(IsAvillany(newcar))
{
if(PlayerInfo[playerid][pJob] == 14 || Admin(playerid, 4)) { }
else {
RemovePlayerFromVehicle(playerid);
SendClientMessage(playerid, COLOR_GREY,\"Nincs kulcsod ehhez a jármûhöz.\");}
}
if(PolgiKocsik(newcar))
{
if(PlayerInfo[playerid][pJob] == 27 || PlayerInfo[playerid][pJob] == 28 || PlayerInfo[playerid][pLeader] == 7 || Admin(playerid, 4)) { }
else {
RemovePlayerFromVehicle(playerid);
SendClientMessage(playerid, COLOR_GREY,\"Nincs kulcsod ehhez a jármûhöz.\");}
}
if(TuzoltoKocsik(newcar))
{
if(PlayerInfo[playerid][pLeader] == 2 ||PlayerInfo[playerid][pMember] == 2 || Admin(playerid, 4)) { }
else {
RemovePlayerFromVehicle(playerid);
SendClientMessage(playerid, COLOR_GREY,\"Nem vagy tûzoltó\");}
}
else if(IsAnAmbulance(newcar))
{
if(PlayerInfo[playerid][pMember] == 4||PlayerInfo[playerid][pLeader] == 4 || Admin(playerid, 4)) { }
else { RemovePlayerFromVehicle(playerid); SendClientMessage(playerid, COLOR_GREY,\"Nincs kulcsod ehhez a jármûhöz.\"); }
}
if(Cszallito(newcar))
{
if(PlayerInfo[playerid][pJob] == 25 || Admin(playerid, 4)) { }
else {
RemovePlayerFromVehicle(playerid);
SendClientMessage(playerid, COLOR_GREY,\"Nem vagy Cementszállító!\");}
}
if(PizzasMocik(newcar))
{
if(PlayerInfo[playerid][pJob] == 26 || Admin(playerid, 4)) { }
else {
RemovePlayerFromVehicle(playerid);
SendClientMessage(playerid, COLOR_GREY,\"Nem vagy Pizzás!\");}
}
if(IsAGangCar(newcar))
{
if(PlayerInfo[playerid][szervLeader] == 1||PlayerInfo[playerid][szervTag] == 1 || Admin(playerid, 4)) { }
else {
RemovePlayerFromVehicle(playerid);
SendClientMessage(playerid, COLOR_GREY,\"Nincs kulcsod ehhez a jármûhöz.\");}
}
if(IsAGangCar2(newcar))
{
if(PlayerInfo[playerid][szervLeader] == 2 || PlayerInfo[playerid][szervTag] == 2 || Admin(playerid, 4)) { }
else {
RemovePlayerFromVehicle(playerid);
SendClientMessage(playerid, COLOR_GREY,\"Nincs kulcsod ehhez a jármûhöz.\");}
}
if(IsATank(newcar))
{
if(PlayerInfo[playerid][pLeader] == 1||PlayerInfo[playerid][pLeader] == 3 || Admin(playerid, 4)) { }
else { RemovePlayerFromVehicle(playerid); }
}
if(IsAGangCar3(newcar))
{
if(PlayerInfo[playerid][szervLeader] == 3 || PlayerInfo[playerid][szervTag] == 3 || Admin(playerid, 4)) { }
else {
RemovePlayerFromVehicle(playerid);
SendClientMessage(playerid, COLOR_GREY,\"Nincs kulcsod ehhez a jármûhöz.\");}
}
if(TekKocsik(newcar))
{
if(PlayerInfo[playerid][szervLeader] == 4 || PlayerInfo[playerid][szervTag] == 4 || Admin(playerid, 4)) { }
else {
RemovePlayerFromVehicle(playerid);
SendClientMessage(playerid, COLOR_GREY,\"Nincs kulcsod ehhez a jármûhöz.\");}
}
if(NavKocsik(newcar))
{
if(PlayerInfo[playerid][pLeader] == 6||PlayerInfo[playerid][pMember] == 6 || Admin(playerid, 4)) { }
else {
RemovePlayerFromVehicle(playerid);
SendClientMessage(playerid, COLOR_GREY,\"Nincs kulcsod ehhez a jármûhöz.\");}
}
/*if(IsAGangCar4(newcar))
{
if(PlayerInfo[playerid][pLeader] == 15||PlayerInfo[playerid][pMember] == 15) { }
else {
RemovePlayerFromVehicle(playerid);
SendClientMessage(playerid, COLOR_GREY,\"You don\'t have keys of this vehicle.\");}
}
if(IsAGangCar5(newcar))
{
if(PlayerInfo[playerid][pLeader] == 16||PlayerInfo[playerid][pMember] == 16) { }
else {
RemovePlayerFromVehicle(playerid);
SendClientMessage(playerid, COLOR_GREY,\"You don\'t have keys of this vehicle.\");}
}*/
if(IsATowcar(newcar))
{
if(PlayerInfo[playerid][pLeader] == 17 || PlayerInfo[playerid][pMember] == 17 || Admin(playerid, 4)) { }
else {
RemovePlayerFromVehicle(playerid);
SendClientMessage(playerid, COLOR_GREY,\"Nincs kulcsod ehhez a jármûhöz.\");}
}
if(IsATruck(newcar))
{
if(PlayerInfo[playerid][pJob] == 16 || Admin(playerid, 4))
{
format(string, sizeof(string), \"Products: %d/%d\", PlayerHaul[newcar][pLoad],PlayerHaul[newcar][pCapasity]);
SendClientMessage(playerid, TEAM_GROVE_COLOR, string);
SendClientMessage(playerid, COLOR_WHITE, \"INFO: You can deliver Products to Businesses.\");
SendClientMessage(playerid, COLOR_WHITE, \"INFO: Commands are /load /buyprods /sellprods\");
}
else
{
RemovePlayerFromVehicle(playerid);
SendClientMessage(playerid, COLOR_GREY,\"Nincs kulcsod ehhez a jármûhöz.\");
}
}
if(Cszallito(newcar))
{
if(PlayerInfo[playerid][pJob] == 25 || Admin(playerid, 4))
{
Cszallitas[playerid] = 1;
SendClientMessage(playerid, COLOR_YELLOW,\"Elkezdtél dolgozni.\");
new rnd = random(sizeof(CementFelvevo));
SetPlayerCheckpoint(playerid,CementFelvevo[rnd][0],CementFelvevo[rnd][1],CementFelvevo[rnd][2],2);
}
else
{
RemovePlayerFromVehicle(playerid); SendClientMessage(playerid, COLOR_GRAD2,\"Nem vagy Autószállító!\");
}
}
if(PizzasMocik(newcar))
{
if(PlayerInfo[playerid][pJob] == 26 || Admin(playerid, 4))
{
Pszallitas[playerid] = 1;
SendClientMessage(playerid, COLOR_YELLOW,\"Elkezdtél dolgozni.\");
SetPlayerCheckpoint(playerid,-174.4585,2669.2625,64.0605,3.8926);
}
else
{
RemovePlayerFromVehicle(playerid); SendClientMessage(playerid, COLOR_GRAD2,\"Nem vagy Pizzás!\");
}
}
if(IsASweeper(newcar))
{
if(PlayerInfo[playerid][pJob] == 21 || Admin(playerid, 4))
{
if(PlayerIsSweeping[playerid] == 0)
{
/*TogglePlayerControllable(playerid, 0);
GameTextForPlayer(playerid, \"~g~/tisztítás ~w~ha dolgozni szeretnél, ha nem ~r~/ki\", 5000, 3);*/
PlayerIsSweeping[playerid] = 1;
TogglePlayerControllable(playerid, 1);
new randomize;
randomize = random(sizeof(gSweeperPoints));
SetPlayerCheckpoint(playerid, gSweeperPoints[randomize][0], gSweeperPoints[randomize][1], gSweeperPoints[randomize][2], 5.0);
SendClientMessage(playerid, COLOR_YELLOW, \"Elkezdted az utak és a járdák tisztítását. Menny a piros checkpointokba és kapsz pénzt és XP-t!\");
SendClientMessage(playerid, COLOR_YELLOW, \"Ha abba szeretnéd hagyni a munkát vidd vissza a kocsit a helyére!\");
}
else
{
//SendClientMessage(playerid, COLOR_WHITE, \"Ha nem akarsz dolgozni /tisztításvége\");
}
}
else
{
RemovePlayerFromVehicle(playerid);
SendClientMessage(playerid, COLOR_GREY,\"Nem vagy Úttisztító.\");
}
}
if(HazaloKocsik(newcar))
{
if(PlayerInfo[playerid][pJob] == 29 || Admin(playerid, 4))
{
Hazalas[playerid] = 1;
TogglePlayerControllable(playerid, 1);
new randomize;
randomize = random(sizeof(HazalasCP));
SetPlayerCheckpoint(playerid, HazalasCP[randomize][0], HazalasCP[randomize][1], HazalasCP[randomize][2], 5.0);
SendClientMessage(playerid, COLOR_YELLOW, \"Elkezdted a házalást!\");
SendClientMessage(playerid, COLOR_YELLOW, \"Ha abba szeretnéd hagyni a munkát vidd vissza a kocsit a helyére!\");
}
else
{
RemovePlayerFromVehicle(playerid);
SendClientMessage(playerid, COLOR_GREY,\"Nem vagy Házaló.\");
}
}
if(newcar >= 134 && newcar <= 135) // vizsgakocsi
{
if(PlayerInfo[playerid][vizsgazik] == 1 || Admin(playerid, 4))
{
}
else
{
SendClientMessage(playerid, COLOR_GRAD2, \"Csak ha vizsgázol akkor használhatod!\");
RemovePlayerFromVehicle(playerid);
}
}
if(newcar == 114 || newcar == 117 || newcar == 118 || newcar == 114 || newcar == 115)
{
if(PlayerInfo[playerid][pJob] == 30 || Admin(playerid, 4))
{
}
else
{
SendClientMessage(playerid, COLOR_GRAD2, \"Nem vagy kéményseprõ!\");
RemovePlayerFromVehicle(playerid);
}
}
if(newcar == 0)
{
SendClientMessage(playerid,COLOR_GREY,\" (( Flying Test is currently disabled )) \");
RemovePlayerFromVehicle(playerid);
}
if(newcar == 55)
{
if(PlayerInfo[playerid][pMember] == 4 || Admin(playerid, 4)) { }
else
{
SendClientMessage(playerid,COLOR_GREY,\"Nincs kulcsod ehhez a jármûhöz!\");
RemovePlayerFromVehicle(playerid);
}
}
if(newcar == 38)
{
if(PlayerInfo[playerid][pRank] >= 3 || Admin(playerid, 4)) { }
else
{
SendClientMessage(playerid,COLOR_GREY,\" You must be Rank 3 atleast to fly this !\");
RemovePlayerFromVehicle(playerid);
}
}
if(newcar >= 123 && newcar <= 129)
{
if(PlayerInfo[playerid][pMember] == 10 || PlayerInfo[playerid][pLeader] == 10 || Admin(playerid, 4)) { }
else
{
SendClientMessage(playerid,COLOR_GREY,\"Nincs kulcsod ehhez a jármûhöz!\");
RemovePlayerFromVehicle(playerid);
}
}
if(newcar >= 119 && newcar <= 122)
{
if(PlayerInfo[playerid][pMember] == 9 || PlayerInfo[playerid][pLeader] == 9 || Admin(playerid, 4)){ }
else
{
SendClientMessage(playerid, COLOR_GREY, \"Nincs kulcsod ehhez a jármûhöz!\");
RemovePlayerFromVehicle(playerid);
}
}
if(IsAHarvest(newcar))
{
if(PlayerInfo[playerid][pJob] == 18 || Admin(playerid, 4))
{
if(Postazas[playerid] == 0)
{
SetPlayerCheckpoint(playerid, -248.6299,2718.6763,62.6875, 3.0);
SendClientMessage(playerid, COLOR_YELLOW, \"Elkezdtél dolgozni.\");
Postazas[playerid] = 1;
}
else { }
}
else
{
SendClientMessage(playerid, COLOR_GREY, \"Nem vagy Postás!\");
RemovePlayerFromVehicle(playerid);
}
}
if(Halaszhajo(newcar))
{
if(PlayerInfo[playerid][pJob] == 19 || Admin(playerid, 4))
{
Halaszas[playerid] = 1;
//OnPlayerEnterCheckpoint(playerid);
SendClientMessage(playerid, COLOR_YELLOW,\"Menj a kijelölt helyre, hogy elkezd a munkát!\");
new rnd = random(sizeof(HalaszCP));
SetPlayerCheckpoint(playerid,HalaszCP[rnd][0],HalaszCP[rnd][1],HalaszCP[rnd][2],5.0);
}
else
{
SendClientMessage(playerid, COLOR_GREY, \"Nem vagy Bútorszálító!\");
RemovePlayerFromVehicle(playerid);
}
}
Én már végignéztem de nem találtam semmit.
vagy lehet hogy igy kéne?
if(ElnokiKocsik(newcar))
{
if(PlayerInfo[playerid][pJob] == 27 || PlayerInfo[playerid][pJob] == 28 || PlayerInfo[playerid][pLeader] == 7 || Admin(playerid, 10)) { }
else {
SendClientMessage(playerid, COLOR_GREY,\"Nincs kulcsod ehhez a jármûhöz.\");}
RemovePlayerFromVehicle(playerid);
}
Elõre is köszönöm.