Jump to content

BizZar

Membru
  • Posts

    1
  • Joined

  • Last visited

Profile Information

  • Level of knowledge
    Avansat

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

BizZar's Achievements

Newbie

Newbie (1/14)

  • First Post
  • Conversation Starter
  • Week One Done
  • One Month Later
  • One Year In

Recent Badges

0

Reputation

  1. In acest tutorial veti invata cum sa va securizati comenzile de admin/helper. La ce ajuta acest sistem? Daca deti helper / admin pe server si eventual iti este sparta parola iti va mai cere o parola pentru folosirea comenzilor respective gradului. 1. La inceput in gamemode punem: new admacc[MAX_PLAYERS]; #define DIALOG_SECURITY 630 2. Mergem la onplayerconnect si punem: admacc[playerid] = 0; 3. Mergem la onplayerlogin si punem: if(PlayerInfo[playerid][pAdmin] > 0 || PlayerInfo[playerid][pHelper] > 0) return ShowPlayerDialog(playerid, DIALOG_SECURITY, DIALOG_STYLE_PASSWORD, "{FFFFFF}Security Step:", "{FFFFFF}Deoarece ai admin sau helper.\n\n{FFFFFF}Trebuie sa introduci parola de securitate mai jos:", "Ok", "Exit"); Atentie trebuie pus dupa ce s-a spawnat jucatorul. 4. Creem dialogul. if(dialogid == DIALOG_SECURITY) { switch(response) { case 0: return SendClientMessage(playerid, COLOR_ERROR, "Nu vei putea folosi nici o comanda!"); case 1: { if(strfind("parolaadmin", inputtext, true) == 0) { SCM(playerid, -1, "Acum poti folosii orice comanda"); admacc[playerid] = 1; } else return SCM(playerid, -1, "Nu poti folosi nici o comanda!"); } } return 1; } 5. Adaugam la comenzile de admin/helper. if(admacc[playerid] == 0) return SCM(playerid, -1, "Nu poti folosi aceasta comanda, contul tau este blocat!"); Daca v-a placut tutorialul +1 :).
×
×
  • 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.