Jump to content

[REZOLVAT] [Problema] Factions vehicles


szIonut
 Share

Recommended Posts

Username: szIonut
Problema întălnită: Cand folosesc /sfv sa spawnez o masina de la factiune merge totul bine, dar dupa un timp in orice masina m-as urca spune ca nu fac parte din acea factiuna.
Detalii despre problemă: As vrea sa nu mai arate aia, am incercat am sters am facut cam tot.
Ce ai încercat să faci înainte să postezi?: Sa sterg si sa inlocuiesc unele chestii
Cod sursă (recomandat pastebin.com) : https://pastebin.com/8bCtBnfD
Alte detalii: Mersi

Link to comment
Share on other sites

4 minutes ago, Gabi23 said:

Poți lăsa și comanda /sfv?

Am înțeles eu prost, credeam că doar la mașina spawnată nu poți intra după ceva timp.

Să înțeleg că problema asta apare și la mașinile personale/de civil?

Link to comment
Share on other sites

Acum 16 minute, Gabi23 a spus:

Am înțeles eu prost, credeam că doar la mașina spawnată nu poți intra după ceva timp.

Să înțeleg că problema asta apare și la mașinile personale/de civil?

Excat.

Link to comment
Share on other sites

Modifică:

  1.  
    new car = GetPlayerVehicleID(playerid);
            if(vehicle >= 130 && vehicle <= 135) {
                if(GetPVarInt(playerid, "InLesson") == -1) return SCM(playerid, COLOR_GREY, "Nu ai o lectie activa!"), SlapPlayer(playerid);
            }
            if(vehicleFvsFaction[car] == 1 || vehicleFvsFaction[car] == 2 || vehicleFvsFaction[car] == 3) {
                if(!IsACop(playerid)) {
                    SCM(playerid, -1, "Nu faci parte din aceasta factiune.");
                    SlapPlayer(playerid);              
                }
                else if(vehicleFvsRank[car] > PlayerInfo[playerid][pRank]) {
                    format(string, sizeof(string), "Ai nevoie de rank %d pentru a lua acest vehicul.", vehicleFvsRank[car]);
                    SCM(playerid, COLOR_GREY, string);
                    SlapPlayer(playerid);
                }
                else if(OnDuty[playerid] == 0 && IsACop(playerid) && PlayerInfo[playerid][pMember] == 7 && PlayerInfo[playerid][pMember] == 8 && PlayerInfo[playerid][pMember] == 12 && PlayerInfo[playerid][pMember] == 13) {
                    SCM(playerid, COLOR_LGREEN, "Nu poti folosi vehiculele factiunii daca nu esti la datorie!");
                    SlapPlayer(playerid);
                    return 1;
                }
            }
            else if(vehicleFvsFaction[car] != PlayerInfo[playerid][pMember] && vehicleFvsFaction[car] != 0) {
                SCM(playerid, -1, "Nu faci parte din aceasta factiune.");
                SlapPlayer(playerid);
            }
            else {
                if(OnDuty[playerid] == 0 && IsACop(playerid) && Copcar2(car)) {
                    SCM(playerid, COLOR_LGREEN, "Nu poti folosi vehiculele factiunii daca nu esti la datorie!");
                    SlapPlayer(playerid);
                    return 1;
                }          
                if(vehicleFvsRank[car] > PlayerInfo[playerid][pRank]) {
                    format(string, sizeof(string), "Ai nevoie de rank %d pentru a lua acest vehicul.", vehicleFvsRank[car]);
                    SCM(playerid, COLOR_GREY, string);
                    SlapPlayer(playerid);
                }
            }

 

 

Cu:

        new car = GetPlayerVehicleID(playerid);
        if(vehicle >= 130 && vehicle <= 135) {
            if(GetPVarInt(playerid, "InLesson") == -1) return SCM(playerid, COLOR_GREY, "Nu ai o lectie activa!"), SlapPlayer(playerid);
        }
        if(vehicleFvsFaction[vehicle] == 1 || vehicleFvsFaction[vehicle] == 2 || vehicleFvsFaction[vehicle] == 3) {
            if(!IsACop(playerid)) {
                SCM(playerid, -1, "Nu faci parte din aceasta factiune.");
                SlapPlayer(playerid);              
            }
            else if(vehicleFvsRank[car] > PlayerInfo[playerid][pRank]) {
                format(string, sizeof(string), "Ai nevoie de rank %d pentru a lua acest vehicul.", vehicleFvsRank[car]);
                SCM(playerid, COLOR_GREY, string);
                SlapPlayer(playerid);
            }
            else if(OnDuty[playerid] == 0 && IsACop(playerid) && PlayerInfo[playerid][pMember] == 7 && PlayerInfo[playerid][pMember] == 8 && PlayerInfo[playerid][pMember] == 12 && PlayerInfo[playerid][pMember] == 13) {
                SCM(playerid, COLOR_LGREEN, "Nu poti folosi vehiculele factiunii daca nu esti la datorie!");
                SlapPlayer(playerid);
                return 1;
            }
        }
        else if(vehicleFvsFaction[car] != PlayerInfo[playerid][pMember] && vehicleFvsFaction[car] != 0) {
            SCM(playerid, -1, "Nu faci parte din aceasta factiune.");
            SlapPlayer(playerid);
        }
        else {
            if(OnDuty[playerid] == 0 && IsACop(playerid) && Copcar2(car)) {
                SCM(playerid, COLOR_LGREEN, "Nu poti folosi vehiculele factiunii daca nu esti la datorie!");
                SlapPlayer(playerid);
                return 1;
            }          
            if(vehicleFvsRank[car] > PlayerInfo[playerid][pRank]) {
                format(string, sizeof(string), "Ai nevoie de rank %d pentru a lua acest vehicul.", vehicleFvsRank[car]);
                SCM(playerid, COLOR_GREY, string);
                SlapPlayer(playerid);
            }
        }

 

