Jump to content

[REZOLVAT] Intrebare.


TioO
 Share

Recommended Posts

Salut cum pot modifca raza de tractare la factiunea TTC pe gm Burned?

YCMD:tow(playerid, params[], help) {
    if(PlayerInfo[playerid][pMember] == 8 || PlayerInfo[playerid][pLeader] == 8) TTCFunction(playerid);
    return 1;
}
 
stock TTCFunction(playerid) {
    if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER) {
        if(strlen(PlayerInfo[playerid][pPin]) != 0 && PlayerInfo[playerid][pPinLogged] == 0) {
             SCM(playerid, COLOR_GREY, "Nu poti folosi aceasta comanda deoarece nu te-ai autentificat cu codul de securitate.");
             SCM(playerid, COLOR_GREY, "Pentru a te autentifica, foloseste comanda '/loginpin'!");
             return 1;
        }      
        new m = GetVehicleModel(GetPlayerVehicleID(playerid));
        if(m == 525) {
            if(GetPlayerState(playerid)==2) {
                new idd, vid;
                vid = GetClosestVehicle2(playerid);
                idd = FindSpawnID(vid);
               
                if(vid == 0) return 1;
                if(IsABike2(vid) || IsAPlane(vid) || GetVehicleModel(vid) == 448 || GetVehicleModel(vid) == 461 || GetVehicleModel(vid) == 462 || GetVehicleModel(vid) == 463 || GetVehicleModel(vid) == 468 || GetVehicleModel(vid) == 471 || GetVehicleModel(vid) == 521 || GetVehicleModel(vid) == 522 || GetVehicleModel(vid) == 523)
                    return SCM(playerid,-1, "Nu poti tracta acest vehicul!");
                   
                if(IsTrailerAttachedToVehicle(GetPlayerVehicleID(playerid))) {
                    DetachTrailerFromVehicle(GetPlayerVehicleID(playerid));
                    DisablePlayerCheckpointEx(playerid);
                    gPlayerCheckpointStatus[playerid] = CHECKPOINT_NONE;
                }
                else {
                    if(CP[playerid] != 0 || targetfind[playerid] != -1) return ShowPlayerDialog(playerid, DIALOG_CHECKPOINT, DIALOG_STYLE_MSGBOX, "Checkpoint", "Ai deja un checkpoint activ.\nDoresti sa-l anulezi? Daca da, apasa pe 'Ok'.", "Ok", "Anuleaza");
                    new Float: hp;
                    GetVehicleHealth(vid, hp);
                    if(hp >= 1001) return SCM(playerid, COLOR_LGREEN, "Eroare: Vehiculul pe care vrei sa-l tractezi are peste 900.0 HP!");
                    SetPVarFloat(playerid, "VehHP", hp);
                    AttachTrailerToVehicle(vid,GetPlayerVehicleID(playerid));
                    new rand;
                    rand = random(sizeof(TowCarCk));
                    SetPlayerCheckpointEx(playerid, TowCarCk[rand][0],TowCarCk[rand][1],TowCarCk[rand][2], 6);
                    CP[playerid] = 34;
                    if(idd != 0) {
                        new string[180];
                        format(string, 256, "Ai tractat vehiculul lui %s.", CarInfo[idd][cOwner]);
                        SCM(playerid, -1, string); 
                    }
                }
            }
        }
    }
    return 1;
}
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...