Jump to content
  • 0

Wanted level


JohNNy_eZz

Question

Salutare baieti! Scuze daca am gresit categoria. (va rog sa mutati voi daca se poate)

As avea si eu nevoie de un fs care sa permita playerilor sa stearga wantedul pentru o suma de bani folosind comanda /fineme pentru o suma de bani (cand nu sunt politisti pe server, playerii nu au acces la /gohome , etc si as prefera sa poata sa scape singuri de politie)

Mersi mult de tot :D

* * ROMANIA LIVE TRUCKING * * [NEW 2018] | ADMIN / VIP GRATIS
▬ HostName: Romania Live Trucking [/rules]
▬ Adresă: 188.212.100.182:7777
▬ Mod: Trucking
▬ Limbă: Română
Link to comment
Share on other sites

1 answer to this question

Recommended Posts

  • 0
On 6/17/2018 at 12:32 PM, JohNNy_eZz said:

Salutare baieti! Scuze daca am gresit categoria. (va rog sa mutati voi daca se poate)

As avea si eu nevoie de un fs care sa permita playerilor sa stearga wantedul pentru o suma de bani folosind comanda /fineme pentru o suma de bani (cand nu sunt politisti pe server, playerii nu au acces la /gohome , etc si as prefera sa poata sa scape singuri de politie)

Mersi mult de tot :D

mai bine inculuzi comanda direct in gamemode, ar fii simplu 

 

#define DIALOG_FINEME 900 // unde ai define-urile pui asta

// comanda undeva prin gamemode
CMD:fineme(playerid, params[])
{    

    if(PlayerInfo[playerid][pWantedLevel] == 0) return SendClientMessage(playerid, -1, "Nu ai wanted.");
    new s=0, string[128];
    foreach(new i : Player)
        if(IsACop(i)) s++;
    if(s!=0) {
        format(string, sizeof(string), "You can't clear your wanted because are %d cops online.", s);
        SendClientMessage(playerid, -1, string);
        return 1;
    }
    if(PlayerInfo[playerid][pCash] < PlayerInfo[playerid][pWantedLevel]*100000) {
        format(string, sizeof(string), "You don't have $%s.", FormatNumber(PlayerInfo[playerid][pWantedLevel]*100000));
        SendClientMessage(playerid, -1, string);
        return 1;
    }
    format(string, sizeof(string), "You want to pay $%s for clear wanted?", FormatNumber(PlayerInfo[playerid][pWantedLevel]*100000));
    ShowPlayerDialog(playerid, DIALOG_FINEME, DIALOG_STYLE_MSGBOX, string, "Yes", "Cancel");
    return 1;
}

// asta la ondialogresponse
if(dialogid == DIALOG_FINEME)
{
    if(response)
    {    
        new string[128];
        format(string, sizeof(string), "You cleared your wanted for $%s.", FormatNumber(PlayerInfo[playerid][pWantedLevel]*100000));
        SendClientMessage(playerid, -1, string);
        WantedPoints[playerid] = 0;
        PlayerInfo[playerid][pWantedLevel] = 0;
        SetPlayerWantedLevel(playerid, 0);
        PlayerTextDrawHide(playerid, WantedText[playerid]);
        ClearCrime(playerid);
        Update(playerid,pWantedLevelx);
    }
}

Mai modifici tu in functie de ce gamemode ai.

  • Upvote 1
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.