Discord: Jahen#4481

Link to comment
Share on other sites

1 oră în urmă, Jahen a spus:

Modifică:

  1.  
    new car = GetPlayerVehicleID(playerid);         if(vehicle >= 130 && vehicle <= 135) {             if(GetPVarInt(playerid, "InLesson") == -1) return SCM(playerid, COLOR_GREY, "Nu ai o lectie activa!"), SlapPlayer(playerid);         }         if(vehicleFvsFaction[car] == 1 || vehicleFvsFaction[car] == 2 || vehicleFvsFaction[car] == 3) {             if(!IsACop(playerid)) {                 SCM(playerid, -1, "Nu faci parte din aceasta factiune.");                 SlapPlayer(playerid);                           }             else if(vehicleFvsRank[car] > PlayerInfo[playerid][pRank]) {                 format(string, sizeof(string), "Ai nevoie de rank %d pentru a lua acest vehicul.", vehicleFvsRank[car]);                 SCM(playerid, COLOR_GREY, string);                 SlapPlayer(playerid);             }             else if(OnDuty[playerid] == 0 && IsACop(playerid) && PlayerInfo[playerid][pMember] == 7 && PlayerInfo[playerid][pMember] == 8 && PlayerInfo[playerid][pMember] == 12 && PlayerInfo[playerid][pMember] == 13) {                 SCM(playerid, COLOR_LGREEN, "Nu poti folosi vehiculele factiunii daca nu esti la datorie!");                 SlapPlayer(playerid);                 return 1;             }         }         else if(vehicleFvsFaction[car] != PlayerInfo[playerid][pMember] && vehicleFvsFaction[car] != 0) {             SCM(playerid, -1, "Nu faci parte din aceasta factiune.");             SlapPlayer(playerid);         }         else {             if(OnDuty[playerid] == 0 && IsACop(playerid) && Copcar2(car)) {                 SCM(playerid, COLOR_LGREEN, "Nu poti folosi vehiculele factiunii daca nu esti la datorie!");                 SlapPlayer(playerid);                 return 1;             }                       if(vehicleFvsRank[car] > PlayerInfo[playerid][pRank]) {                 format(string, sizeof(string), "Ai nevoie de rank %d pentru a lua acest vehicul.", vehicleFvsRank[car]);                 SCM(playerid, COLOR_GREY, string);                 SlapPlayer(playerid);             }         }
    
    new car = GetPlayerVehicleID(playerid);
            if(vehicle >= 130 && vehicle <= 135) {
                if(GetPVarInt(playerid, "InLesson") == -1) return SCM(playerid, COLOR_GREY, "Nu ai o lectie activa!"), SlapPlayer(playerid);
            }
            if(vehicleFvsFaction[car] == 1 || vehicleFvsFaction[car] == 2 || vehicleFvsFaction[car] == 3) {
                if(!IsACop(playerid)) {
                    SCM(playerid, -1, "Nu faci parte din aceasta factiune.");
                    SlapPlayer(playerid);              
                }
                else if(vehicleFvsRank[car] > PlayerInfo[playerid][pRank]) {
                    format(string, sizeof(string), "Ai nevoie de rank %d pentru a lua acest vehicul.", vehicleFvsRank[car]);
                    SCM(playerid, COLOR_GREY, string);
                    SlapPlayer(playerid);
                }
                else if(OnDuty[playerid] == 0 && IsACop(playerid) && PlayerInfo[playerid][pMember] == 7 && PlayerInfo[playerid][pMember] == 8 && PlayerInfo[playerid][pMember] == 12 && PlayerInfo[playerid][pMember] == 13) {
                    SCM(playerid, COLOR_LGREEN, "Nu poti folosi vehiculele factiunii daca nu esti la datorie!");
                    SlapPlayer(playerid);
                    return 1;
                }
            }
            else if(vehicleFvsFaction[car] != PlayerInfo[playerid][pMember] && vehicleFvsFaction[car] != 0) {
                SCM(playerid, -1, "Nu faci parte din aceasta factiune.");
                SlapPlayer(playerid);
            }
            else {
                if(OnDuty[playerid] == 0 && IsACop(playerid) && Copcar2(car)) {
                    SCM(playerid, COLOR_LGREEN, "Nu poti folosi vehiculele factiunii daca nu esti la datorie!");
                    SlapPlayer(playerid);
                    return 1;
                }          
                if(vehicleFvsRank[car] > PlayerInfo[playerid][pRank]) {
                    format(string, sizeof(string), "Ai nevoie de rank %d pentru a lua acest vehicul.", vehicleFvsRank[car]);
                    SCM(playerid, COLOR_GREY, string);
                    SlapPlayer(playerid);
                }
            }

 

 

