Jump to content

Question

Posted

Salut am o problem cu comanda /find /wanted cand le folosesc arata ultima locatie a jucatorului nu se updateaza 

        case DIALOG_WANTED: {
            if(!response) return true;            
            new id = SelectedPlayers[playerid][listitem];
            if(PlayerInfo[id][pWantedLevel] == 0) return SCM(playerid, COLOR_LGREEN, "Eroare: Acel player nu mai are wanted!");
            ShowMDC(playerid, id);
            UsedFind[playerid] = 1;
            new Float:X,Float:Y,Float:Z;
            GetPlayerPos(id, X,Y,Z);
            SetPlayerCheckpointEx(playerid, X,Y,Z, 3.5);
            targetfind[playerid] = id;
            CP[playerid] = 53;
            format(string, sizeof(string), "* Punctul rosu a fost setat pe %s (%d) care se afla in zona %s.",GetName(id),id,GetPlayerZone(id));
            SCM(playerid,COLOR_YELLOW,string);
        }

YCMD:find(playerid, params[], help) {
    if(JobWorking[playerid] == 1) return true;
    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", "Exit");
    new id,giveplayer[30],string[100];
    if(PlayerInfo[playerid][pJob] != 6 && PlayerInfo[playerid][pMember] != 11 && !IsACop(playerid)) return SCM(playerid, COLOR_GREY, "Nu ai jobul 'Detective'.");
    if(sscanf(params, "u",id)) return SCM(playerid, COLOR_GREY, "Syntax: {FFFFFF}/find <playerid/name>");
    if(!IsPlayerConnected(id) || id == INVALID_PLAYER_ID) return SCM(playerid, COLOR_GREY, "Acel player nu este conectat.");
    if(Spectate[id] != 255) return SCM(playerid, COLOR_GREY, "Acel player este ocupat!");
    if(id == playerid) return SCM(playerid, COLOR_GREY, "Nu poti folosi aceasta comanda asupra ta!");
    if(togfind[id] == 1) return SCM(playerid,COLOR_GREY, "Acel player nu poate fi urmarit!");
    if(GetPVarInt(id, "Undercover") == 1) return SCM(playerid, COLOR_GREY, "Acel player este ocupat!");
    if(BizRobbed[playerid] != 0) return true;
    if(togfind[id] == 1 && OnDuty[playerid] == 0 && PlayerHit[playerid] == -1) return SCM(playerid, COLOR_LGREEN, "Eroare: Acel player nu poate fi urmarit!");
    UsedFind[playerid] = 1;
    new skin = GetPlayerSkin(id);
    PlayerTextDrawSetPreviewModel(playerid, FindSkinTD, skin);
    PlayerTextDrawShow(playerid, FindSkinTD);
    GetPlayerName(id, giveplayer, sizeof(giveplayer));
    new Float:X,Float:Y,Float:Z;
    GetPlayerPos(id, X,Y,Z);
    SetPlayerCheckpointEx(playerid, X,Y,Z, 3.5);
    targetfind[playerid] = id;
    CP[playerid] = 53;
    format(string, sizeof(string), "* Punctul rosu a fost setat pe %s (%d) care se afla in zona %s.",giveplayer,id,GetPlayerZone(id));
    SCM(playerid,COLOR_YELLOW,string);
    for(new m; m < 2; m++) {
        if(PlayerInfo[playerid][pDailyMission][m] == 12) CheckMission(playerid, m);
    }            
     return true;
}

 

 

 

2 answers to this question

Recommended Posts

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.