Cu:

new car = GetPlayerVehicleID(playerid); if(vehicle >= 130 && vehicle <= 135) { if(GetPVarInt(playerid, "InLesson") == -1) return SCM(playerid, COLOR_GREY, "Nu ai o lectie activa!"), SlapPlayer(playerid); } if(vehicleFvsFaction[vehicle] == 1 || vehicleFvsFaction[vehicle] == 2 || vehicleFvsFaction[vehicle] == 3) { if(!IsACop(playerid)) { SCM(playerid, -1, "Nu faci parte din aceasta factiune."); SlapPlayer(playerid); } else if(vehicleFvsRank[car] > PlayerInfo[playerid][pRank]) { format(string, sizeof(string), "Ai nevoie de rank %d pentru a lua acest vehicul.", vehicleFvsRank[car]); SCM(playerid, COLOR_GREY, string); SlapPlayer(playerid); } else if(OnDuty[playerid] == 0 && IsACop(playerid) && PlayerInfo[playerid][pMember] == 7 && PlayerInfo[playerid][pMember] == 8 && PlayerInfo[playerid][pMember] == 12 && PlayerInfo[playerid][pMember] == 13) { SCM(playerid, COLOR_LGREEN, "Nu poti folosi vehiculele factiunii daca nu esti la datorie!"); SlapPlayer(playerid); return 1; } } else if(vehicleFvsFaction[car] != PlayerInfo[playerid][pMember] && vehicleFvsFaction[car] != 0) { SCM(playerid, -1, "Nu faci parte din aceasta factiune."); SlapPlayer(playerid); } else { if(OnDuty[playerid] == 0 && IsACop(playerid) && Copcar2(car)) { SCM(playerid, COLOR_LGREEN, "Nu poti folosi vehiculele factiunii daca nu esti la datorie!"); SlapPlayer(playerid); return 1; } if(vehicleFvsRank[car] > PlayerInfo[playerid][pRank]) { format(string, sizeof(string), "Ai nevoie de rank %d pentru a lua acest vehicul.", vehicleFvsRank[car]); SCM(playerid, COLOR_GREY, string); SlapPlayer(playerid); } }


        new car = GetPlayerVehicleID(playerid);
        if(vehicle >= 130 && vehicle <= 135) {
            if(GetPVarInt(playerid, "InLesson") == -1) return SCM(playerid, COLOR_GREY, "Nu ai o lectie activa!"), SlapPlayer(playerid);
        }
        if(vehicleFvsFaction[vehicle] == 1 || vehicleFvsFaction[vehicle] == 2 || vehicleFvsFaction[vehicle] == 3) {
            if(!IsACop(playerid)) {
                SCM(playerid, -1, "Nu faci parte din aceasta factiune.");
                SlapPlayer(playerid);              
            }
            else if(vehicleFvsRank[car] > PlayerInfo[playerid][pRank]) {
                format(string, sizeof(string), "Ai nevoie de rank %d pentru a lua acest vehicul.", vehicleFvsRank[car]);
                SCM(playerid, COLOR_GREY, string);
                SlapPlayer(playerid);
            }
            else if(OnDuty[playerid] == 0 && IsACop(playerid) && PlayerInfo[playerid][pMember] == 7 && PlayerInfo[playerid][pMember] == 8 && PlayerInfo[playerid][pMember] == 12 && PlayerInfo[playerid][pMember] == 13) {
                SCM(playerid, COLOR_LGREEN, "Nu poti folosi vehiculele factiunii daca nu esti la datorie!");
                SlapPlayer(playerid);
                return 1;
            }
        }
        else if(vehicleFvsFaction[car] != PlayerInfo[playerid][pMember] && vehicleFvsFaction[car] != 0) {
            SCM(playerid, -1, "Nu faci parte din aceasta factiune.");
            SlapPlayer(playerid);
        }
        else {
            if(OnDuty[playerid] == 0 && IsACop(playerid) && Copcar2(car)) {
                SCM(playerid, COLOR_LGREEN, "Nu poti folosi vehiculele factiunii daca nu esti la datorie!");
                SlapPlayer(playerid);
                return 1;
            }          
            if(vehicleFvsRank[car] > PlayerInfo[playerid][pRank]) {
                format(string, sizeof(string), "Ai nevoie de rank %d pentru a lua acest vehicul.", vehicleFvsRank[car]);
                SCM(playerid, COLOR_GREY, string);
                SlapPlayer(playerid);
            }
        }

 

Mersi pentru efort dar ceasi chestie.

Edited by szIonut
Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...